就在今年上半年,456游戏大厅还是金钱的代名词。一个看起来并不起眼的游戏平台,注册用户却达2000余万,每天获利最高可达100余万。这样的一个游戏大厅,必然是各路木马的兵家必争之地。于是针对456游戏大厅的各种盗号木马、远控木马也都层出不穷。作为一家互联网安全公司,我们当然也是一直在和各类木马作者不断地对抗。怎奈金钱的利益太过诱人,虽然被我们步步紧逼,但木马作者却也从未停止过自己的脚步。
但到今年4月16日,有关456游戏的一切活动戛然而止……
温州龙湾警方将这宗涉案金额堪比全省一年GDP的特大网络开设赌场案破获,涉案人员被抓,456游戏大厅也正式宣告倒台。皮之不存,毛将焉附——依附于456游戏存在的无数木马作者也都跟着销声匿迹了。我们这些互联网安全工作者们仿佛也可以松一口气了。
似曾相识
近日接到用户举报说搜索的时候遇到了一个虚假的670游戏大厅,我们便按照用户的描述找到了这个游戏大厅而一打开这个所谓的“670游戏”的主页,我就感觉不对劲了——这不就是456游戏大厅的主页吗?
将主页页面上挂的游戏平台下载回来之后安装……果然——除了改了几个标题之外,Game456和456游戏的名字还是随处可见
安装完成后,会在桌面上生成一个“670游戏大厅”的快捷方式——直到此时,这个程序还仅仅只是停留在一个简单的“山寨456游戏大厅”的层面,并没有实质的恶意行为。
诡异的快捷方式
点开该快捷方式的属性,乍一看去仿佛还挺正常,但习惯性的用鼠标圈了一下“目标”一栏——怎么这么长!遂将完整目标路径复制下来:
“C:Program FilesKaiLian Tech670游戏UpdatLobby.exe” plat.mod “C:Program FilesKaiLian Tech670游戏Lobby.exe”
定位到目标文件,是一个隐藏的UploadLobby.exe程序,参数则是同样隐藏的Plat.mod文件和真正的游戏大厅主程序lobby.exe
惊现Auto456
UpdatLobby.exe这个程序带有数字签名“AutoIt Consulting Ltd”。
看到这相信很多人都明白了——这是一个AutoIt的解释器——用于解释用AutoIt语言写成的自动化脚本。那么很显然,他指向的Plat.mod就是一个自动化脚本。
不出意料,这个脚本是经过编码的,也就是一个a3x脚本,我们用工具将其转为文本的au3文本——一个多大1800余行的脚本出现在我的眼前。
同样不出意料的,我在脚本中看到了这样的一个久违的变量名——”456exepath”:
而这种利用AutoIt执行恶意代码的手法在456游戏的时代就曾经出现过——我们称其为“Auto456”。
脚本分析
观其1800余行的脚本,封装了大量的WinAPI和GDI+函数。也正是依赖大量的WinAPI的调用,这个AutoIt的脚本实现了一个原本应该是经过编译的可执行程序才会有的强大功能。(以下仅列出其中部分)
01func _winapi_createcompatiblebitmap($hdc,$iwidth,$iheight)
02local$aresult= dllcall("gdi32.dll","handle","createcompatiblebitmap","handle",$hdc,"int",$iwidth,"int",$iheight)
03if@error thenreturnseterror(@error, @extended, 0x00000000)
04return$aresult[0x00000000 ]
05endfunc
06
07func _winapi_createcompatibledc($hdc)
08local$aresult= dllcall("gdi32.dll","handle","createcompatibledc","handle",$hdc)
09if@error thenreturnseterror(@error, @extended, 0x00000000)
10return$aresult[0x00000000 ]
11endfunc
12
13func _winapi_deletedc($hdc)
14local$aresult= dllcall("gdi32.dll","bool","deletedc","handle",$hdc)
15if@error thenreturnseterror(@error, @extended, false)
16return$aresult[0x00000000 ]
17endfunc
18
19func _winapi_deleteobject($hobject)
20local$aresult= dllcall("gdi32.dll","bool","deleteobject","handle",$hobject)
21if@error thenreturnseterror(@error, @extended, false)
22return$aresult[0x00000000 ]
23endfunc
24
25func _winapi_getdc($hwnd)
26local$aresult= dllcall("user32.dll","handle","getdc","hwnd",$hwnd)
27if@error thenreturnseterror(@error, @extended, 0x00000000)
28return$aresult[0x00000000 ]
29endfunc
30
31……
32
33func _gdiplus_encodersgetclsid($sfileext)
34local$aencoders= _gdiplus_encoders()
35for$ii= 0x00000001 to$aencoders[0x00000000 ][0x00000000 ]
36ifstringinstr($aencoders[$ii][0x00000006 ],"*."&$sfileext) > 0x00000000 thenreturn$aencoders[$ii][0x00000001 ]
37next
38returnseterror(- 0x00000001, -0x00000001,"")
39endfunc
40
41func _gdiplus_encodersgetcount()
42
local
$aresult
= dllcall(
$ghgdipdll
,
code class="Brush string" style="font-size: 1em !important; border-top: 0px; height: auto !important; font-family: consolas, 'bitstream vera sans mono', 'courier new', courier, monospace !important; border-right: 0px; width: auto !important; vertical-align
