Pro Feature API
Copy link

The Pro Feature API includes methods that provide access to many of the top-level features in the Metasploit Pro user interface. These methods include launching discovery scans, importing data from other tools, launching automated exploits, running bruteforce attacks, and generating reports. Since these methods are designed to expose all of the functionality available through the user interface, they take a large number of parameters.

pro.start_discover
Copy link

The pro.start_discover method is the backend method that drives the scan action within the Metasploit Pro user interface. This action launches a discovery scan against a range of IP addresses, identifying active hosts, open services, and extracting information from the discovered services. The resulting data is stored in the backend database. The pro.start_discover method takes a large number of options in the form of a single hash parameter and returns a task ID that can be monitored using the Pro task API.

The individual options within the hash are defined below.

ips
Copy link

This option determines what IP addresses and IP ranges to include in the scan. This option is an array of IP addresses and/or IP ranges.

  • Required - Yes
  • Example - [ “192.168.0.0/24” ]

workspace
Copy link

This option indicates the project name that this scan should be part of. This correlates to the full name of the project as listed in the user interface.

  • Required - Yes
  • Example - Project1

username
Copy link

This option specifies which Pro username this scan task should be attributed to. If not specified, the first user with administrative privileges is used.

  • Required - No
  • Example - admin

DS_BLACKLIST_HOSTS
Copy link

This option determines what addresses within the ips range should be excluded from the scan. Multiple entries should be separated by spaces.

  • Required - No
  • Example - 192.168.0.1

DS_PORTSCAN_SPEED
Copy link

This option should be one of Paranoid, Sneaky, Polite, Normal, Aggressive or Insane. These correspond to the common options in the Nmap security scanner and progressively increase the speed of the scan. Insane is actually a reasonable setting for a local Ethernet network.

  • Required - No
  • Example - Insane

DS_PORTS_EXTRA
Copy link

This option allows additional TCP ports to be included in the scan. Ports are specified in Nmap format (ranges separated by –‘s and commas between ranges).

  • Required - No
  • Example - 1-65535

DS_PORTS_BLACKLIST
Copy link

This option defines a list of ports that should always be excluded.

  • Required - No
  • Example - 9100, 1723

DS_PORTS_CUSTOM
Copy link

This option overrides the built-in port list (derived from the loaded exploit modules) and only scans the ports listed.

  • Required - No
  • Example - 1-1024

DS_PORTSCAN_TIMEOUT
Copy link

This option sets the maximum amount of time, in seconds, that the scanner should spend on a single host. If you increase the range of ports to scan with another option, this should also be increased. 300 seconds (5 minutes) is a reasonable setting even for heavily filtered networks.

  • Required - No
  • Example - 300

DS_PORTSCAN_SOURCE_PORT
Copy link

This option configures the source port for the scan. Setting this to 80, 53, or 20 can often bypass poorly configured firewalls and access lists.

  • Required - No
  • Example - 53

DS_CustomNmap
Copy link

This option can be used to completely override the Nmap command line normally used by Pro and replace it (excluding hosts and ports).

  • Required - No
  • Example - -sF -O

DS_UDP_PROBES
Copy link

This option can be used to disable UDP service probes by setting it to false (it is enabled otherwise).

  • Required - No
  • Example - false

DS_FINGER_USERS
Copy link

This option can be used to disable the finger service (79/tcp) automated username harvesting that occurs by default when enabled.

  • Required - No
  • Example - false

DS_SNMP_SCAN
Copy link

This option can be used to disable the SNMP scanner that is normally included in the scan by default. This scanner attempts to guess a small number of common SNMP communities for each targeted host.

  • Required - No
  • Example - false

DS_IDENTIFY_SERVICES
Copy link

This option can be used to disable the service identification phase that is normally triggered when one or services are not identified in the first pass.

  • Required - No
  • Example - false

DS_SMBUser
Copy link

This option can be used to extract additional information from SMB services if a valid username and password is supplied.

  • Required - No
  • Example - Administrator

DS_SMBPass
Copy link

This option defines the password that corresponds to the DS_SMBUser option.

  • Required - No
  • Example - S3cr3t

DS_SMBDomain
Copy link

This option defines the domain that corresponds to the DS_SMBUser option.

  • Required - No
  • Example - CORP

DS_DRY_RUN
Copy link

