
指定port完整掃描

先開gobuster對80做爆破,同時手動翻nmap找出有趣的路徑或檔案

另因nmap找到的robots.txt內容太多,直接手動瀏覽

直接手動嘗試發現許多檔案、路徑直接403,再翻一下changelog.txt,得知使用drupal 7.54版

searchsploit先搜尋

把檔案co出來

裡面有幾段需要做調整

endpoint_path實際連會發現沒這個路徑,後來在前面的gobuster跑爆破過程中有發現類似路徑rest,實際存取確認成功

再把poc調整一下

另因可poc可直接rce,先調整一下直接讓靶機回連

起http service
發現錯誤訊息

把php內的註解拿掉

在執行一次又會顯示錯誤訊息

繼續拿掉註解,再執行

檢查目前路徑新增的兩個json檔,其中的session應可用來作為登入使用

直接從burp改cookie

重新回到首頁的登入畫面,隨便打個帳密案登入即可以管理者身分登入成功

在Module裡面發現有個功能php filter被關閉,先把他打勾,按儲存

點Add new content->Article,發現可新增貼文,直接用msfvenom產php reverse shell

把內容貼到貼文上,再調整一下內容,移除註解、最後面加上?>,格式選擇php code,先不按儲存

再開msfconsole用handler接好後,點儲存即可回連成功

sysinfo得知為2008

使用https://github.com/SecWiki/windows-kernel-exploits/blob/master/MS15-051/MS15-051-KB3045171.zip

要執行時發現接得不是很穩,常常timeout,直接在做一個reverse tcp

用原本的shell上傳、執行

9998 reverse接成功

執行poc

再來直接傳一個nc上去,透過ms15-051回連即可取得system shell


沒有留言:
張貼留言