Bashed

Port Checking

naabu -host bashed.htb -v

                  __
  ___  ___  ___ _/ /  __ __
 / _ \/ _ \/ _ \/ _ \/ // /
/_//_/\_,_/\_,_/_.__/\_,_/ v2.0.5

		projectdiscovery.io

Use with caution. You are responsible for your actions
Developers assume no liability and are not responsible for any misuse or damage.
[INF] Running CONNECT scan with non root privileges
[DBG] Using host 10.10.10.68 for enumeration
[INF] Found 1 ports on host bashed.htb (10.10.10.68)
bashed.htb:80

Open ports:

  • port 80 web

Visiting the webpage present us with phpbash software , after some googling and poking around it is found that phpbash is a webshell so , the dev might left it somewhere on the website to allow us to execute RCE ?

Directory Fuzzing

/dev seems sus , visiting the webpage show us two php files

Foothold

Multiple reverse shells attempt have been made but this works

Get Stable Shell

Checks

Priv Esc

Cool , user scriptmanager can run anything

config.php

  • No creds found sadly

/scripts was found on root directory

Contents of the folder

  • First glance looks like the file auto run and output to test.txt ?

Content of test.py

  • File content is literally a reverse shell

Change to ip to ours and open listener

Wait a while and walaa

crontab

  • Crontab confirms that there is root cron that run all .py file in /scripts

Last updated