InfosecPrep

wordpress suid

  • Nom machine : InfosecPrep

  • Difficulté : Facile

  • OS : Linux

Enumération

NMAP

Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-08-26 09:14 EDT
Nmap scan report for 192.168.228.89
Host is up (0.033s latency).
Not shown: 65532 closed tcp ports (conn-refused)
PORT      STATE SERVICE VERSION
22/tcp    open  ssh     OpenSSH 8.2p1 Ubuntu 4ubuntu0.1 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   3072 91:ba:0d:d4:39:05:e3:13:55:57:8f:1b:46:90:db:e4 (RSA)
|   256 0f:35:d1:a1:31:f2:f6:aa:75:e8:17:01:e7:1e:d1:d5 (ECDSA)
|_  256 af:f1:53:ea:7b:4d:d7:fa:d8:de:0d:f2:28:fc:86:d7 (ED25519)
80/tcp    open  http    Apache httpd 2.4.41 ((Ubuntu))
| http-robots.txt: 1 disallowed entry 
|_/secret.txt
|_http-server-header: Apache/2.4.41 (Ubuntu)
|_http-title: OSCP Voucher – Just another WordPress site
|_http-generator: WordPress 5.4.2
33060/tcp open  mysqlx?
| fingerprint-strings: 
|   DNSStatusRequestTCP, LDAPSearchReq, NotesRPC, SSLSessionReq, TLSSessionReq, X11Probe, afp: 
|     Invalid message"
|_    HY000

HTTP (80)

Nous allons voir le fichier secret.txt découvert grâce à nmap

Sur la page d'accueil, on nous expliquer que le seul utilisateur est : oscp. Il était aussi possible de décoder le base64 pour trouver le nom d'utilisateur.

On se connecte via ssh

Elévation des privilèges

lxd et sudo sont intéressants. Nous trouvons aussi :

Et également :

Mis à jour