發表文章

目前顯示的是有「strcmp」標籤的文章

Proving Grounds Play : Potato Walkthrough

圖片
 Proving Grounds Play : Potato Walkthrough Foothold : 80 網站有登入頁面,在 ftp 站台發現登入網頁應該是用 strcmp 函數帶入帳號密碼 參考 strcmp bypass 成功登入與獲取密碼,登入網站後有 POST 讀取指定檔案 修改讀取檔案路徑成功讀取 /etc/passwd 並發現密碼 HASH 存在檔案中 破解密碼後成功 SSH 登入 PE : sudo -l 發現 nice 指令 標準利用 nice 去執行一個 .sh script 新增 root 使用者 但使用的路徑沒有權限寫入,繞個彎改用 linux 的路徑切換到 /tmp 底下的檔案 成功新增 root 使用者,切換使用者提權成功 Rustscan,└─$ rustscan -a 192.168.170.101 --scripts none --ulimit 5000 | tee rustscan snmp check,└─$ sudo nmap -sU -p 161 192.168.170.101 | tee snmp nmap,└─$ sudo nmap -sCV -A -p 22,80,2112 192.168.170.101 | tee nmap 匿名登入 FTP 服務,└─$ ftp 192.168.170.101 -p 2112 發現兩個檔案 index.php.bak、welcome.msg,先抓下來,另外測試上傳 test.txt 沒有成功 看一下 index.php.bak,看來使用者預設密碼是 potato 且帳號密碼變數使用 strcmp 語法,這有名的驗證繞過函數 另外一個 welcome.msg 內容沒有甚麼幫助 80 / 80 /robots.txt gobuster 80,└─$ gobuster -w ./dirfuzzing.txt dir -u http://192.168.170.101 -c -t 150 -x txt,pdf,git,php | tee gobuster 80 /admin 使用幾個常用的帳號密碼組合與 admin:potato 都無法登入 參考 strcmp 繞過  https://www.cnblogs.com/websec/p/7099687.html 由於 ...