Monday, January 18, 2010

Decrypting the Google statement

There have been many articles saying that Google is pulling out China. Well, that's not exactly what Google said.

Here is exactly what Google stated:

We have decided we are no longer willing to continue censoring our results on Google.cn, and so over the next few weeks we will be discussing with the Chinese government the basis on which we could operate an unfiltered search engine within the law, if at all. We recognize that this may well mean having to shut down Google.cn, and potentially our offices in China.


Google is not leaving China. At least not yet.

Look at what was actually said:

1) Google is not willing want to censor, so Google will 2) engage in discussion with the Chinese government and, 3) in order to operate an uncensored search engine within the law.

Law is the key word here. China's Foreign Ministry spokesperson, Jiang Wu, stated:

China welcomes international Internet companies to conduct business within the country according to law


The question is, what law says that Google cannot index the web site of the BBC news? Anyone know?

In 2006 when Google started censoring google.cn in China I asked:

What specific law or court order is being complied with in China?


It is 2010, still no answer.

I think it is a reasonable question for Google to ask.

Thursday, January 14, 2010

Chatter...

This post is my analysis of publicly information available on the attack against Google. I think that Google linked to my blog and the GhostNet report because of similarities in methods, not because the two cases are linked. This post combines my analysis of Google's statement, media report and my experience with other attacks -- that doesn't mean that this is exactly what happened in the attack on Google.

There's been a lot of chatter about how Google and 30+ other companies were compromised. Adobe has issued a statement saying that they too were compromised they still won't say if attacks are in fact linked. Yahoo! stated that they were "aligned with Google" and it is now being reported that Yahoo! was among the other unnamed victims in the attack.

The timing of the compromise is interesting because it coincides with a 0day vulnerability in Adobe Reader. It has been suggested that this was the attack vector. The coincidence is interesting and I think that this claim is fairly credible.

UPDATE: McAfee reports that the compromise was an Internet Explorer 0day:


Our investigation has shown that Internet Explorer is vulnerable on all of Microsoft’s most recent operating system releases, including Windows 7. Still, so far the attacks we’ve seen using this vector have been focused on Internet Explorer 6. Microsoft has been working with us on this matter and we thank them for their collaboration.

While we have identified the Internet Explorer vulnerability as one of the vectors of attack in this incident, many of these targeted attacks often involve a cocktail of zero-day vulnerabilities combined with sophisticated social engineering scenarios. So there very well may be other attack vectors that are not known to us at this time. That said, contrary to some reports our findings to date have not shown a vulnerability in Adobe Reader being a factor in these attacks.




iDefense has stated that they were able to investigate these attack since some of their customers were also hit:


IDefense was called in to help some of the victim companies that Google had uncovered. According to Jellenc, the hackers sent targeted e-mail messages to victims that contained a malicious attachment containing what's known as a zero-day attack. These attacks are typically not detected by antivirus vendors because they exploit a previously unknown software bug.

"There is an attack exploiting a zero-day vulnerability in one of the major document types," Jellenc said. "They infect whichever users they can, and leverage any contact information or any access information on the victim's computer to misrepresent themselves as that victim." The goal is to "infect someone with administrative access to the systems that hold the intellectual property that they're trying to obtain," he added.


The attack vector is very similar to GhostNet, but, it is a very common form of attack. Mikko Hypponen (who is awesome) told the BBC:


"This wasn't in my opinion ground-breaking as an attack. We see this fairly regularly. said Mikko Hypponen, of security firm F-Secure.

"Most companies just never go public," he added.

"Human-rights activists are the biggest target," said Mr Hypponen. "Everyone from Freedom for Tibet to Falun Gong supporters and those involved in Liberation of Taiwan are hit."


I tend to agree. It is not the method of attack that is the story here, its the high profile of the victims and public disclosure by Google as well as Google decision to challenge China's censorship that have made it so interesting. Really, we investigate these kind of attacks (usually on human rights activists) all the time.

In short, a user receives an email, possibly appearing to be from someone that they know who is a real person within his/her organization, with some text -- sometimes specific, sometimes generic -- that urges the user to open an attachment (or visit a web site) usually a PDF or Word Document (but other document types are also common). If the user open that attachment with a vulnerable version of Adobe Reader or Microsoft Office their computer will be compromised. The antivirus detection for these documents is usually relatively low and if the exploit is a 0day -- an exploit for which there is no fox form the vendor available -- the chances of compromise are very good.

