Skip to content
BrianWGray edited this page Dec 1, 2014 · 6 revisions

Nexpose client script index

./conf/nexpose.yaml

Status: Active

Summary:

nexpose.yaml, stores script configurations so they may be shared amongst multiple scripts.

Usage:

This configuration file is called from within nexpose-client scripts to populate common re-used variables.

Requirements:

assetGroupQuery.rb

Status: Active

Summary:

assetGroupQuery.rb generates a csv export for an asset group when provided the asset group's ID.

Usage:

Requirements:

adhocScanGen.rb

Status: Active

Summary:

Script performs the following tasks

  1. Read addresses from text file
  2. De-duplicate addresses
  3. Create new temporary site
  4. Add addresses to the created site
  5. Specify scan engine and template to use from nexpose.yaml
  6. Perform scan of the temporary site.
  7. Generate a report of vulnerabilities detected
  8. Delete temporary site.

Usage:

Requirements:

assetGroupQuery.rb

Status: Active

Summary: assetGroupQuery.rb generates a csv export for an asset group when provided the asset group's ID.

Usage:

Requirements:

createAssetGroup.rb

Status: Active

Summary:

Performs the following tasks independently of having a yaml configuration file available.

Script performs the following tasks

  1. Read addresses from text file
  2. De-duplicate addresses
  3. Create new asset group
  4. Add addresses to the created asset group

Usage:

Requirements:

create_asset_group.rb

Status: Active

Summary:

Script performs the following tasks

  1. Read addresses from text file
  2. De-duplicate addresses
  3. Create new asset group
  4. Add addresses to the created asset group

Usage:

Requirements:

dbMaint.rb

Status: Active

Summary:

Script runs the following database maintenance tasks

  1. Clean up database - Removes any unnecessary data from the database
  2. Compress database tables - Compresses the database tables and reclaims unused, allocated space.
  3. Reindex database - Drops and recreates the database indexes for improved performance.

Usage:

Requirements:

nexposeBackup.rb

Status: Active

Summary:

Script generates a Platform Independent application backup.

Usage:

openPortQuery.rb

Status: Active

Summary:

Lists all assets with a specified port detected as being open.

Usage:

Requirements:

scanAssetGroup.rb

Status: Active

Summary:

Performs the following tasks independently of having a yaml configuration file available.

Script performs the following tasks

  1. Initiates scans for assets located within a specified asset Group ID

Usage:

Requirements:

scan_asset_group.rb

Status: Active

Summary:

Script performs the following tasks

1. Initiates scans for assets located within a specified asset Group ID

Usage:

updateEmailAlerts.rb

Status: Active

Summary:

Script performs the following

  1. Parses all sites for SMTP alerts
  2. Finds SMTP alerts that contain a provided email address
  3. Replaces found email address with new email address

Usage:

Requirements:

vulnIDQuery.rb

Status: Active

Summary:

Lists all assets with a specified vulnerability ID being detected.

Usage:

Requirements:

stopPausedScans.rb

Status: Dev-Functional

Summary:

Script performs the following tasks 1.) Retrieve a list of paused scans from a console. 2.) Iteratively stop scans that have paused without completing. 3.) TODO: Massive code cleanup + efficiency improvements.

Usage:

ruby stopPausedScans.rb

Requirements:

require 'yaml' require 'nexpose'

./conf/nexpose.yaml

scanCleanup.rb

Status: Active

Summary:

Resume paused scans, the script logs into the configured Nexpose Console, checks for active scans and paused scans. The script will resume paused scans and track them in a queue. The default queue size is 5 (configurable in the nexpose.yaml file.) The script resumes paused scans and stores them in the queue. The queue is refreshed until there are no paused or running scans left. If the queue has empty slots the script will resume paused scans to fill the empty slots.

The script is intended to run through large batches of paused scans that may have been paused due to an overloaded console. This is why the queue runs in batches to ensure that the console is not over taxed.

Script performs the following tasks 1.) Retrieve a list of paused scans from a console. 2.) Retrieve a list of active scans from a console. 3.) Iteratively resume scans in batches for scans that have paused without completing. 4.) TODO: Massive code cleanup + efficiency improvements.

Usage:

ruby scanCleanup.rb

Requirements:

require 'yaml' require 'nexpose'

./conf/nexpose.yaml

discoveryCount.rb

Status: Active

Summary:

Script performs the following tasks 1.) Retrieve a list of available sites from a console. 2.) Retrieve address entries for each site. 3.) Convert address ranges to ip address counts 4.) Provide a total of addresses per site. 5.) Provide a total count of addresses for all sites combined.

Usage:

ruby discoveryCount.rb

Requirements:

require 'yaml' require 'nexpose' require 'ipaddr'

./conf/nexpose.yaml