Daily Bugle
Compromise a Joomla CMS account via SQLi, practise cracking hashes and escalate your privileges by taking advantage of yum.
Scanning
Nmap
root@ip-10-10-158-163:~# nmap -T4 -A -sV 10.10.233.69
Starting Nmap 7.60 ( https://nmap.org ) at 2021-09-23 10:25 BST
Nmap scan report for ip-10-10-149-191.eu-west-1.compute.internal (10.10.149.191)
Host is up (0.00076s latency).
Not shown: 997 closed ports
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 7.4 (protocol 2.0)
| ssh-hostkey:
| 2048 68:ed:7b:19:7f:ed:14:e6:18:98:6d:c5:88:30:aa:e9 (RSA)
| 256 5c:d6:82:da:b2:19:e3:37:99:fb:96:82:08:70:ee:9d (ECDSA)
|_ 256 d2:a9:75:cf:2f:1e:f5:44:4f:0b:13:c2:0f:d7:37:cc (EdDSA)
80/tcp open http Apache httpd 2.4.6 ((CentOS) PHP/5.6.40)
|_http-generator: Joomla! - Open Source Content Management
| http-robots.txt: 15 disallowed entries
| /joomla/administrator/ /administrator/ /bin/ /cache/
| /cli/ /components/ /includes/ /installation/ /language/
|_/layouts/ /libraries/ /logs/ /modules/ /plugins/ /tmp/
|_http-server-header: Apache/2.4.6 (CentOS) PHP/5.6.40
|_http-title: Home
3306/tcp open mysql MariaDB (unauthorized)
MAC Address: 02:84:4E:61:09:55 (Unknown)
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.60%E=4%D=9/23%OT=22%CT=1%CU=44748%PV=Y%DS=1%DC=D%G=Y%M=02844E%T
OS:M=614C4839%P=x86_64-pc-linux-gnu)SEQ(SP=101%GCD=1%ISR=10C%TI=Z%TS=A)SEQ(
OS:SP=101%GCD=1%ISR=10C%TI=Z%CI=I%TS=A)SEQ(SP=101%GCD=1%ISR=10C%TI=Z%II=I%T
OS:S=A)OPS(O1=M2301ST11NW7%O2=M2301ST11NW7%O3=M2301NNT11NW7%O4=M2301ST11NW7
OS:%O5=M2301ST11NW7%O6=M2301ST11)WIN(W1=68DF%W2=68DF%W3=68DF%W4=68DF%W5=68D
OS:F%W6=68DF)ECN(R=Y%DF=Y%T=40%W=6903%O=M2301NNSNW7%CC=Y%Q=)T1(R=Y%DF=Y%T=4
OS:0%S=O%A=S+%F=AS%RD=0%Q=)T2(R=N)T3(R=N)T4(R=Y%DF=Y%T=40%W=0%S=A%A=Z%F=R%O
OS:=%RD=0%Q=)T5(R=Y%DF=Y%T=40%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)T6(R=Y%DF=Y%T=40
OS:%W=0%S=A%A=Z%F=R%O=%RD=0%Q=)T7(R=Y%DF=Y%T=40%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q
OS:=)U1(R=Y%DF=N%T=40%IPL=164%UN=0%RIPL=G%RID=G%RIPCK=G%RUCK=G%RUD=G)IE(R=Y
OS:%DFI=N%T=40%CD=S)
Network Distance: 1 hop
TRACEROUTE
HOP RTT ADDRESS
1 0.76 ms ip-10-10-149-191.eu-west-1.compute.internal (10.10.149.191)
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 30.87 secondsEnumeration
port 80
directory busting
/administrator this web site run joomla as CMS
check this directory to find version /administrator/manifests/files/joomla.xml
<version>3.7.0</version>
Initial Access
This version infected with SQLi
sqlmap doesn't preform well here so lets use python alternative
username jonah
hashed password $2y$10$0veO/JSFh4389Lluc4Xya.dfy2MF.bZhz0jVMw.V.d3p12kBtZutm
crack it with john
Credentials jonah:spiderman123
go to administrator directory login with Credentials
go to Extensions > Templates > Templates and select Beez3

upload revese php shell

trigger this url http://10.10.233.69/templates/beez3/index.php
now we have reverse shell
jjameson use same password nv5uz9r3ZEDzVjNu
Privilege Escalation
connect target using ssh for more stability
check sudo privilege
yum !! let's check OS
GTFOBins have something for us ...
Last updated