Ghost Writing Binaries
Changing of the Assembly source code, to alter the well known signature used by anti-virus engines.
Overview
Most of the time you dont want to alter the functionality of the binary.
Some additional (outside of Ghostwriting) things that can help with evading signatures are:
Ghost Writing How To
Generate a
msfvenom
payload for example
Now that you have a raw payload, convert it to ASCII
asm source
The Metasm script is a great option to accomplish this
Now open the file in
gedit
Obfuscation of ASM File
At the very top of the file add:
Now start by finding any instance of
xor
where a register isxor
(ed) against itself.When something is
xor
against it self, it will clear the register to a value of 0For example look for something like this
Because the normal code execution will clear out any value in
eax
we can add additional instructions before thexor
Thus we can add this in before the
xor
statement
Also feel free to add in other additional irrelevant instructions before an
xor
occurs. Remember only where an operand isxor
with itself.Also can add
nop
instructions into the program at the correct places.Testing is your best friend here
Convert Back
Once you are done altering the
asm
it is time to convert it back to anexe
Last updated