Skip to main content
  1. CTF Writeups/

Extplorer

·178 words·1 min
Muqaram Majid
Author
Muqaram Majid
Just jotting down my thoughts

Extplorer
#

Overview
#

  • OS: Linux
  • IP: 192.168.192.27
  • Difficulty: Intermediate
  • Platform: OffSec
  • OSCP: Yes
  • Lists: N/A

Summary
#

easy php shell esc privs with exposed pass in config and disk perm for privesc.

Loot
#

Loot
CategoryDetails
Usernames
Passwords
Usernames+Passwords
Hashes
Service Versions

Enumeration
#

Nmap
#

ORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 8.2p1 Ubuntu 4ubuntu0.5 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   3072 98:4e:5d:e1:e6:97:29:6f:d9:e0:d4:82:a8:f6:4f:3f (RSA)
|   256 57:23:57:1f:fd:77:06:be:25:66:61:14:6d:ae:5e:98 (ECDSA)
|_  256 c7:9b:aa:d5:a6:33:35:91:34:1e:ef:cf:61:a8:30:1c (ED25519)
80/tcp open  http    Apache httpd 2.4.41 ((Ubuntu))
|_http-server-header: Apache/2.4.41 (Ubuntu)

Dirbusting
#

I expanded the attack surface with content discovery and followed only the valid hits.

Port 80
#

Exploitation
#

file manager takes us here

so simple

if( !defined( '_JEXEC' ) && !defined( '_VALID_MOS' ) ) die( 'Restricted access' );
        $GLOBALS["users"]=array(
        array('admin','21232f297a57a5a743894a0e4a801fc3','/var/www/html','http://localhost','1','','7',1),
        array('dora','$2a$08$zyiNvVoP/UuSMgO2rKDtLuox.vYj.3hZPVYq3i4oG3/CtgET7CjjS','/var/www/html','http://localhost','1','','0',1),

lets try cracking first, if that doesnt work then lets msql

well that was quick

lets su

that worked, now lets run linpeas

lets try this cuz we have disk priv

https://www.hackingarticles.in/disk-group-privilege-escalation/

we only have read perms hmm

cracking this gave us the pass as explorer

easy