勒索病毒分析之我是你BOOM爸爸
病毒应用
双机自动注销计算机,开始显示一串勒索字符串,点击登录时发现有密码
恶意行为
- 更改管理员账户密码
- 串改注册表启动项(开机绘制文字)
- 强制注销计算机
- 勒索
执行完图
并且强制添加密码
代码分析
分析平台
win7 x86
使用工具
OD
火绒剑
PEID
病毒执行平台
winXp sp3
恶意代码分析
首先这个窗口在双击之后,先创建了一个新的窗口,
0045719B |. FF75 D0 push [local.12] ; /lParam = NULL
0045719E |. FF75 D4 push [local.11] ; |hInst = 00400000
004571A1 |. FF75 D8 push [local.10] ; |hMenu = NULL
004571A4 |. FF75 DC push [local.9] ; |hParent = NULL
004571A7 |. FF75 E0 push [local.8] ; |Height = 0x0
004571AA |. FF75 E4 push [local.7] ; |Width = 0x0
004571AD |. FF75 E8 push [local.6] ; |Y = 0x0
004571B0 |. FF75 EC push [local.5] ; |X = 0x0
004571B3 |. FF75 F0 push [local.4] ; |Style = WS_OVERLAPPED
004571B6 |. FF75 F4 push [local.3] ; |WindowName = ""
004571B9 |. FF75 F8 push [local.2] ; |Class = "Afx:400000:0:10003:1900015:0"
004571BC |. FF75 FC push [local.1] ; |ExtStyle = WS_EX_TOOLWINDOW
004571BF |. FF15 70454600 call dword ptr ds:[<&USER32.CreateWindow>; \CreateWindowExA
通过上面的代码可以看出,创建了一个类名为"Afx:400000:0:10003:1900015:0" 的窗口
在这个窗口的回调函数中,更改注册表,添加了
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\LegalNoticeCaption
和SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\LegalNoticeText
这两个注册表项,并且设置了自动启动时登陆页面显示的文本和信息
```asm
0040121A |> \50 push eax<br/>
0040121B |. 68 04000080 push 0x80000004<br/>
00401220 |. 6A 00 push 0x0<br/>
00401222 |. 68 48544600 push 2.00465448 ; SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\LegalNoticeCaption<br/>
00401227 |. 68 01030080 push 0x80000301<br/>
0040122C |. 6A 00 push 0x0<br/>
0040122E |. 68 04000000 push 0x4<br/>
00401233 |. 68 03000000 push 0x3<br/>
00401238 |. BB 50244000 mov ebx,2.00402450<br/>
0040123D |. E8 1E070000 call 2.00401960</p>
<pre><code>
```asm
00401377 |> \50 push eax
00401378 |. 68 04000080 push 0x80000004
0040137D |. 6A 00 push 0x0
0040137F |. 68 99544600 push 2.00465499 ; SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\LegalNoticeText
00401384 |. 68 01030080 push 0x80000301
00401389 |. 6A 00 push 0x0
0040138B |. 68 04000000 push 0x4
00401390 |. 68 03000000 push 0x3
00401395 |. BB 50244000 mov ebx,2.00402450
0040139A |. E8 C1050000 call 2.00401960
紧接着下一步,更改了管理员账户的密码为:jianjian520
004014B9 |. E8 96040000 call 2.00401954
004014BE |. 83C4 04 add esp,0x4
004014C1 |> FF75 E4 push [local.7]
004014C4 |. 68 E4544600 push 2.004654E4 ; net user administrator
004014C9 |. B9 02000000 mov ecx,0x2
004014CE |. E8 9CFBFFFF call 2.0040106F
完成密码的设置之后,就要强制注销计算机了,但是在注销之前,进行了权限的提升,确保程序能够有足够的权限强制注销
004440E0 |. 50 push eax ; /pVersionInformation = 0012FE64
004440E1 |. FF15 30434600 call dword ptr ds:[<&KERNEL32.GetVersion>; \GetVersionExA
004440E7 |. 8B4424 28 mov eax,dword ptr ss:[esp+0x28]
004440EB |. 5F pop edi ; 001AAA63
004440EC |. 83F8 02 cmp eax,0x2
004440EF |. 75 6C jnz short 2.0044415D
004440F1 |. 8D4C24 00 lea ecx,dword ptr ss:[esp]
004440F5 |. 51 push ecx ; /phToken = 00000001
004440F6 |. 6A 28 push 0x28 ; |DesiredAccess = TOKEN_QUERY|TOKEN_ADJUST_PRIVILEGES
004440F8 |. FF15 98424600 call dword ptr ds:[<&KERNEL32.GetCurrent>; |[GetCurrentProcess
004440FE |. 50 push eax ; |hProcess = 0012FE64
004440FF |. FF15 20404600 call dword ptr ds:[<&ADVAPI32.OpenProces>; \OpenProcessToken
00444105 |. 85C0 test eax,eax
00444107 |. 75 07 jnz short 2.00444110
00444109 |. 81C4 A8000000 add esp,0xA8
0044410F |. C3 retn
00444110 |> 8D5424 08 lea edx,dword ptr ss:[esp+0x8]
00444114 |. 52 push edx ; /pLocalId = 0012FE50
00444115 |. 68 C0E14700 push 2.0047E1C0 ; |SeShutdownPrivilege
0044411A |. 6A 00 push 0x0 ; |SystemName = NULL
0044411C |. FF15 1C404600 call dword ptr ds:[<&ADVAPI32.LookupPriv>; \LookupPrivilegeValueA
00444122 |. 8B4C24 00 mov ecx,dword ptr ss:[esp]
00444126 |. 6A 00 push 0x0 ; /pRetLen = NULL
00444128 |. 6A 00 push 0x0 ; |pPrevState = NULL
0044412A |. 8D4424 0C lea eax,dword ptr ss:[esp+0xC] ; |
0044412E |. 6A 00 push 0x0 ; |PrevStateSize = 0x0
00444130 |. 50 push eax ; |pNewState = 0012FE64
00444131 |. 6A 00 push 0x0 ; |DisableAllPrivileges = FALSE
00444133 |. 51 push ecx ; |hToken = 00000001
00444134 |. C74424 1C 010>mov dword ptr ss:[esp+0x1C],0x1 ; |
0044413C |. C74424 28 020>mov dword ptr ss:[esp+0x28],0x2 ; |
00444144 |. FF15 18404600 call dword ptr ds:[<&ADVAPI32.AdjustToke>; \AdjustTokenPrivileges
在权限提升完毕之后,调用了ExitWindowsEx,并强制进行注销 已显示勒索界面
00444085 > \6A 00 push 0x0 ; /Reserved = 0x0
00444087 . 50 push eax ; |Options = EWX_FORCE
00444088 . FF15 A4434600 call dword ptr ds:[<&USER32.ExitWindowsE>; \ExitWindowsEx
解决方案
- 该病毒样本比较老,目前只能在xp下起作用,所以升级系统
- 不要点可疑的样本
The post 勒索病毒分析之我是你BOOM爸爸 appeared first on cole.
http://ift.tt/2EymbWO VIRUS January 12, 2018 at 08:43AM
评论
发表评论