天地行者分享 http://blog.sciencenet.cn/u/aejj 天,地,人

博文

怎样过滤不良信息

已有 5621 次阅读 2009-6-13 22:30 |个人分类:世态|系统分类:观点评述

最近听到工信部要强制安装什么过滤软件的消息,这个决定是没有技术含量的:过滤不良信息和过滤关键字是完全的两码事。比如某著名博客就设置了过滤我们的母亲的功能,导致上回我要喊母亲万岁时居然被屏蔽掉(跟母亲保证,我是真心实意千真万确地准备喊的。)又比如艾爷的三个博客前几天同时被关,的确他的博客中充满了不良关键字,可是艾爷的导向是好。明显的是政府是希望通过民间像艾爷这样的力量去把地震受害者的名单公布出来,这既不让某些人为难,又可以安抚民心,做件大好事。(顺便说一句,如果你们单看电饭煲去他家找他的麻烦就简单地判断上面在这件事上的导向,那你们可有点太简单了,这个连110都意识到了)你问我怎么知道这个的?这是“悟”,一个信息良不良是靠“悟”的,而不是靠查关键字。判断这篇文章的导向是什么,方向是什么,是一个政治任务,是一个语文的技术活,中国大学计算机专业毕业的学生,据我所知他们大多偏科很严重,大学语文百分百水过,考研政治一般都是死记硬背没有领会,擦边过了考试也就忘了,他们是不能完成裆交给他们的这个光荣而艰巨的任务的。

不幸的是英明的工信部一直高估咋们计算机专业毕业的学生们的能力,把他们大批派到了互联网岗哨的各个关键位置;不幸的是咋们互联网的岗哨都是些只认胸牌肩章的小兵,导致碰到敌我的伪装不能识别,误伤艾爷等等广大的爱国分子,以及屏蔽玩球的老师和梵高黄色背景的图画(据我所知,这就是被工信部那么的信任的花季软件这两天干出来的事)等等无辜群众。当然,广大爱国的互联网的小兵们坚决跟母亲走坚决执行母亲交给的任务的精神是好的,只是你们擅长的计算机技术,比如过滤关键词之类的,实在与裆下的任务不对口。你们干不好不怨你们,实在是因为你们站在了错误的岗位上。

至于这款新的软件不论是论技术还是论政治都一无是处我就不想再说了。在技术上它的一无是处请看密歇根大学计算机系使用这款软件12小时后的分析报告,你们中文不好英文人人过了四级,技术亦是人人过硬,看懂这篇文章应该是不成问题的。

 

