Blog
Billy Joel made a Wordpress blog!
Scanning
nmap
starting with nmap scan check open ports and apply some scripts
$ nmap -sV -sC 10.10.64.200
Starting Nmap 7.60 ( https://nmap.org ) at 2021-10-04 00:48 BST
Nmap scan report for ip-10-10-64-200.eu-west-1.compute.internal (10.10.64.200)
Host is up (0.00058s latency).
Not shown: 996 closed ports
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 2048 57:8a:da:90:ba:ed:3a:47:0c:05:a3:f7:a8:0a:8d:78 (RSA)
| 256 c2:64:ef:ab:b1:9a:1c:87:58:7c:4b:d5:0f:20:46:26 (ECDSA)
|_ 256 5a:f2:62:92:11:8e:ad:8a:9b:23:82:2d:ad:53:bc:16 (EdDSA)
80/tcp open http Apache httpd 2.4.29 ((Ubuntu))
|_http-generator: WordPress 5.0
| http-robots.txt: 1 disallowed entry
|_/wp-admin/
|_http-server-header: Apache/2.4.29 (Ubuntu)
|_http-title: Billy Joel's IT Blog – The IT blog
139/tcp open netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP)
445/tcp open netbios-ssn Samba smbd 4.7.6-Ubuntu (workgroup: WORKGROUP)
MAC Address: 02:24:8D:C5:10:C9 (Unknown)
Service Info: Host: BLOG; OS: Linux; CPE: cpe:/o:linux:linux_kernel
Host script results:
|_clock-skew: mean: -1s, deviation: 0s, median: -1s
|_nbstat: NetBIOS name: BLOG, NetBIOS user: <unknown>, NetBIOS MAC: <unknown> (unknown)
| smb-os-discovery:
| OS: Windows 6.1 (Samba 4.7.6-Ubuntu)
| Computer name: blog
| NetBIOS computer name: BLOG\x00
| Domain name: \x00
| FQDN: blog
|_ System time: 2021-10-03T23:48:52+00:00
| smb-security-mode:
| account_used: guest
| authentication_level: user
| challenge_response: supported
|_ message_signing: disabled (dangerous, but default)
| smb2-security-mode:
| 2.02:
|_ Message signing enabled but not required
| smb2-time:
| date: 2021-10-04 00:48:52
|_ start_date: 1600-12-31 23:58:45
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 14.07 seconds22 SSH 80 HTTP 139,445 SMB
Enumeration
Port 139,445
check metadata and any included binaries Nothing here
Port 80
this web server running WordPress
lets enumerate some data
i found 2 users kwheel, bjoel
Initial Access
Brute Force
lets brute force passwords for these users
Credentials kwheel:cutiepie1
Version wordpress 5.0
Vulnerable WP Version
i'll use this module WordPress Core 5.0.0 - Crop-image Shell Upload (Metasploit)
Privilege Escalation
SUID
searching for sticky bit
/usr/sbin/checker this file looks interesting lets run it
The executable is a 64bit ELF
Running it with ltrace reveals that the executable is checking an environment variable adminto determine if we are an admin
Let’s create an admin environment variable and set it at 1
Last updated