Uncategorized mmpower on 07 Apr 2004 08:04 am
海龟网privacy设置剖析–送给CHU及其他同学。(楚楚不能上贴的真正原因及解决办法见内)
喜欢楚楚的文笔,大气豪爽有女中豪杰的味道。可一个多月前正读着<<楚楚闯世界:芝加哥历险记>>,突然轰的一声一片漆黑,不省人事。等醒过来,震后的归网已不见伊人,空余惆怅…
后来看了chu,山姆,大友等在归坛和中国缘的讨论,方知才女尚在,不能发信只因顾虑新归网偷去隐私。好你个老狼竟敢窃取俺偶像隐私,这还了得,MMPOWER誓要为chu MM逃回公道!于是乘今天有空着手调查归网罪证,报告如下:
1。 cookie
许多网站确实用小饼干来获得用户隐私,不排除归网也有这个可能, 于是测试:
(1) 检查persistent cookies:
方法很多,如用一些firewall软件或一些http filter软件等。我的结论是归网没有设可用于窃取隐私的cookie. 事实上只设了一个session cookie。用wget看一下www.haiguinet.com的http header, 可以看到:
--21:27:14-- http://www.haiguinet.com:80/ => `index.html.3' Connecting to www.haiguinet.com:80... connected! HTTP request sent, awaiting response... 200 OK 2 Server: Microsoft-IIS/5.0 3 Date: Wed, 07 Apr 2004 01:30:43 GMT 4 X-Powered-By: ASP.NET 5 Connection: Keep-Alive 6 Content-Length: 2643 7 Content-Type: text/html 8 Set-Cookie: ASPSESSIONIDACQAQBBS=OJDGBHEAIPOBGNOICFLALAFP; path=/ 9 Cache-control: private 10 0K -> .. [100%]
在第八行www.haihuinet.com发了一个cookie “ASPSESSIONIDACQAQBBS”, 内容是“OJDGBHEAIPOBGNOICFLALAFP”。这是个ASP session cookie,用来维护server内部状态--一旦你sign in, IIS Web server用这个cookie保持你“已经登陆”的信息。若没有session control,用户每发一个帖子就要登陆一次. 这个cookie不涉及任何隐私数据。
这也是论坛唯一的一个cookie. 如果你用IE 6.0等有cookie control的浏览器,可以自己验证一下--假设你用英文ie6:
(1) on IE, go to “tools–>internet options–>privacy–>advanced”, select the checkbox “override automatic cokie handling”, then select “prompt” for first party and third party cookie. also UN-CHECK “always allow session cookies)
(2) 关闭你的firewall (zone alarm etc)或在firewall内开放www.haiguinet.com的限制
(3) go to www.haiguinet.com, IE will prompt you that the server is sending you a cookie and ask you if you reject or accept everytime a new cookie is sent to the browser. If you accept it the first time, it won’t ask you again. if you deny, it will ask you everytime you open a new link in haiguinet.com– all about the same cookie(you can check the cookie detail by clicking the “more info” button.
干吗非得用cookie,不用不行吗?答案是yes and no. 不用cookie是可行的,但session management通常就得用Url Rewritting — 将session info写到URL地址上。haiguinet.com is using ASP, (a piece of M$ junk ) which will be quite a tedious work if writting the code from scrach 。 另外我想唐和完颜王爷可能用了一个现成framework,也不好改。其实根本也没必要改呀。
如果disable了sesion cookie,用户登陆时会停留在login页面上进不去。
说了半天,只是告诉楚楚cookie不是大问题, 但还没说到正点上--楚楚上不了贴的真正原因不是因为cookie. 因为根据她的描述,她可以login, 但log in 后看到的是类似
“请在本网站提交网页!返回首页”的一行字。如果她disable了sesion cookie,她不会看到这行字的,而只会停留在login页面上。
所以mmpower继续调查,
(2)HTTP header
有一些HTTP header也可被用于搜集隐私问题。www.haiguinet.com/login.asp longin 时的 http request and repsonse header 信息如下:
request: accept connection ... scan: POST /login.asp HTTP/1.0 scan: Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* scan: Referer: http://www.haiguinet.com/login.asp scan: Accept-Language: zh-cn,en-us;q=0.5 scan: Content-Type: application/x-www-form-urlencoded scan: Proxy-Connection: Keep-Alive scan: User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322) default scan: Host: www.haiguinet.com response: scan: Content-Length: 65 scan: Pragma: no-cache scan: Cookie: ASPSESSIONIDACQAQBBS=PCPFBHEAEKBFLJOMBDGALENI addh: Cookie: ASPSESSIONIDACQAQBBS=PCPFBHEAEKBFLJOMBDGALENI
敲累了。长话短说,haiguinet.com 检查 HTTP request 中的 “referer” header, 这个header 由browser发给web server, 告诉服务器这个request从哪个页面发起. 坏网站常用之探测用户在访问他的网站前访问的是何网址。但好网站也常用它维护网站和用户安全,防止不法分子劫持网站、冒充用户。我相信海龟网是后者--因为从我的测试来看,海龟网要求login的http request的referer header的值必须包含”www.haiguinet.com”, 也就是说必须是从海龟王页面上login 来的而不是黑客在运行一个自动猜口令的程序。若非来自haiguinet.com则显示楚楚看到的那行字并拒绝登陆。
而楚楚的zone alarm 开着时很可能去掉了”referer”header,或修改了referer header ’s value. 这样就不能登陆了。在zone alarm /zone alarm pro 的privacy 控制面板上有一个类似
“remove private header information”的选项,若选了就会删除referer header造成上述问题。
我想这是真正原因。
(3)另外一个可能性是proxy 问题。许多zone alarm一类的软防火墙is buggy when working with proxy servers. 但我想这应不是chu 的 case.
费了一晚上劲,结果给老狼疯唐王爷们平凡了 55555 :)
在此声明,MMPOWER与海龟网及其创始/维护者没有任何关系。
所以楚楚同学/教官, 放心回来军校吧!芝加哥历险记还没读完呢,期待中。。。