This option, when set to true, will cause the task to show what it would do, but not actually send any network traffic.

  • Required - No
  • Example - true

DS_SINGLE_SCAN
Copy link

This option, when set to true, will scan each host sequentially instead of multiple hosts at once. Useful for reducing packet loss on especially poor networks.

  • Required - No
  • Example - true

DS_FAST_DETECT
Copy link

This option, when set to true, will limit the scan to a small set of TCP ports.

  • Required - No
  • Example - true

Request Example
Copy link

A sample request to use the default settings to scan 192.168.0.0/24 would look like:

[ "pro.start_discover", "<token>", { "ips" => [ "192.168.0.0/24" ], "workspace" => "Project1" } ]

If we change the same request to scan all 65535 TCP ports, it would look like:

[ "pro.start_discover", "<token>", { "ips" => [ "192.168.0.0/24" ], "workspace" => "Project1", "DS_PORTS_CUSTOM" => "1-65535" } ]

Response Example
Copy link

{ "task_id" => "109" }

pro.start_import
Copy link

The pro.start_import method is what drives the import action within the Metasploit Pro user interface. This method assumes that a file is already on the local disk (relative to the Metasploit Pro system) or that a Nexpose Console has been configured with one or more active sites. To import arbitrary data without having to upload the file to the server first, please see the pro.import_data method instead. The pro.start_import method takes a large number of options in the form of a single hash parameter and returns a task ID that can be monitored using the Pro task API.

The individual options within the hash are defined below.

workspace
Copy link

This option indicates the project name that this import should be part of. This correlates to the full name of the project as listed in the user interface.

  • Required - Yes
  • Example - Project1

username
Copy link

This option specifies which Pro username this task should be attributed to. If not specified, the first user with administrative privileges is used.

  • Required - No
  • Example - admin

DS_PATH
Copy link

This option specifies the server-local file path to import. If you are calling this API from a remote system, it makes more sense to call the pro.import_data API instead.

  • Required - No
  • Example - /tmp/nexpose.xml

DS_BLACKLIST_HOSTS
Copy link

This option determines what addresses should be excluded from the import. Multiple entries should be separated by spaces.

  • Required - No
  • Example - 192.168.0.1

DS_PRESERVE_HOSTS
Copy link

This option can be used to prevent modifications to existing hosts during an import.

  • Required - No
  • Example - true

DS_REMOVE_FILE
Copy link

This option tells the service to delete the file specified as DS_PATH after importing it.

  • Required - No
  • Example - true

DS_ImportTags
Copy link

This option indicates whether to import tags as well as host data when processing a Metasploit Pro export file.

  • Required - No
  • Example - false

DS_NEXPOSE_CONSOLE
Copy link

This option, when combined with the DS_NEXPOSE_SITE parameter, can be used to import data directly from a per-configured Nexpose Console. Leave this blank to import from a file path.

  • Required - No
  • Example - EnterpriseScanner

DS_NEXPOSE_SITE
Copy link

This option, when combined with the DS_NEXPOSE_CONSOLE parameter, can be used to import data directly from an existing Nexpose site. Leave this blank to import from a file path.

  • Required - No
  • Example - Finance

Request Example
Copy link

A sample request to import a Nexpose Export XML would look like:

[ "pro.start_import", "<token>", { "workspace" => "Project1", "DS_PATH" => "/tmp/nexpose.xml" } ]

Response Example
Copy link

{ "task_id" => "109" }

pro.start_nexpose
Copy link

The pro.start_nexpose method is used to launch Nexpose scans directly through the Metasploit Pro service. The pro.start_nexpose method takes a large number of options in the form of a single hash parameter and returns a task ID that can be monitored using the Pro task API.

The individual options within the hash are defined in the table below.

workspace
Copy link

This option indicates the project name that this import should be part of. This correlates to the full name of the project as listed in the user interface.

  • Required - Yes
  • Example - Project1

username
Copy link

This option specifies which Pro username this task should be attributed to. If not specified, the first user with administrative privileges is used.

  • Required - No
  • Example - admin

DS_WHITELIST_HOSTS
Copy link

This option indicates the project name that this import should be part of. This correlates to the full name of the project as listed in the user interface.

  • Required - Yes
  • Example - 192.168.0.0/24

DS_BLACKLIST_HOSTS
Copy link

