Lab 6: Conditional Jumps
Overview
The purpose of this lab is to get you familiar with recognizing conditional jumps, and identifying the conditions when the jumps will and will not occur.
Part 1: Dexter
For this exercise examine the dexter malware (found at
c:\malware\dexter\dexter.exe
).
Questions
There are three conditional jumps somewhere between the addresses 0x00404270
through 0x004042B6
. For each conditional jump:
- Identify the address of the jump instruction.
- Write out the acronym (e.g. jnle is jump if not less than or equal to).
- Identify the address of the instruction that describes the condition (the one that affects the flags register).
- In your own words, describe the conditions for the jump to occur.
Answer for Conditional Jump 1
0x40427B
jbe
is "jump if below or equal to"- There is a
cmp [ebp+Buffer.RegionSize], 0
at address0x404277
. - Jump if
[ebp+Buffer.RegionSize]
is below or equal to0
.
Answer for Conditional Jump 2
0x404285
jz
is "jump if zero" (same as "jump if equal")- There is a
cmp [ebp+lpBaseAddress], 0
at address0x404281
. - Jump if
[ebp+lpBaseAddress]
is equal to zero.
Answer for Conditional Jump 3
0x4042A1
jbe
is "jump if below or equal to"- There is a
cmp [ebp+Buffer.RegionSize], 64000h
at address0x40429A
. - Jump if
[ebp+Buffer.RegionSize]
is below or equal to0x64000
Part 2: Avzhan
For this exercise examine the avzhan malware (found at
c:\malware\avzhan\avzhan.exe
)
Questions
There are two conditional jumps somewhere between the addresses 0x00405188
through 0x004051C0
. For each conditional jump:
- Identify the address of the jump instruction.
- Write out the acronym (e.g. jnle is jump if not less than or equal to).
- Identify the address of the instruction that describes the condition (the one that affects the flags register).
- In your own words, describe the conditions for the jump to occur.
Answer for Conditional Jump 1
0x405195
jz
is "jump if zero" (same as "jump if equal")- There is a
cmp dword_40C5D0, 1
at address0x40518E
- Jump if
dword_40C5D0
is equal to1
Answer for Conditional Jump 2
0x4051B2
jnz
is "jump if not zero" (same as "jump if not equal")- There is a
dec esi
at address0x4051B1
- Jump if
esi
is not0
Part 3: ActiveX
For this exercise examine the activex malware (found at
c:\malware\activex\activex.exe
)
Questions
There are two conditional jumps somewhere between the addresses 0x00402B70
through 0x00402B86
. For each conditional jump:
- Identify the address of the jump instruction.
- Write out the acronym (e.g. jnle is jump if not less than or equal to).
- Identify the address of the instruction that describes the condition (the one that affects the flags register).
- In your own words, describe the conditions for the jump to occur.
Answer for Conditional Jump 1
0x402B74
jle
is "jump if less than or equal to"- There is a
cmp eax, ecx
at address0x402B72
- Jump if
EAX
is less than or equal toECX
Answer for Conditional Jump 2
0x402B7E
jz
is "jump if zero" (same as "jump if equal")- There is a
test al, al
at address0x402B7C
- Jump if
AL
is0