Ghost Writing Binaries
Last updated
Was this helpful?
Last updated
Was this helpful?
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:
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
At the very top of the file add:
Now start by finding any instance of xor
where a register is xor
(ed) against itself.
When something is xor
against it self, it will clear the register to a value of 0
For example look for something like this
Because the normal code execution will clear out any value in eax
we can add additional instructions before the xor
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 is xor
with itself.
Also can add nop
instructions into the program at the correct places.
Testing is your best friend here
Once you are done altering the asm
it is time to convert it back to an exe