Posted onInctfViews: Disqus: Word count in article: 371Reading time ≈1 mins.
Challenge
Extract the flag from another table through the uploaded
filename.
利用上传文件名从另一张表提取 flag。
1
https://webhacking.kr/challenge/web-14/
Analysis
上传请求的 multipart filename 被直接写入
SQL。页面显示字段顺序是 time | ip | file,但 INSERT
的值顺序是 file, time, ip。文件名中的单引号可以结束第一个
file 值,然后追加第二行
INSERT,把子查询结果写进列表可见的文件名列;末尾的 #
注释掉原查询余下部分。列表只显示当前客户端 IP 的记录,因此三处 IP
值必须与当前页面显示的地址一致。