This option specifies which Pro username this task should be attributed to. If not specified, the first user with administrative privileges is used.

  • Required - No
  • Example - 192.168.0.3

DS_NEXPOSE_HOST
Copy link

This option specifies the list of addresses and network ranges to scan.

  • Required - No
  • Example - 127.0.0.1

DS_NEXPOSE_PORT
Copy link

This option specifies the port of the Nexpose Console.

  • Required - No
  • Example - 3780

DS_NEXPOSE_USER
Copy link

This option specifies a valid username for the Nexpose Console.

  • Required - No
  • Example - nxadmin

nexpose_pass
Copy link

This option specifies the password for the user account. It uses a different syntax to prevent the password from being logged in the Event table.

  • Required - No
  • Example - S3cr3t

DS_SCAN_TEMPLATE
Copy link

The option specifies the scan template to use. The common templates include: pentest-audit full-audit, exhaustive-audit, discovery, aggressive-discovery, and dos-audit.

  • Required - No
  • Example - pentest-audit

Request Example
Copy link

The following shows an example of a request to start a new Nexpose scan:

[ "pro.start_nexpose", "<token>", { "workspace" => "Project1", "DS_WHITELIST_HOSTS" => "192.168.0.0/24", "DS_NEXPOSE_HOST" => "127.0.0.1", "DS_NEXPOSE_PORT" => 3780, "DS_NEXPOSE_USER" => "nxadmin", "nexpose_pass" => "s3cr3t", "DS_SCAN_TEMPLATE" => "pentest-audit" } ]

Response Example
Copy link

{ "task_id" => "109" }

pro.start_bruteforce
Copy link

The pro.start_bruteforce method is used to launch a new Bruteforce task. The pro.start_bruteforce method takes a large number of options in the form of a single hash parameter and returns a task ID that can be monitored using the Pro task API. The bruteforce task requires hosts and services to be present first via scan, import, or Nexpose.

The individual options within the hash are defined in the table below.

workspace
Copy link

This option indicates the project name that this import should be part of. This correlates to the full name of the project as listed in the user interface.

  • Required - Yes
  • Example - Project1

username
Copy link

This option specifies which Pro username this task should be attributed to. If not specified, the first user with administrative privileges is used.

  • Required - No
  • Example - admin

DS_WHITELIST_HOSTS
Copy link

This option specifies the list of addresses and network ranges to test.

  • Required - Yes
  • Example - 192.168.0.0/24

DS_BLACKLIST_HOSTS
Copy link

This option specifies the list of addresses and network ranges to exclude from the target range.

  • Required - No
  • Example - 192.168.0.3

DS_STOP_ON_SUCCESS
Copy link

This option indicates whether the bruteforce attack should continue testing a service after cracking the first account.

  • Required - Yes
  • Example - true

DS_VERBOSE
Copy link

This option indicates how much diagnostic information is shown during bruteforce.

  • Required - No
  • Example - true

DS_INCLUDE_KNOWN
Copy link

This option indicates whether the bruteforce attack should use credentials that were previously found.

  • Required - Yes
  • Example - true

DS_DRY_RUN
Copy link

This option indicates whether to skip the bruteforce attack and just show what usernames and passwords would have been tested.

  • Required - No
  • Example - true

DS_BRUTEFORCE_SCOPE
Copy link

This option indicates what bruteforce mode to operate in. This is one of the following settings: quick, defaults, normal, deep, known, imported, or 50k.

  • Required - Yes
  • Example - normal

DS_BRUTEFORCE_SPEED
Copy link

This option specifies how fast to conduct the bruteforce attack. This is one of the following settings: Glacial, Slow, Stealthy, Normal, Fast, or Turbo.

  • Required - Yes
  • Example - turbo

DS_BRUTEFORCE_SERVICES
Copy link

This option specifies what protocols to test. Multiple protocols should be separated by spaces. Available protocols include: SMB, Postgres, DB2, MySQL, MSSQL, Oracle, HTTP, HTTPS, SSH, Telnet, FTP, EXEC, LOGIN, SHELL, VNC, and SNMP.

  • Required - Yes
  • Example - SSH

DS_BRUTEFORCE_GETSESSION
Copy link

This option specifies whether to use cracked accounts to gain access to the tested systems.

  • Required - Yes
  • Example - true

DS_QUICKMODE_CREDS
Copy link

