Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;;;;;;;;;;;obfuscation.asm
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- format PE GUI 4.0
- entry start
- include 'win32ax.inc'
- include 'obfuscation.inc'
- ;include 'api\kernel32.inc'
- section '.code' code readable executable
- start:
- push ebp
- mov ebp, esp
- x_call 'kernel32'
- pop edx
- invoke LoadLibrary, edx
- x_call 'CreateRemoteThread'
- pop edx
- invoke GetProcAddress, eax, edx
- section '.idata' import readable
- library kernel32, 'kernel32.DLL'
- import kernel32, \
- GetProcAddress, 'GetProcAddress', \
- LoadLibrary, 'LoadLibraryA'
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;;;;;obfuscation.inc
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- macro x_call str
- {
- local size, .x, .s, .l, x, v
- if str eqtype ''
- call .s
- .x db str, 0
- size = ($ - .x)
- if ~ size eq
- load x BYTE from (.x)
- repeat size
- load v BYTE from .x + % - 1
- store BYTE v xor x at .x + % - 1
- end repeat
- .s:
- push ecx
- push edx
- mov ecx, size
- mov edx, .x
- .l:
- xor BYTE [edx+ecx-1], x
- loop .l
- pop edx
- pop ecx
- end if
- else
- push str
- end if
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement