Skip to content

Commands

Maxime Landon edited this page Dec 11, 2019 · 1 revision

Database

Database

  • db.source.connect {source_name} Connect to data source
  • db.source.show Show all data sources
  • db.source.add Add data source based on current db.source parameters
  • db.source.delete {source_name} Delete a data source
  • db.file.export Generate export file
  • db.file.import Import Data file

Parameters

  • db.file.export.format Specify output format

  • db.file.export.filename Specify filename

  • db.file.import.filepath Specify import file path

  • db.source.url

  • db.source.certificate

  • db.source.priv

  • db.source.password


Entities

Hosts

  • hosts show all Various search filters for hosts
  • hosts show ip
  • hosts show mac
  • hosts show os
  • hosts show name
  • hosts show purpose
  • hosts show filter

Services

  • services show all Various search filters for services
  • services show port
  • services show proto
  • services show name
  • services show info
  • services show state
  • services show filter

Creds

  • creds show all Various search filters for creds
  • creds show type
  • creds show priv
  • creds show filter

Notes

  • notes show all Various search filters for creds
  • notes show host
  • notes show filter

And other filters


Listeners

Listeners show all listeners launched from modules in the session

  • listeners.show {all, listener_name} Show one or more listeners
  • listeners.kill (all, listener_name) Kill some or all listeners
  • listeners.rename current new Rename listener
  • listeners.duplicate {listener_name} Duplicate listener and launch it

Variables

Note: The "advanced" option classification, inspired from Metasploit, might only be useful as a display filter/structure, not as a command filter. Maybe these commands will be removed

Variables

  • global.show Show all global variables
  • global.options.{all_known_modules_options} (value) Set global option
  • global.options.{all_known_modules_options} unset Unset global option

Modules

Edit

  • edit Edit current module
  • loadpath Load code path
  • reload (all|lib|module) reload all modules

Exploits

  • use multi/windows/java Load a module and make it active
  • exploit.options.show Show module options
  • exploit.advanced Show module options
  • exploit.payloads.show Use compatible payload
  • exploit.payloads.set path/to/payload Use compatible payload
  • exploit.encoders.show Use compatible encoder
  • exploit.encoders.set path/to/encoder Use compatible encoder
  • exploit.run Run exploit

Parameters

  • exploit.options.{exploit_generic} value Set module options
  • exploit.advanced.{exploit_specific} Set advanced options

Examples

  • exploit.options.URL Set URL path
  • exploit.options.target (target_list) Set target type
  • exploit.options.LHOST Set local host
  • exploit.options.RHOST Set remote host

Payloads

  • payload.load windows/x64/shell/reverse_https
  • payload.handler
  • payload.generate

Parameters

  • payload.options.{payload_generic}
  • payload.advanced.{payload_specific}

Goes on for evasion, post, auxiliary

Clone this wiki locally