發表文章

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

Proving Grounds Practice : Nibbles Walkthrough

圖片
 Proving Grounds Practice : Nibbles Walkthrough Foothole (立足點 ) : 5437 Port 發現 postgres database,使用 dbeaver 工具待遇設帳號密碼嘗試進入成功 使用建立 Table 的方式列舉檔案,但沒有結果 使用建立 Table 的方式塞入 command,使用 nc 建立 reverse shell 成功進入系統 PE ( 提權 ) : SUID 發現 find 指令可以利用,利用後成功拿到 root 注意事項 : Reverse Shell 測試連回來 80 & 445 才有通 要完全 root 可以透過寫入 /root/.ssh/authorized_keys 的方式來登入 Rustscan,└─$ rustscan -a 192.168.181.47 --scripts none  --ulimit 5000 | tee rustscan snmp filtered,└─$ sudo nmap -sU -p 161 192.168.181.47 | tee snmp nmap,└─$ sudo nmap -sCV -A -p 21,22,80,5437 192.168.181.47 | tee nmap 21/tcp   open  ftp        vsftpd 3.0.3 22/tcp   open  ssh        OpenSSH 7.9p1 Debian 10+deb10u2 (protocol 2.0) 80/tcp   open  http       Apache httpd 2.4.38 ((Debian)) 5437/tcp open  postgresql PostgreSQL DB 11.3 - 11.9 FTP 匿名登入失敗 FTP ftp:ftp 登入失敗 80 / 80 /robots.txt 80 /page2.html gobuster,沒有發現有用的 URI 啟動 DB 連線工具 db...

Proving Grounds Practice : Fail Walkthrough

圖片
 Proving Grounds Practice : Fail Walkthrough Foothole (立足點 ) : 873 Port 是 rsync 標準 Port 利用 rsync 寫入檔案的權限上傳 authorized_keys 使用 id_rsa KEY 登入系統 PE ( 提權 ) : 發現 Fail2ban 系統且相關檔案有寫入的權限 利用觸發 IPS 寫黑名單的設定檔,寫入一筆執行 Reverse Shell 利用 Hydra 大量 Try 密碼觸發機制拿到 Reverse Shell 注意事項 : rsync 的標準利用 IPS Fail2ban 的利用 第一步 Rustscan, └─$ rustscan -a 192.168.207.126 --scripts none --ulimit 5000 | tee rustscan 只有兩個 Port 22、873,看來不是很簡單就是很難搞 snmp closed,└─$ sudo nmap -sU -p 161 192.168.207.126 | tee snmp nmap,└─$ sudo nmap -sCV -A -p 22,873 192.168.207.126 | tee nmap 22/tcp  open  ssh     OpenSSH 7.9p1 Debian 10+deb10u2 (protocol 2.0) 873/tcp open  rsync   (protocol version 31) └─$ searchsploit rsync                                     使用 21242 然後 └─$ gcc 21242.c -o 21242,出現一堆錯誤 改搜尋最好用的 Hacktricks 關鍵字 873 & Rsync 參考 :  https://book.hacktricks.xyz/network-services-pentesti...