(以下转自http://www.cse.umich.edu/~jhalderm/pub/gd/)


Analysis of the Green Dam Censorware System
Scott Wolchok, Randy Yao, and J. Alex Halderman
Computer Science and Engineering Division
The University of Michigan
Revision 2.4 – June 11, 2009
Summary    We have discovered remotely-exploitable vulnerabilities in Green Dam, the censorship software reportedly mandated by the Chinese government. Any web site a Green Dam user visits can take control of the PC.

According to press reports, China will soon require all PCs sold in the country to include Green Dam. This software monitors web sites visited and other activity on the computer and blocks adult content as well as politically sensitive material. 

We examined the Green Dam software and found that it contains serious security vulnerabilities due to programming errors. Once Green Dam is installed, any web site the user visits can exploit these problems to take control of the computer. This could allow malicious sites to steal private data, send spam, or enlist the computer in a botnet. In addition, we found vulnerabilities in the way Green Dam processes blacklist updates that could allow the software makers or others to install malicious code during the update process. 

We found these problems with less than 12 hours of testing, and we believe they may be only the tip of the iceberg. Green Dam makes frequent use of unsafe and outdated programming practices that likely introduce numerous other vulnerabilities. Correcting these problems will require extensive changes to the software and careful retesting. In the meantime, we recommend that users protect themselves by uninstalling Green Dam immediately. 

 

 Green Dam displays this message when it detects banned phrases.
Introduction
Accordingly to recent news reports (NYT, WSJ), the Chinese government has mandated that, beginning July 1, every PC sold in China must include a censorship program called Green Dam. This software is designed to monitor internet connections and text typed on the computer. It blocks undesirable or politically sensitive content and optionally reports it to authorities. Green Dam was developed by a company called Jin Hui and is available as a free download. We examined version 3.17. 

How Green Dam Works
The Green Dam software filters content by blocking URLs and website images and by monitoring text in other applications. The filtering blacklists include both political and adult content. Some of the blacklists appear to have been copied from American-made filtering software.

Image filter    Green Dam includes computer vision technology used to block online images containing nudity. The image filter reportedly works by flagging images containing large areas of human skin tone, while making an exception for close-ups of faces. We've found that the program contains code libraries and a configuration file from the open-source image recognition software OpenCV. 

Text filter    Green Dam scans text entry fields in various applications for blocked words, including obscenities and politically sensitive phrases (for example, references to Falun Gong). Blacklisted terms are contained in three files, encrypted with a simple key-less scrambling operation. We decrypted the contents of these files: xwordl.dat, xwordm.dat, and xwordh.dat. We also found what appears to be a word list for a more sophisticated sentence processing algorithm in the unencrypted file FalunWord.lib. When Green Dam detects these words, the offending program is forcibly closed and an error image (shown above) is displayed. 

URL filter    Green Dam filters website URLs using patterns contained in whitelist and blacklist files (*fil.dat, adwapp.dat, and TrustUrl.dat). These files are encrypted with the same key-less scrambling operation as the blacklists for the text filter. Five of the blacklists correspond to the categories in the content filtering section of Green Dam's options dialog (shown below).

We found evidence that a number of these blacklists have been taken from the American-made filtering program CyberSitter. In particular, we found an encrypted configuration file, wfileu.dat, that references these blacklists with download URLs at CyberSitter's site. We also found a setup file, xstring.s2g, that appears to date these blacklists to 2006. Finally, csnews.dat is an encrypted 2004 news bulletin by CyberSitter. We conjecture that this file was accidentally included because it has the same file extension as the filters. 

Security Problems
After only one day of testing the Green Dam software, we found two major security vulnerabilities. The first is an error in the way the software processes web sites it monitors. The second is a bug in the way the software installs blacklist updates. Both allow remote parties to execute arbitrary code and take control of the computer. 

Web Filtering Vulnerability
Green Dam intercepts Internet traffic and processes it to see whether visited web sites are blacklisted. In order to perform this monitoring, it injects a library called SurfGd.dll into software that uses the socket API. When a user access a web site, this code checks the address against the blacklist and logs the URL. 

We discovered programming errors in the code used to process web site requests. The code processes URLs with a fixed-length buffer, and a specially-crafted URL can overrun this buffer and corrupt the execution stack. Any web site the user visits can redirect the browser to a page with a malicious URL and take control of the computer. 

We have constructed a demonstration URL that triggers this problem. If you have Green Dam installed, clicking the button on our demonstration attack page will cause your browser (or tab) to crash. 

This proof-of-concept shows that we are able to control the execution stack. An actual attacker could exploit this to execute malicious code. 

Green Dam's design makes this problem exploitable from almost any web browser. At this time, the surest way for users to protect themselves is to uninstall Green Dam. 

Blacklist Update Vulnerability
We found a second problem in the way Green Dam reads its filter files. This problem would allow Green Dam's makers, or a third-party impersonating them, to execute arbitrary code and install malicious software on the user's computer after installing a filter update. Users can enable automatic filter updates from the Green Dam configuration program. 

Green Dam reads its filter files using unsafe C string libraries. In places, it uses the fscanf function to read lines from filter files into a fixed-length buffer on the execution stack. This creates classic buffer-overflow vulnerabilities. For example, if a line in the file TrustUrl.dat exceeds a certain fixed length, the buffer will be overrun, corrupting the execution stack and potentially giving the attacker control of the process. 

The filter files can be replaced remotely by the software maker if the user has enabled filter updates. The updates could corrupt these vulnerable files to exploit the problems we found. This could allow Green Dam's makers to take control of any computer where the software is installed and automatic filter updates are enabled. Furthermore, updates are delivered via unencrypted HTTP, which could allow a third party to impersonate the update server (for example, by exploiting DNS vulnerabilities) and take control of users' computers using this attack. 

Removing Green Dam
Green Dam allows users who know its administrator password to uninstall the software. We tested the uninstaller and found that it appears to effectively remove Green Dam from the computer. However, it fails to remove some log files, so evidence of users' activity remains hidden on the system.

In light of the serious vulnerabilities we outlined above, the surest way for users to protect themselves is to remove the software immediately using its uninstall function. 

Conclusion
Our brief testing proves that Green Dam contains very serious security vulnerabilities. Unfortunately, these problems seem to reflect systemic flaws in the code. The software makes extensive use of programming techniques that are known to be unsafe, such as deprecated C string processing functions including sprintf and fscanf. These problems are compounded by the design of the program, which creates a large attack surface: since Green Dam filters and processes all Internet traffic, large parts of its code are exposed to attack. 

If Green Dam is deployed in its current form, it will significantly weaken China's computer security. While the flaws we discovered can be quickly patched, correcting all the problems in the Green Dam software will likely require extensive rewriting and thorough testing. This will be difficult to achieve before China's July 1 deadline for deploying Green Dam nationwide. 


--------------------------------------------------------------------------------

 

Additional Screenshot
 

 Users can configure which categories of web sites are blocked by Green Dam.
Additional filters are used to block adult and politically-sensitive terms in text entry fields.


--------------------------------------------------------------------------------

 

Acknowledgments
We wish to thank our colleagues at the University of Michigan who alerted us to Green Dam and assisted with translation. 

Contacting the Authors
Please send questions or comments to Professor J. Alex Halderman. 

 

这篇文章在天涯上有不完全的中译版。不过结论中的一句话没有翻译出来,Halderman教授最后说,从技术让这款软件在7月1号出来顺利执行任务,实在是有些为难它了。就像我的这篇文章,拿无论是在政治上还是在技术上都这么糟糕的一款软件来过滤,它是肯定要犯错误的。



https://wap.sciencenet.cn/blog-211484-238057.html

上一篇:Santa fe institute, 最后一堂seminar, 准备回家
下一篇:任继愈,季羡林先生相继离世
收藏 IP: .*| 热度|

0

发表评论 评论 (0 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-17 02:44

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部