This option specifies additional credentials to use as part of the bruteforce attack. The syntax is “username” followed by a space, following by the “password”, and a new line “\n” for each credential.

  • Required - No
  • Example - Username Password\n

DS_PAYLOAD_METHOD
Copy link

This option determines what connection method to use when opening sessions, it can be one of auto, reverse, or bind.

  • Required - No
  • Example - auto

DS_PAYLOAD_TYPE
Copy link

This option determines whether to prefer meterpreter or shell session types.

  • Required - No
  • Example - meterpreter

DS_PAYLOAD_PORTS
Copy link

This option specifies the port range to use for bind and reverse connections.

  • Required - No
  • Example - 4000-5000

DS_SMB_DOMAINS
Copy link

This option specifies a list of domains, separated by spaces, to use when brute forcing protocols that speak NTLM.

  • Required - No
  • Example - Domain1

DS_PRESERVE_DOMAINS
Copy link

This option specifies whether to use the original domain name with each username and password previously identified.

  • Required - No
  • Example - true

DS_CRED_FILE_IDS
Copy link

This option specifies what imported credential files to include in this bruteforce task. This requires knowledge of the imported credential file IDs.

  • Required - No
  • Example - 34

DS_MAXGUESSESPERSERVICE
Copy link

This option specifies the maximum number of authentication attempts per service, it defaults to 0 which is unlimited.

  • Required - No
  • Example - 100

DS_MAXMINUTESPERSERVICE
Copy link

This option specifies the maximum amount of time in minutes to spend on each service, it defaults to 0 which is unlimited.

  • Required - No
  • Example - 60

DS_MAXGUESSESPERUSER
Copy link

This option specifies the maximum number of guesses to try for each unique user account, it defaults to 0 which is unlimited.

  • Required - No
  • Example - 3

DS_MAXMINUTESOVERALL
Copy link

This option specifies the maximum amount of time to run for the entire bruteforce task, it defaults to 0 which is unlimited.

  • Required - No
  • Example - 30

DS_MAXGUESSESOVERALL
Copy link

This option specifies the maximum number of guesses to try overall, it defaults to 0 which is unlimited.

  • Required - No
  • Example - 1000

DS_BRUTEFORCE_SKIP_BLANK_PASSWORDS
Copy link

This option specifies whether to skip blank passwords entirely, it defaults to false.

  • Required - No
  • Example - true

DS_BRUTEFORCE_SKIP_MACHINE_NAMES
Copy link

This option specifies whether to skip machine names as a password seed source for the wordlist, it defaults to false.

  • Required - No
  • Example - true

DS_BRUTEFORCE_SKIP_BUILTIN_WINDOWS_ACCOUNTS
Copy link

This option specifies whether to skip builtin Windows accounts that typically do not have weak passwords (service accounts).

  • Required - No
  • Example - true

DS_BRUTEFORCE_SKIP_BLANK_BUILTIN_UNIX_ACCOUNTS
Copy link

This options specifies whether to skip built-in Unix accounts that typically do have weak passwords (service accounts).

  • Required - No
  • Example - true

DS_BRUTEFORCE_RECOMBINE_CREDS
Copy link

This option specifies whether to recombine known, imported, and additional credentials to create the wordlists.

  • Required - No
  • Example - true

DS_MSSQL_WINDOWS_AUTH
Copy link

This option indicates that MSSQL Server authentication should use NTLM instead of Standard mode. This defaults to false.

  • Required - No
  • Example - true

A sample request to start a new Bruteforce task:

Request Example
Copy link

[ "pro.start_bruteforce", "<token>", { "workspace" => "Project1", "DS_WHITELIST_HOSTS" => "192.168.0.0/24", "DS_BRUTEFORCE_SCOPE" => "defaults", "DS_BRUTEFORCE_SERVICES" => "SSH HTTP", "DS_BRUTEFORCE_SPEED" => "TURBO", "DS_INCLUDE_KNOWN" => normal, "DS_BRUTEFORCE_GETSESSION" => true } ]

Response Example
Copy link

{ "task_id" => "109" }

pro.start_exploit
Copy link

The pro.start_exploit method is what drives the exploit action within the Metasploit Pro user interface. The pro.start_exploit method takes a large number of options in the form of a single hash parameter and returns a task ID that can be monitored using the Pro task API. The exploit action requires hosts, services, and optionally vulnerabilities to be present before it can be used. This can be accomplished using the scan, import, and Nexpose actions first.