After the user's computer is compromised it "checks in" with a command and control server (C&C). These days it is most common for this check in to be an HTTP connection -- it often looks like just another visit to a website -- in which the compromised computer sends some information, usually an IP address and operating system etc... -- and receives a command which it then executes. From there the attacker has full control of the system. The attacker can steal documents, email etc... force the compromised computer to download additional malware and use your infected computer as a mechanism to exploit your contacts or other computers on your network.

One of the things I like to track closely is the network infrastructure of the attackers -- the location of their command and control servers as well as the mechanism of communication and other properties of the malware that allows for seemingly disparate attacks to be linked together. There has been some information published about the command and control servers used in the Google attack. James Mulvenon, who really knows his stuff, stated that the C&C's were in Taiwan, the drop site for stolen stuff was on a US IP:


The attacks appear to have been launched from at least six Internet addresses located in Taiwan, which is a common strategy used by Chinese hackers to mask their origin, said James Mulvenon, director of the Center for Intelligence Research and Analysis at Defense Group Inc. a national-security firm.

They also hijacked the Internet address of a San Antonio-based firm, Rackspace, which is one of the largest Internet-hosting companies in the U.S. They siphoned off the stolen data from Google and other companies to the San Antonio site before sending it overseas, Mr. Mulvenon said. A Rackspace official said, "A server at Rackspace was compromised, disabled, and we actively assisted in the investigation of the cyber attack, fully cooperating with all affected parties."


In addition, a dynamic DNS service was reportedly used:

iDefense obtained samples of the malicious code used in the July attack and the more recent one and found that although the malware was different in the two attacks, the programs both communicated with similar command-and-control servers. The servers each used the HomeLinux DynamicDNS to change their IP address, and both currently pointed to IP addresses belonging to a subset of addresses owned by Linode, a US-based company that offers Virtual Private Server hosting.

“The IP addresses in question are . . . six IP addresses apart from each other,” iDefense said in its statement. “Considering this proximity, it is possible that the two attacks are one and the same, and that the organizations targeted in the [recent] Silicon Valley attacks have been compromised since July.”


UPDATE: Apparently one of the pieces of malware used was the Hydraq Trojan.

And what did the attackers steal? Google stated that there was "theft of intellectual property", some suggest that the attackers stole source code:

But according to iDefense, whose customers include some of the 33 companies that were hacked, the attacks were well targeted and “unusually sophisticated” and aimed at grabbing source code from several hi-tech companies based in Silicon Valley as well as financial institutions and defense contractors.


However, Google stated that the"primary goal of the attackers was accessing the Gmail accounts of Chinese human rights activists" and that the attack was partially successful:


Only two Gmail accounts appear to have been accessed, and that activity was limited to account information (such as the date the account was created) and subject line, rather than the content of emails themselves.


Others state that Google's internal intercept systems were attacked:

That's because they apparently were able to access a system used to help Google comply with search warrants by providing data on Google users, said a source familiar with the situation, who spoke on condition of anonymity because he was not authorized to speak with the press. "Right before Christmas, it was, 'Holy s***, this malware is accessing the internal intercept [systems],'" he said.


Now some people have come forward, a Tibetan activist for example, saying that their email accounts had been breached.

Who is behind the attacks? Google didn't really say who was behind the attacks . iDefense, who may be overreaching here, stated that it was the "Chinese state":

"We confirmed with some clients and partners of ours in the defense contracting community that the IP addresses used to launch the attacks are known to be associated with previous attacks from groups that are either directly employed agents of the Chinese state or amateur hackers that are proxies for them that have attacked other U.S. companies in the past."

In fact, attribution in these sorts of attacks is very difficult. Often people rely on the geolocation of an IP address -- that's not good enough. In these case the C&C's were apparently in Taiwan and the drop site in the US. What does that tell us? Through piecing together seemingly disparate bits of information over time it is possible to make an educated guess. What makes the process difficult and tenuous is that the attackers might be quite different persons from those to ultimately exploit the data the attackers gather. It is the interpretation of the political dimensions of the attack that lead to a determination of who might ultimately have benefited the most form the attack, not technical evidence. Therefore there is room for a lot of uncertainty.

