Rapid7’s 2026 Global Cybersecurity Summit is now available on-demand.Watch sessions.
Rapid7

module

Microsoft SQL Server Find and Sample Data

Disclosed
N/A
Created
May 30, 2018

Description

This script will search through all of the non-default databases
on the SQL Server for columns that match the keywords defined in the TSQL KEYWORDS
option. If column names are found that match the defined keywords and data is present
in the associated tables, the script will select a sample of the records from each of
the affected tables. The sample size is determined by the SAMPLE_SIZE option, and results
output in a CSV format.

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':


msf > use auxiliary/admin/mssql/mssql_findandsampledata
msf auxiliary(mssql_findandsampledata) > show actions
...actions...
msf auxiliary(mssql_findandsampledata) > set ACTION < action-name >
msf auxiliary(mssql_findandsampledata) > show options
...show and set options...
msf auxiliary(mssql_findandsampledata) > run

Title
Rapid7 Labs

2026 Global Threat Landscape Report

The predictive window has collapsed. Exploitation follows disclosure in days. See how attackers are accelerating and how to stay ahead.