The individual options within the hash are defined in the table below.

workspace
Copy link

This option indicates the project name that this import should be part of. This correlates to the full name of the project as listed in the user interface.

  • Required - Yes
  • Example - Project1

username
Copy link

This option specifies which Pro username this task should be attributed to. If not specified, the first user with administrative privileges is used.

  • Required - No
  • Example - admin

DS_WHITELIST_HOSTS
Copy link

This option indicates the project name that this import should be part of. This correlates to the full name of the project as listed in the user interface.

  • Required - Yes
  • Example - 192.168.0.0/24

DS_BLACKLIST_HOSTS
Copy link

This option specifies which Pro username this task should be attributed to. If not specified, the first user with administrative privileges is used.

  • Required - No
  • Example - 192.168.0.3

DS_WHITELIST_PORTS
Copy link

This option specifies what ports are allowed during the exploitation task. This defaults to 1-65535 (all ports).

  • Required - No
  • Example - 1-1000

DS_BLACKLIST_PORTS
Copy link

This option determines what addresses should be excluded from the test. Multiple entries should be separated by spaces. This option specifies a list of ports to avoid during the exploitation task.

  • Required - No
  • Example - 80,443

DS_MinimumRank
Copy link

This option specifies the minimum reliability level of exploits to include the exploitation task. This is one of the following settings, in order of increasing liability: low, average, normal, good, great, or excellent.

  • Required - Yes
  • Example - great

DS_EXPLOIT_SPEED
Copy link

This option indicates how many exploits to run in parallel. The default is 5 and a reasonable maximum is 10 due to how resources are allocated.

  • Required - Yes
  • Example - 5

DS_EXPLOIT_TIMEOUT
Copy link

This option sets the maximum amount of time any individual exploit can run. Setting this below 2 minutes can prevent some exploits from working.

  • Required - No
  • Example - 5

DS_LimitSessions
Copy link

This option determines whether to attempt to avoid exploiting systems that already have an active session. The default is true.

  • Required - No
  • Example - false

DS_IgnoreFragileDevices
Copy link

This option specifies whether to avoid running exploits against systems that are known to fall over during common testing. This is based on an internal blacklist and results in printers and many network devices being skipped automatically by the exploit engine. This setting defaults to true.

  • Required - No
  • Example - false

DS_FilterByOS
Copy link

This option instructs the exploit engine to use OS information when matching exploits to hosts. Exploits will only be skipped when the confidence of the OS signature is high. The default for this option is true.

  • Required - No
  • Example - false

DS_OnlyMatch
Copy link

This option, when set to true, instructions to exploit engine to match exploits but not actually run them. The default setting is false.

  • Required - No
  • Example - false

DS_MATCH_VULNS
Copy link

This option instructs the exploit engine to match exploits based on vulnerability references. This setting defaults to true.

  • Required - Yes
  • Example - false

DS_MATCH_PORTS
Copy link

This option instructs the exploit engine to match exploits based on open services. This setting defaults to true.

  • Required - Yes
  • Example - false

DS_PAYLOAD_METHOD
Copy link

This option determines what connection method to use when opening sessions, it can be one of auto, reverse, or bind.

  • Required - No
  • Example - auto

DS_PAYLOAD_TYPE
Copy link

This option determines whether to prefer meterpreter or shell session types.

  • Required - No
  • Example - meterpreter

DS_PAYLOAD_PORTS
Copy link

This option specifies the port range to use for bind and reverse connections.

  • Required - No
  • Example - 4000-5000

DS_EVASION_LEVEL_TCP
Copy link

This option specifies a transport-level evasion level between 0 and 3.

  • Required - No
  • Example - 1

DS_EVASION_LEVEL_APP
Copy link

This option specifies an application-level evasion level between 0 and 3.

  • Required - No
  • Example - 1

DS_ModuleFilter
Copy link

This option specifies a whitelist of module names that are allowed to be run, separated by commas. By default all modules are considered that meet the other criteria.

  • Required - No
  • Example - exploit/windows/smb/psexec

A sample request to run exploits across a network range:

Request Example
Copy link

