Skip to content

Instantly share code, notes, and snippets.

@struppigel
Created November 17, 2024 07:00
Show Gist options
  • Save struppigel/3bc9cd078b607c11f70e01f38a29aed9 to your computer and use it in GitHub Desktop.
Save struppigel/3bc9cd078b607c11f70e01f38a29aed9 to your computer and use it in GitHub Desktop.
Unpacking script x64dbg
// for sample https://malshare.com/sample.php?action=detail&hash=20946142795ea4b9fafad9a279e5da0e2f491f567380d7f37570d451f3aa6b8f
bc
bphwc
bp WriteProcessMemory
run
bc
mov $payload,[esp+c]
// calc size of dump area
mov $pageend, mem.base($payload)
add $pageend, mem.size($payload)
mov $size, $pageend
sub $size, $payload
savedata "dump.tmp", $payload, $size
init "dump.tmp"
bphwc
run // run until entry point
step
bph csp,r,1
run
bphwc
find cip,"E9"
run $result
step
scylla
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment