Weblogic漏洞之弱口令、任意檔案讀取、上傳shell
阿新 • • 發佈:2018-12-10
弱口令
環境啟動後,訪問http://192.168.1.15:7001/console/login/LoginForm.jsp,即為weblogic後臺。
本環境存在弱口令可以直接登入:
- weblogic
- [email protected]
weblogic常用弱口令:
1. Oracle - WebLogic Method HTTP User ID system Password password Level Administrator Doc Notes Login located at /console 2. Oracle - WebLogic Method HTTP User ID weblogic Password weblogic Level Administrator Doc Notes Login located at /console 3. Oracle - WebLogic Version 9.0 Beta (Diablo) User ID weblogic Password weblogic Doc 4. Oracle - WebLogic Process Integrator Version 2.0 User ID admin Password security Doc 5. Oracle - WebLogic Process Integrator Version 2.0 User ID joe Password password Doc 6. Oracle - WebLogic Process Integrator Version 2.0 User ID mary Password password Doc 7. Oracle - WebLogic Process Integrator Version 2.0 User ID system Password security Doc 8. Oracle - WebLogic Process Integrator Version 2.0 User ID wlcsystem Password wlcsystem Doc 9. Oracle - WebLogic Process Integrator Version 2.0 User ID wlpisystem Password wlpisystem Doc
任意檔案讀取漏洞的利用
假設不存在弱口令,如何對weblogic進行滲透?
本環境前臺模擬了一個任意檔案下載漏洞,訪問http://192.168.1.15:7001/hello/file.jsp?path=/etc/passwd可見成功讀取passwd檔案。
那麼,該漏洞如何利用?
讀取後臺使用者密文與金鑰檔案
weblogic密碼使用AES(老版本3DES)加密,對稱加密可解密,只需要找到使用者的密文與加密時的金鑰即可。這兩個檔案均位於base_domain下,名為SerializedSystemIni.dat
和config.xml
,在本環境中為./security/SerializedSystemIni.dat
./config/config.xml
(基於當前目錄/root/Oracle/Middleware/user_projects/domains/base_domain
)。金鑰獲取
SerializedSystemIni.dat是一個二進位制檔案,所以一定要用burpsuite來讀取,用瀏覽器直接下載可能引入一些干擾字元。在burp裡選中讀取到的那一串亂碼,右鍵copy to file就可以儲存成一個檔案:
密文獲取
config.xml是base_domain的全域性配置檔案,所以亂七八糟的內容比較多,找到其中的的值,即為加密後的管理員密碼,不要找錯了:
解密密文
可見,解密後和預設的密碼一致,說明成功。
後臺上傳webshell
獲取到管理員密碼後,登入後臺。點選鎖定並編輯
點選左側的部署,可見一個應用列表:
點選安裝,選擇“上載檔案”:
上傳war包。值得注意的是,我們平時tomcat用的war包不一定能夠成功,你可以將你的webshell放到本專案的web/hello.war這個壓縮包中,再上傳。上傳成功後點下一步。
填寫應用名稱:
繼續一直下一步,最後點完成。
最後訪問執行shell:
http://192.168.1.15:7001/test3693/
參考連結:
http://cirt.net/passwords?criteria=weblogic
https://github.com/vulhub/vulhub/tree/master/weblogic/weak_password