Module: Msf::Payload::Adapter::Fetch::LinuxOptions
- Defined in:
- lib/msf/core/payload/adapter/fetch/linux_options.rb
Overview
Mixin that registers Linux-specific fetch payload options.
Instance Method Summary collapse
Instance Method Details
#initialize(info = {}) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/msf/core/payload/adapter/fetch/linux_options.rb', line 3 def initialize(info = {}) super ( [ Msf::OptEnum.new('FETCH_COMMAND', [true, 'Command to fetch payload', 'CURL', %w[CURL FTP GET TFTP TNFTP WGET]]), Msf::OptEnum.new('FETCH_FILELESS', [true, 'Attempt to run payload without touching disk by using anonymous handles, requires Linux ≥3.17 (for Python variant also Python ≥3.8, tested shells are sh, bash, zsh)', 'none', ['none', 'python3.8+', 'shell-search', 'shell']]), Msf::OptString.new('FETCH_FILENAME', [ false, 'Name to use on remote system when storing payload; cannot contain spaces or slashes', Rex::Text.rand_text_alpha(rand(8..12))], regex: %r{^[^\s/\\]*$}, conditions: ['FETCH_FILELESS', '==', 'none']), Msf::OptBool.new('FETCH_PIPE', [true, 'Host both the binary payload and the command so it can be piped directly to the shell.', false], conditions: ['FETCH_COMMAND', 'in', %w[CURL GET WGET]]), Msf::OptString.new('FETCH_WRITABLE_DIR', [ true, 'Remote writable dir to store payload; cannot contain spaces', './'], regex: /^\S*$/, conditions: ['FETCH_FILELESS', '==', 'none']) ] ) end |