[ "pro.start_exploit", "<token>", { "workspace" => "Project1", "DS_WHITELIST_HOSTS" => "192.168.0.0/24", "DS_MinimumRank" => "great", "DS_EXPLOIT_SPEED" => 5, "DS_EXPLOIT_TIMEOUT" => 2, "DS_LimitSessions" => true, "DS_MATCH_VULNS" => true, "DS_MATCH_PORTS" => true } ]

Response Example
Copy link

{ "task_id" => "109" }

pro.start_cleanup
Copy link

The pro.start_cleanup method is what drives the Cleanup action within the Metasploit Pro user interface. The pro.start_cleanup method takes a number of options in the form of a single hash parameter and returns a task ID that can be monitored using the Pro task API.

The individual options within the hash are defined in the table below.

workspace
Copy link

This option indicates the project name that this import should be part of. This correlates to the full name of the project as listed in the user interface.

  • Required -Yes
  • Example - Project1

username
Copy link

This option specifies which Pro username this task should be attributed to. If not specified, the first user with administrative privileges is used.

  • Required - No
  • Example - admin

DS_SESSIONS
Copy link

This option specifies a list of session IDs to close. These are RPC service session IDs.

  • Required - Yes
  • Example - 1 2 3

DS_DBSESSIONS
Copy link

This option specifies a list of session IDs by their database identifiers.

  • Required - No
  • Example - 1001 1002

Request Example
Copy link

[ "pro.start_cleanup", "<token>", { "workspace" => "Project1", "DS_SESSIONS" => "100 101 102", } ]

Response Example
Copy link

{ "task_id" => "109" }

pro.start_collect
Copy link

The pro.start_collect method is what drives the Collect action within the Metasploit Pro user interface. The pro.start_collect method takes a number of options in the form of a single Response: parameter and returns a task ID that can be monitored using the Pro task API.

The individual options within the hash are defined in the table below.

workspace
Copy link

This option indicates the project name that this import should be part of. This correlates to the full name of the project as listed in the user interface.

  • Required - Yes
  • Example - Project1

username
Copy link

This option specifies which Pro username this task should be attributed to. If not specified, the first user with administrative privileges is used.

  • Required - No
  • Example - admin

DS_SESSIONS
Copy link

This option specifies a list of session IDs to close. These are RPC service session IDs.

  • Required - Yes
  • Example - 1 2 3

DS_COLLECT_SYSINFO
Copy link

This option indicates whether basic system information should be acquired.

  • Required - Yes
  • Example - true

DS_COLLECT_PASSWD
Copy link

This option indicates whether password and hashes should be acquired.

  • Required - Yes
  • Example - true

DS_COLLECT_SCREENSHOTS
Copy link

This option indicates whether screenshots should be taken.

  • Required - Yes
  • Example - true

DS_COLLECT_SSH
Copy link

This option indicates whether ssh key information should be acquired.

  • Required - Yes
  • Example - true

DS_COLLECT_FILES
Copy link

This option indicates whether specific files matching a pattern should be acquired.

  • Required - Yes
  • Example - true

DS_COLLECT_FILES_PATTERN
Copy link

This option sets the file pattern to automatically download.

  • Required - No
  • Example - *.doc

DS_COLLECT_FILES_COUNT
Copy link

This option sets the maximum number of files to download per session.

  • Required - No
  • Example - 100

DS_COLLECT_FILES_SIZE
Copy link

This option sets the maximum file size to download per file, in kilobytes.

  • Required - No
  • Example - 40

Request Example
Copy link

[ "pro.start_collect", "<token>", { "workspace" => "Project1", "DS_SESSIONS" => "100 101 102", "DS_COLLECT_SYSINFO" => true, "DS_COLLECT_PASSWD" => true, "DS_COLLECT_SCREENSHOTS" => true, "DS_COLLECT_SSH" => true, "DS_COLLECT_FILES" => false } ]

Response Example
Copy link

{ "task_id" => "109" }

pro.start_report
Copy link

The pro.start_report method drives the report actions within the Metasploit Pro user interface. The pro.start_report method takes a number of options in the form of a single hash parameter and returns a task ID that can be monitored using the Pro task API.

The individual options within the hash are defined in the table below.

workspace_name
Copy link

The name of the workspace that you want to use to gather data for the report.

  • Required - Yes
  • Example - Project1
  • Type - String

name
Copy link

The name the report will be saved as.

  • Required - Yes
  • Example - reportABC
  • Type - String

report_type
Copy link

The type of report you want to generate. The report_type can be activity, audit, credentials, collected_evidence, compromised_hosts, custom, fisma, mm_auth, mm_pnd, mm_segment, pci, services, social_engineering, or webapp_assessment.

  • Required - Yes
  • Example - audit
  • Type - String

report_template
Copy link

The template used for custom reports. To specify a template, enter the full file path to the custom Jasper JRXML template.

  • Required - Yes
  • Example - /path/to/custom.jrxml
  • Type - String

Do not use this field unless the report_type is set to ‘custom’.

created_by
Copy link

The username to which the report should be attributed.

  • Required - Yes
  • Example - admin
  • Type - String

file_formats
Copy link

The file formats you want generate for the report. Available file formats include PDF, HTML, RTF, XML, and Word; however, the file formats that are available vary for each report type.

  • Required - Yes
  • Example - pdf
  • Type - Array

The Activity, Web App Assessment, FISMA, and PCI reports do not include the Word format.

Only the PCI and FISMA reports support the XML format.

email_recipients
Copy link

The addresses to which the report should be emailed. Addresses can be separated with comma, semicolon, newlines, or spaces.

mask_credentials
Copy link

Enables or disables the masking of credentials in a report. Set this option to true or false.

  • Required - No
  • Example - true
  • Type - Boolean

included_addresses
Copy link

Includes the specified hosts in the report.

  • Required - No
  • Example - 192.168.1.0/24
  • Type - String

excluded_addresses
Copy link

Excludes the specified hosts from the report.

  • Required - No
  • Example - 192.168.1.1
  • Type - String

logo_path
Copy link

Adds a custom logo to the report’s cover page.

  • Required - No
  • Type - String

You must specify the full path to the image. The image must have agif, png, jpg, or jpeg file type.

se_campaign_id
Copy link

The ID of the social engineering campaign you want to use to gather data for the report.

  • Required - No
  • Example - 1
  • Type - Integer

Only use this field for Social Engineering reports.

sections
Copy link

Identifies the sections you want to include in the report. Only the specified sections will be included. Otherwise, if you do not specify this option, all sections will be included. To see the section names for a report, use the pro.list_report_types method.

  • Required - No
  • Example - cover, project_summary, task_details
  • Type - Array

usernames_reported
Copy link

Includes a list of active users in the Executive summary section of the report. You must provide a comma separated list of user names.

  • Required - No
  • Example - admin1, admin 2
  • Type - String

Request Example
Copy link

[ "pro.report_start", "<token>", { workspace: workspace_name, name: "default_#{Time.now.to_i}", report_type: :audit, created_by: 'whoareyou', file_formats: [:pdf] } ]

pro.report_list
Copy link

The pro.report_list method displays all reports that have been generated in the specified workspace.

pro.list_report_types
Copy link

The pro.list_report_types method displays all the report types that can be generated in a workspace.

pro.report_download
Copy link

The pro.report_download method downloads the specified report and its artifacts.

pro.report_artifact_download
Copy link

The pro.report_artifact_download method downloads the specified report artifact.

pro.start_export
Copy link

The pro.start_export method drives the export actions within the Metasploit Pro user interface.

The individual options within the hash are defined in the table below.

workspace_name
Copy link

The name of the workspace that you want to export data from.

  • Required - Yes
  • Example - project1
  • Type - String

export_type
Copy link

  • Required - Yes

created_by
Copy link

The username to which the export should be attributed.

  • Required - Yes
  • Example - admin
  • Type - String

name
Copy link

The name the export file will be saved as.

  • Required - No
  • Example - reportABC
  • Type - String

mask_credentials
Copy link

Enables or disables the masking of credentials in an export. Set this option to true or false.

  • Required - No
  • Example - true
  • Type - Boolean

included_addresses
Copy link

Includes the specified hosts in the export.

  • Required - No
  • Example - 192.168.1.0/24
  • Type - String

excluded_addresses
Copy link

Excludes the specified hosts from the export.

  • Required - No
  • Example - 192.168.1.1
  • Type - String

pro.export_list
Copy link

The pro.export_list method displays all exports that have been generated in the specified workspace.

pro.export_download
Copy link

The pro.export_download method downloads the specified export file.