Tuesday, January 12, 2010

Google's New Approach

Google has just announced that there were successful attacks against their infrastructure resulting in the theft of intellectual property. Google traced the attacks to China and although the attribution regarding the Chinese government is unclear, Google also discovered that the attackers also attempted to compromise the Gmail accounts of Chinese human rights activists.

But the most interesting result was due to the combination of attacks, surveillance and censorship Google has decided to reassess their operations in China:


These attacks and the surveillance they have uncovered--combined with the attempts over the past year to further limit free speech on the web--have led us to conclude that we should review the feasibility of our business operations in China. We have decided we are no longer willing to continue censoring our results on Google.cn, and so over the next few weeks we will be discussing with the Chinese government the basis on which we could operate an unfiltered search engine within the law, if at all. We recognize that this may well mean having to shut down Google.cn, and potentially our offices in China.

The decision to review our business operations in China has been incredibly hard, and we know that it will have potentially far-reaching consequences. We want to make clear that this move was driven by our executives in the United States, without the knowledge or involvement of our employees in China who have worked incredibly hard to make Google.cn the success it is today. We are committed to working responsibly to resolve the very difficult issues raised.


Wow.

The connection between censorship, surveillance and attacks is the key. Censorship, such as the blocking of web sites, is fairly crude but effective when combined with targeted surveillance and attacks. While many, especially the technically savvy, can circumvent China's filtering system, the "GFW", using tools such as Psiphon and Tor most Chinese citizens do not. The GFW doesn't have to be 100% technically effective, it just has to serve as a reminder to those in China about what content is acceptable and that which should be avoided. The objective is to influence behaviour toward self-censorship, so that most will not actively seek out banned information of the means to bypass controls and access it.

The nexus of censorship, surveillance and malware attacks allows China is the key to China's information control policies. It is not just about the GFW. Internet users in China face complex threats that are heavily dependent on additional factors, such as involvement in political activities, that involve targeted attacks and surveillance. China chooses when, where and how to exercise this granular control.

The InfoWar Monitor -- which is a partnership between the Citizen Lab, Munk Centre for International Studies, University of Toronto and The SecDev Group (and SecDev.cyber which focuses on Internet threats) -- has been focusing on these threats. For example, in a report "Breaching Trust: An analysis of surveillance and security practices on China’s TOM-Skype platform" we documented how Tom-Skype (the Chinese version of Skype) was censoring and capturing politically sensitive content. In "Tracking GhostNet: Investigating a Cyber Espionage Network" we documented targeted malware attacks that compromised over 1,295 infected computers in 103 countries, 30% of which are high-value targets, including ministries of foreign affairs, embassies, international organizations, news media, and NGOs.

Google's decision to re-asses their operations in China is courageous. I strongly hope that Microsoft, Yahoo! and others follow Google's lead -- as, to their credit, they have done in the past. In "Search Monitor Project: Toward a Measure of Transparency" I compared the censorship practices of Google, Yahoo! and Microsoft as well as the domestic Chinese search engine Baidu and found that all followed Google's lead to some extent by at least disclosing their censorship practices to their users. I hope that they stand by Google.

China, the ball is in your court.

Thursday, January 7, 2010

Malware Market

It's no surprise that there is a malware market, an ecosystem of buyers, sellers and middlemen known as "guarantors". In a very interesting post, "The botnet ecosystem", Vitaly Kamluk explains the way in which this system works. There is a malware market in which malicious code and services are exchanged with the help of trusted third parties -- usually administrators of popular forums. In addition, compromised hosts and stolen credentials are also exchanged.

Here's a microcosm of this ecosystem that I stumbled upon recently. A member of a forum (forum.inattack.ru) called "Brainy" posts an add for a bot system that steals FTP and HTTPS credentials:

brainy

Here's the Google translate version of a post by "brainy":


[brainyframer], bot freymer \ Gruber \ sniffer
20.11.2009, 2:06

I offer you a bot freymer / sniffer / Graber my production [BrainyFramer]
This bot will be a good assistant to many who are professionally engaged cores.

