發表文章

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

Proving Grounds Practice : Craft Walkthrough

圖片
 Proving Grounds Practice : Craft Walkthrough Foothole (立足點 ) : 只有一個 80 Port 且可以上傳 ODT 檔案 建立內涵 Marco 指令執行的 ODT 檔案,使用 Powershell Oneliner 執行拿到 Reverse Shell PE ( 提權 ) : C:\users 發現有 apache 帳號,網站的根目錄有寫入權限 上傳 webshell.php 切換使用者後發現有 SeImpersonatePrivilege 權限 SeImpersonatePrivilege 標準作業提權成功 注意事項 : Kali 使用 libreoffice 建立 Marco 文件檔,ODT 檔案 Powershell Oneliner 永遠是最好的選擇 看到使用者目錄有其他使用者可以先想著切換使用者搞不好就有權限 第一步 Rustscan,└─$ rustscan -a 192.168.205.169 --scripts none --ulimit 5000 | tee rustscan 只有一個 80 Port snmp filtered 沒戲,└─$ sudo nmap -sU -Pn -p 161 192.168.205.169 | tee snmp nmap,└─$ sudo nmap -sCV -A -Pn -p 80 192.168.205.169 | tee nmap 80/tcp open  http    Apache httpd 2.4.48 ((Win64) OpenSSL/1.1.1k PHP/8.0.7) whatweb,└─$ whatweb http://192.168.205.169 | tee whatweb 既然只有一個 80 Port,那就 nikto 先下去掃掃看,└─$ nikto -h 192.168.205.169 沒甚麼發現 80 / 好熟悉的畫面,這個在 Craft2 靶機有看過 參考 :  https://your-it-note.blogspot.com/2024/02/proving-grounds-practice-craft2.html 網頁下方一樣有個履歷檔案上傳的功能 一樣先丟一個 ...

Proving Grounds Practice : Craft2 Walkthrough

圖片
Proving Grounds Practice : Craft2 Walkthrough Foothole (立足點 ) : 網站發現可以上傳 ODT 檔案,利用 python code 產生惡意的 ODT 檔案送出 NetNTLMv2 HASH 破解 Hash 後得到一組帳號密碼,該帳號密碼可以寫入 SMB 目錄即為網站的根目錄 上傳 Windows Reverse Shell php 檔案後執行成功拿到 interactive shell PE ( 提權 ) : 透過本機的 MySQL 服務與使用 Select 語法發現可以寫入 C:\windows\system32 權限 列舉 C:\windows\system32\phoneinfo.dll 是否存在(前提是要有權限可以寫入檔案到該路徑) 利用 Weitrigger.exe (Report.wer 要在同路徑) 去執行惡意的 dll 建立 Reverse Shell 回來 注意事項 : 學習到 ODT 檔是一種 Office 文件檔案,惡意檔案送出後可以丟出 NetNTLMv2 驗證 學習列舉 C:\windows\system32\phoneinfo.dll 是否存在(前提是要有權限可以寫入檔案到該路徑) 建立 phoneinfo.dll payload 後需要使用服務帳號去複製到 C:\windows\system32 底下 學習使用 MySQL 指令  select load_file 與 into dumpfile 的方式去 COPY 檔案 指令範例 select load_file ('C:\\\\xampp\\htdocs\\phoneinfo.dll') into dumpfile 'C:\\\\Windows\\system32\\phoneinfo.dll'; 利用 Weitrigger.exe (Report.wer 要在同路徑) 去執行惡意的 dll 建立 Reverse Shell 回來 Kali IP : 192.168.45.187 靶機 IP : 192.168.244.188 第一步 Ruststan,└─$ rustscan -a 192.168.244.188 --scripts none --ulimit 5000 | tee rust...