KIOPTRIX Level 1.2 (#3)
Scanning
We first need to get the target IP.
nmap -sP 192.168.1.0/24
Target IP is 192.168.1.7
nmap
sudo nmap -sV -p- -O -T4 192.168.1.7
-sVdetermine service/version info-T4for faster execution-p-scan all ports-Oidentify Operating System
Starting Nmap 7.91 ( https://nmap.org ) at 2021-07-21 07:48 EDT
Nmap scan report for 192.168.1.7
Host is up (0.00095s latency).
Not shown: 65533 closed ports
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 4.7p1 Debian 8ubuntu1.2 (protocol 2.0)
80/tcp open http Apache httpd 2.2.8 ((Ubuntu) PHP/5.2.4-2ubuntu5.6 with Suhosin-Patch)
Device type: general purpose
Running: Linux 3.X
OS CPE: cpe:/o:linux:linux_kernel:3.2
OS details: Linux 3.2
Network Distance: 2 hops
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 33.73 secondslets take a look on port 80

hit login tab

i tried to brute force credentials but no result
close enough ...
lets check this CMS
lets try this
​ LotusCMS 3.0 - 'eval()' Remote Command Execution (Metasploit)
Gaining Access
fire msfconsole
check config files
open this file
Now we have username and password for phpmyadmin
lets check it ... http://192.168.1.7/phpmyadmin/
we IN <3

after check existing DB i find this


open this table ...

Finding this ... developer credentials
but it hashed lets decrypt it using hashes.com
Username
Password
dreg
Mast3r
loneferret
starwars
step back we still have shell
lets view /etc/passwd
loneferret -> /bin/bash
loneferret had normal shell lets try to hit it using ssh
note : we avoid using dreg because account shell is restricted "rbash"
Privilege Escalation
at this point we can run enu4linux but wait ...
lets check user privilege
check history
sudo ht looks juicy lets hit it ...
this Appear ...

its an IN-Terminal text editor like nano, vim, ...
we had sudo privilege with this app
lets try edit /etc/sudoers
f3 to open file

hit enter now we need to add /bin/su privilege to current account

f2 save
Last updated