Functional:
Graber-21 FTP client
FTP-sniffer with 37 different clients (web browsers including)
-HTTPS formgraber for IE (5,6,7,8) and FF. For snifa panel hosting (~ 120 different hosts)
-Freymer Semiconductors, distributed processing your list of FTP bots. High speed. Frame akov from the bot after snifa. Removal of foreign code.

Admin at work:
Screen

Progruzheno loader for 100 cars
Article: How to see otstuk 75%
Palimost build in test 4 AB.

____________________________

Price build: 400vmz
____________________________


[!] Everyone who bought a free upgrade.
[!] Change link for free.
[!] Questions, setting free too (IMG: http://html.forum.web-hack.ru/emoticons/smile.gif)
[!] Soft palitsya. I do not crypt. I give the contact person who does it.
[!] On Vista and windows 7 is not working.
-------------------------------------------------- -----------

Answers to frequently asked questions:
------
Question: What palitsya. Traverses a firewall?
A: Soft works in the context of web browsers and FTP client system. If these applications have access to the network, the bot will work.
-----
Q: Why do little in the FTP log
Answer: It depends on your downloads. With 1K purchased downloads usually goes akkov 20-100. 0.5-1K Semiconductors with 1K of purchased downloads is a myth.
If you download from the dor. traffic Kay "download ftp client" then you understand that the FTS in the log will be more.
-----
Q: What about an exchange for ...?
Answer: No, I do not need anything except money.
-----
Question: Is it possible to test?
Answer: I have no desire and time to make someone test. Soft checked in not only me alone.
-----

Asya> 3_5266891_7


brainy2

A forum administrator vouches for brainy, acting as the trsuted middleman or "guarantor". Here's the Google translate version:


Take this software is already long enough. All the alleged author of the software options - do. The author - an appropriate person with whom pleasant girl. Update issued on a regular basis. In general - I recommend.


On a server hosting some other nasty stuff including the Liberty exploit kit I found Brainy's kit:

IP: 210.51.166.220

Domains:

bale.ws
ciao.ws
prefix.ws
hzone666.cn

Here is the readme file that comes with the bot:


Скрипты для [BrainyFramer]

0. conf.php - Настройки базы и рабочих линков
1. create.php - Создает таблицу
3. get.php - Дает боту настройки.
4. check.php - Админка
5. list.txt - Список фтп
6. \logs\ftp.log - Лог c фтп (права 755)
7. \logs\https.log - Лог c https (права 755)
8. grab.dll - Модуль грабера, не трогать!

Как установить эти скрипты?
--------------------------------
-Делаем настройку папки, чтобы поисковые боты не бегали по нашим файлам)
-Создаем базу данных для них, пишем настройки базы , также задаем логин и пасс на админку.
-Запускаем create.php, если все Ок с настройками , то будет надпись "Таблицы созданы"
-Загружаем список фтп акков (список должен быть в простом текст. формате) на сервер в папку с скриптами, имя файла со списком (поумолчанию list.txt) пишем в conf.php
--------------------------------

(с) Brainy 352668917


Google translate:


Scripts for [BrainyFramer]

0. conf.php - Base settings and working links
1. create.php - Creates a table
3. get.php - Gives the bot settings.
4. check.php - Admin
5. list.txt - List of Semiconductors
6. \ logs \ ftp.log - log c Semiconductors (Law 755)
7. \ logs \ https.log - log c https (Law 755)
8. grab.dll - Module Graber, do not touch!

How to install these scripts?
--------------------------------
-Makes setting up a folder to search bots did not run on our files)
-Creating a database for them, write the base configuration, is also asking login and pass on the admin panel.
Run-create.php, if everything is OK with the settings, it will be marked "Table created"
-Load the list of FTP akkov (list must be in plain text. Format) on the server in the folder with the script, the file name from the list (poumolchaniyu list.txt) write in conf.php
--------------------------------

(c) Brainy 352668917


brainy3

Today the list.txt (which contains compromised FTP accounts) has 528 entries. this list has varied over time at one time swelling to 100,000 entries, although many were duplicates. Also, many accounts were taken from public postings of compromised FTP accounts. (Nov 1 - 23632 list.txt, Nov 15 - 100000 list.txt).

