Nearly 100 Thai Government websites were hacked and used to serve malware last month. More than 500 distinct attacks were launched from these websites, representing about 85% of all government-hosted malware in the world.
Seven of the hacked sites belong to Thai police forces, such as the Narathiwat Provincial Police website at narathiwat.police.go.th, where hackers have appended a large chunk of malicious VBScript to the page shown below. This script attempts to write malware from a hexadecimal string to a file named svchost.exe on the local file system, and then tries to automatically run the malware contained within the freshly planted executable file.
The filename used in this attack has been deliberately chosen to make it look as though the malware is a legitimate Windows component when it appears in a list of running processes. The genuine svchost.exe file, which normally resides in the Windows\System32 folder, is used as a generic host process name for services that run from DLL files.
Thai military websites were also compromised during April. For example, the Thai Navy website at www.navy.mi.th was involved in a phishing attack which targeted VISA cardholders last week. A page surreptitiously planted on the Navy's server was used to redirect victims to a different website hosted in Malaysia, which attempted to steal card details. The Malaysian website has since been taken down, but the redirection page on the Thai Navy website is still present today:
$ curl -D - http://www.navy.mi.th/namo/libraries/fr/ HTTP/1.1 302 Found Date: Tue, 06 May 2014 08:58:06 GMT Server: Apache X-Powered-By: PHP/5.1.6 Location: http://eproductdesign.com/plugins/ok.php?[...] Content-Length: 0 Connection: close Content-Type: text/html; charset=TIS-620
All of the hacked Thai Government websites use the .go.th second-level domain, which is eligible to be registered only by government entities in Thailand. The .th top-level domain is administered by T.H.NIC Co.,Ltd. (THNIC), which provides its domain registration services under a policy managed by the Thai Network Information Center Foundation, and allows domain names to be purchased through THNIC Authorized Resellers.
.th is also the fourth phishiest top-level domain. Netcraft currently blocks 310 phishing sites under this TLD, which is rather significant given that there are fewer than 100,000 .th sites in total.
Government sites typically confer a greater level of trust than other types of websites can, but in Thailand, many are evidently used to host phishing sites and conduct drive-by malware attacks. Cleaning up these attacks is unlikely to be Thailand's number one priority at the moment — the country has been in a state of paralysis since government elections were obstructed by protesters, and last month, there were concerns that the situation could escalate into civil war.
Chinese government websites (.gov.cn) hosted the second largest number of instances of malware last month, accounting for more than a tenth of all government-hosted malware. Between them, Thailand and China alone hosted 95% of all government-hosted malware during April. For comparison, during the same month, no malware attacks were reported on US or UK government websites (.gov and .gov.uk).