Archive for 三月, 2007

114已经严重影响工作了

电信的114 search这个流氓,已经严重影响工作了,电信机房的一台web服务器, precompile的页面 老是带指向114的错误提示,我一看到这个就觉得不舒服,公司的dns服务器在美 国,而且在bind上面做了acl, 电信机房的几台服务器没有在公司的专线网络以内,解析内部Domain的时候受限, 电信的DNS故技重演, 将内部Domain指到那个218.83.175.154的IP,实在让人难以接受,有不用电信产品 的机会,绝对不会放弃 哪怕多给几个子,连baidu我都不想搭理(blog上的rewrite限制带有baidu字样的robot),别说这个玩意儿。

简析search.sh.vnet.cn欺骗伎俩

最近发现输入无效的域名的时候总是跳到 search.114.vnet.cn进行垃圾搜索,这其实是一种从dns开始的会话劫持,跟客户端完全没有关系。
作为中国第一大网络运用商,使用这种无耻的伎俩,蒙骗用户,获取 点击,让人极为愤怒。
他的手法可以说毫无技术可言: 先修改dns的查询结果:将所有无结果的DNS查询,都转到一个IP,然后利用这个IP来使用http转跳。 以上海为例: 当拨号上网的时候从电信处获取的IP配置如下:

  1. Dhcp Enabled. . . . . . . . . . . : Yes 
  2. Autoconfiguration Enabled . . . . : Yes 
  3. IP Address. . . . . . . . . . . . : 192.168.0.100 
  4. Subnet Mask . . . . . . . . . . . : 255.255.255.0 
  5. Default Gateway . . . . . . . . . : 192.168.0.1 
  6. DHCP Server . . . . . . . . . . . : 192.168.0.1 
  7. DNS Servers . . . . . . . . . . . : 202.96.209.134
  8.                                          202.96.209.6

注意那两个DNS服务器,这两个服务器就是整个会话劫持的始作涌者。

  1. ping -a 202.96.209.134
  2. Pinging ns-pdb.online.sh.cn [202.96.209.134] with 32 bytes of data:
  3. Reply from 202.96.209.134: bytes=32 time=14ms TTL=246 
  4. Reply from 202.96.209.134: bytes=32 time=14ms TTL=246
  5. ping -a 202.96.209.6
  6. Pinging ns-pxb.online.sh.cn [202.96.209.6] with 32 bytes of data:
  7. Reply from 202.96.209.6: bytes=32 time=13ms TTL=247 
  8. Reply from 202.96.209.6: bytes=32 time=12ms TTL=247

我们ping的结果可以看出来,这两个IP对应的域名是ns-pdb.online.sh.cn和ns-pdb.online.sh.cn (由于我是上海的电信用户):

  1. #nslookup
  2. > dontexistdomain.cn 
  3. Serverns-pxb.online.sh.cn
  4. Address202.96.209.6
  5. Non-authoritative answer:
  6. Name:    dontexistdomain.cn 
  7. Address218.83.175.154

看见没有,再来一个:

  1. > another_dont_exist_domain.cn 
  2. Serverns-pxb.online.sh.cn 
  3. Address202.96.209.6
  4. DNS request timed out.    
  5. timeout was 2 seconds.
  6. Non-authoritative answer:
  7. Name:    another_dont_exist_domain.cn 
  8. Address218.83.175.154

这就是所有没有对应IP域名都会指向的IP。 把这个ip的80端口的抓回来,可以看到下面这些内容:

  1. #wget http://218.83.175.154
  2. #cat index.html
  3.  s=String(window.location.href); mylocal=s.substring(7,s.indexOf('/',7)); function myradom() {         return Math.round(Math.random()*273); }
  4. var KeyList = new Array(273);
  5.  KeyList[4]="超级女生" 
  6. KeyList[5]="免费电影" 
  7. KeyList[10]="情感" 
  8. KeyList[11]="交友" 
  9. ………………
  10. ………………
  11. KeyList[52]="丰胸"
  12. KeyList[53]="减肥" 
  13. KeyList[54]="乙肝" 
  14. KeyList[55]="性病" 
  15. KeyList[56]="保健" 
  16. KeyList[223] = "成人";
  17. KeyList[224] = "成人高考";
  18. KeyList[225] = "成人用品";
  19. t="http://search.114.vnet.cn/search_web.html?id=596&fm=pro&kw="+KeyList[myradom()]+"&s=81";
  20. //t="http://www.163.com";
  21. //t="http://218.30.64.194/response.asp?MT="+mylocal+"&srch=5&prov=&utf8";
  22. document.location.href = t;

这就是劫持的所有过程了,
让人啼笑皆非,163的注释都还在,要是打开了的话,163岂不是会被ddos?
防范这个很简单,我在路由器上面直接封掉218.83.175.154这个IP,天下又恢复太平。
尾记:仅仅从技术层面上面封掉它很简单,深入一点点:作为基本职业操守:诚信,何在?作为中国第一大电信运营商,为了商业利益,做到这种地步,非常令人寒心。