The ftp.log file, which are FTP credentials that this instance of the BrainyFramer kit has captured contains 1684 entries. Many are local accounts, anonymous accounts and so on. The 528 entries in list.txt appear to be a cleaned up version of the entries in ftp.log.

The most interesting file is https.log which contains credentials captured from HTTPS sessions. This file is 2.8 MB and contains credentials captured from 2059 unique IP addresses.

infectedhosts

Credentials were captured for users with accounts on 125 sites:


ac-s8.mcafee-sms.com
adklik-adpartner.mynet.com
app.expressemailmarketing.com
applin0.hostedsitebuilder.com
apps.rackspace.com
appserver.5paisa.com
auth.mail.ru
billing.hostley.net
billing.justhost.com
bne003wm.server-secure.com
bolton.eukhost.com
cart.godaddy.com
club.panasonic.jp
dc-au.server-secure.com
domains.live.com
ea.onlineregister.com
echosting.cafe24.com
email.1and1.com
email.secureserver.net
email05.secureserver.net
firstfreedom.securepagehost.com
gator340.hostgator.com
gen.gmarket.co.kr
host1.medcohealth.com
host136.aessuccess.org
hotsms.www.hi.nl
htdatabase.fluidhosting.com
idp.godaddy.com
in.adserver.yahoo.com
intranic.nic.in
irenerobles.readyhosting.com
login.1und1.de
login.bluehost.com
login.hosted-commerce.net
login.mcafee-sms.com
mail.bsf.nic.in
mail.nextpharma.com.tr
mail.nic.in
mailhost.hrhgeology.com
mailserver2.security-forces.com
market.egitimonline.com
market.mynet.com
market.sealonline.co.kr
netac80.vie.hosting.nokia.com
onlinedoctor.lloydspharmacy.com
p2.secure.hostingprod.com
partner.allianz.hu
passport.yandex.ru
portal.bsh-partner.com
rbserver.achievacu.com
rdserver.rd.go.th
register.btinternet.com
register.dailymail.co.uk
register.facebook.com
register.go.com
register.hp.com
register.metro.co.uk
register.outspark.com
register.perfectworld.com
register.remedylife.com
register.scansoft.com
registration.lycos.com
rni.nic.in
secure.domain.com
secure.hostelbookers.com
secure.odlmarkets.com
secure.server101.com
secure.turhost.com
secure.turkishost.com
secure01.bankhost.com
server.iad.liveperson.net
server.lon.liveperson.net
server.ylos.com
server10.dollarsonthenet.net
server11.dollarsonthenet.net
server12.dollarsonthenet.net
server7.dollarsonthenet.net
server8.dollarsonthenet.net
server9.dollarsonthenet.net
serverfarm.pubblica.istruzione.it
sitemail.hostway.com
smsforlife.matssoft.co.uk
sponsorlusms.turkcell.com.tr
sprint.ehosts.net
srv25.trwww.com
secure.turhost.com
suze.ucs.louisiana.edu
webhosting.icicibank.com
webmail-au.server-secure.com
webmail.makromarket.net
webmail.ruc.dk
webmailcluster.perfora.net
webserver.afyon.bel.tr
webserver.zeytinburnu.bel.tr
websms.djezzy.com
www.adbrite.com
www.bostonmarketjobs.com
www.cart32hostingred.com
www.domaindiscount24.net
www.foundationapi.com
www.garantiserver.com
www.gmarket.co.kr
www.gmarket.com.sg
www.godaddy.com
www.handelsregister.de
www.hc.ru
www.host.net.tr
www.hostelsclub.com
www.jetsms.net
www.kaynaksms.com
www.limitsizhosting.com
www.lloydspharmacy.com
www.members.hostiga.com
www.nic.lv
www.nic.ru
www.nic.tr
www.register.bilgi.edu.tr
www.smsodyssey-a01.com
www.speakerrepair.com
www.teknoserver.net
www.topmarketer.net
www.voshost.com
www.webmarket.com.tr
www.webmarketplace.de
www.websms.com.tr
www1.soriana.com


The .ws registrar has suspended the domain names, the Chinese CERT appears to have taken action against the command and control server residing in their IP space, and AusCERT has been a great help with notification. (And thanks to Jose Nazario too).