
MSDAT: Инструмент для атак на базы данных Microsoft SQL
| Quentin HARDY |
|---|
| [email protected] |
| [email protected] |
MSDAT (Microsoft SQL Database Attacking Tool) — это инструмент для тестирования на проникновение с открытым исходным кодом, который проверяет безопасность Microsoft SQL баз данных удалённо.
Примеры использования MSDAT:
Протестировано на Microsoft SQL Database 2005, 2008, 2012, 2014, 2016 и 2019.
Благодаря MSDAT (Microsoft SQL Database Attacking Tool) вы можете (неисчерпывающий список):
Для запуска MSDAT необходимо установить некоторые зависимости.
В Ubuntu:
sudo apt-get install freetds-dev
или скачайте freetds с http://www.freetds.org/
Установка зависимостей Python:
sudo pip3 install -r requirements.txt
sudo activate-global-python-argcomplete
или
sudo pip3 install cython colorlog termcolor pymssql argparse python-libnmap
sudo pip3 install argcomplete && sudo activate-global-python-argcomplete
Добавьте "use ntlmv2 = yes" в ваш конфигурационный файл freetds (например, /etc/freetds/freetds.conf или /usr/local/etc/freetds.conf).
Пример:
[global]
# TDS protocol version
tds version = 8.0
use ntlmv2 = yes
python3 msdat.py -h 2 ⨯
usage: msdat.py [-h] [--version]
{all,mssqlinfo,passwordguesser,passwordstealer,xpcmdshell,jobs,smbauthcapture,oleautomation,bulkopen,xpdirectory,trustworthype,userlikepwd,search,cleaner}
...
_ _ __ __ _ ___
| \_/ |/ _|| \ / \|_ _|
| \_/ |\_ \| o ) o || |
|_| |_||__/|__/|_n_||_|
------------------------------------------------------
_ _ __ __ _ ___
| \_/ |/ _| | \ / \ |_ _|
| \_/ |\_ \ | o ) o | | |
|_| |_||__/icrosoft |__/atabase |_n_|ttacking |_|ool
-------------------------------------------------------
By Quentin Hardy ([email protected])
positional arguments:
{all,mssqlinfo,passwordguesser,passwordstealer,xpcmdshell,jobs,smbauthcapture,oleautomation,bulkopen,xpdirectory,trustworthype,userlikepwd,search,cleaner}
Choose a main command
all to run all modules in order to know what it is possible to do
mssqlinfo to get information without authentication
passwordguesser to know valid credentials
passwordstealer to get hashed passowrds
xpcmdshell to get a shell
jobs to execute system commands
smbauthcapture to capture a SMB authentication
oleautomation to read/write file and execute system commands
bulkopen to read a file and scan ports
xpdirectory to list files/drives and to create directories
trustworthype to become sysadmin with the trustwothy database method
userlikepwd to try each MSSQL username stored in the DB like the corresponding pwd
search to search in column names
cleaner clean local traces
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
./msdat.py -h
./msdat.py all -h