HTB - Usage
by Art10n - Saturday April 13, 2024 at 06:50 PM
#31
path it's /uploads/images/name.php  i was able to bypass the image extension check but i think we have to phar it or it's simpler?
Reply
#32
On the machine, as dash, any hints on how to pivot to xander?
Reply
#33
xender and dash is straight forward
Reply
#34
(Apr 14, 2024, 11:52 AM)sqad Wrote: On the machine, as dash, any hints on how to pivot to xander?

The password is somewhere in dash home directory.
Reply
#35
(Apr 14, 2024, 12:35 PM)mrhi Wrote:
(Apr 14, 2024, 11:52 AM)sqad Wrote: On the machine, as dash, any hints on how to pivot to xander?

The password is somewhere in dash home directory.

Legit saw that file, tried to read it didnt work and moved along even tho google said that was the file to store it.

(Apr 14, 2024, 12:32 PM)3thic4lh4ck3r Wrote:
(Apr 14, 2024, 12:30 PM)osamy7592 Wrote:
(Apr 14, 2024, 12:28 PM)3thic4lh4ck3r Wrote:
(Apr 14, 2024, 12:02 PM)osamy7592 Wrote: guys all u need to make .php run .. from BurpSuite just convert content type from images/jpeg to file/php

after that u gonna get it here --> http://admin.usage.htb/uploads/images/<filename>

(Apr 14, 2024, 12:35 AM)0xRulez Wrote: Rooted Smile

ln -r -s ...

how bro

use burpsuite repeater, keep upload image and convert into .PHP ext then try to trigger revshell on upload/images/your.php URL, if encounter expired or file not found, restart from burpsuite captured step again

bro i know i get a shell as dash but now how to root it

as xander user:
Wildcards Spare tricks | HackTricks | HackTricks


This useful with sudo -l?
Reply
#36
(Apr 14, 2024, 12:42 PM)sqad Wrote:
(Apr 14, 2024, 12:35 PM)mrhi Wrote:
(Apr 14, 2024, 11:52 AM)sqad Wrote: On the machine, as dash, any hints on how to pivot to xander?

The password is somewhere in dash home directory.

Legit saw that file, tried to read it didnt work and moved along even tho google said that was the file to store it.

(Apr 14, 2024, 12:32 PM)3thic4lh4ck3r Wrote:
(Apr 14, 2024, 12:30 PM)osamy7592 Wrote:
(Apr 14, 2024, 12:28 PM)3thic4lh4ck3r Wrote:
(Apr 14, 2024, 12:02 PM)osamy7592 Wrote: guys all u need to make .php run .. from BurpSuite just convert content type from images/jpeg to file/php

after that u gonna get it here --> http://admin.usage.htb/uploads/images/<filename>


how bro

use burpsuite repeater, keep upload image and convert into .PHP ext then try to trigger revshell on upload/images/your.php URL, if encounter expired or file not found, restart from burpsuite captured step again

bro i know i get a shell as dash but now how to root it

as xander user:
Wildcards Spare tricks | HackTricks | HackTricks


This useful with sudo -l?

rooted

overview:

1.forget password vuln to sql injection (use sqlmap)

2. crack the admin hash(browfish) and login

3. file upload(bypass) ---> rce (avatar upload section)

4. get a reverse shell as use dash and get a user flag

5.  check for hidden files and get xander password and login via ssh

6.  with root use this one https://book.hacktricks.xyz/linux-harden...are-tricks u have to read it carefull and u will understand it

7. run the sudo -l and then proceed as sudo binary_usage and u get root flag
Reply
#37
(Apr 14, 2024, 01:31 PM)pwn1 Wrote:
(Apr 14, 2024, 12:42 PM)sqad Wrote:
(Apr 14, 2024, 12:35 PM)mrhi Wrote:
(Apr 14, 2024, 11:52 AM)sqad Wrote: On the machine, as dash, any hints on how to pivot to xander?

The password is somewhere in dash home directory.

Legit saw that file, tried to read it didnt work and moved along even tho google said that was the file to store it.

(Apr 14, 2024, 12:32 PM)3thic4lh4ck3r Wrote:
(Apr 14, 2024, 12:30 PM)osamy7592 Wrote:
(Apr 14, 2024, 12:28 PM)3thic4lh4ck3r Wrote: use burpsuite repeater, keep upload image and convert into .PHP ext then try to trigger revshell on upload/images/your.php URL, if encounter expired or file not found, restart from burpsuite captured step again

bro i know i get a shell as dash but now how to root it

as xander user:
Wildcards Spare tricks | HackTricks | HackTricks


This useful with sudo -l?

rooted

overview:

1.forget password vuln to sql injection (use sqlmap)

2. crack the admin hash(browfish) and login

3. file upload(bypass) ---> rce (avatar upload section)

4. get a reverse shell as use dash and get a user flag

5.  check for hidden files and get xander password and login via ssh

6.  with root use this one https://book.hacktricks.xyz/linux-harden...are-tricks u have to read it carefull and u will understand it

7. run the sudo -l and then proceed as sudo binary_usage and u get root flag

I think I know which one you are talking about just struggling to get it to work now

(Apr 14, 2024, 01:31 PM)pwn1 Wrote:
(Apr 14, 2024, 12:42 PM)sqad Wrote:
(Apr 14, 2024, 12:35 PM)mrhi Wrote:
(Apr 14, 2024, 11:52 AM)sqad Wrote: On the machine, as dash, any hints on how to pivot to xander?

The password is somewhere in dash home directory.

Legit saw that file, tried to read it didnt work and moved along even tho google said that was the file to store it.

(Apr 14, 2024, 12:32 PM)3thic4lh4ck3r Wrote:
(Apr 14, 2024, 12:30 PM)osamy7592 Wrote:
(Apr 14, 2024, 12:28 PM)3thic4lh4ck3r Wrote: use burpsuite repeater, keep upload image and convert into .PHP ext then try to trigger revshell on upload/images/your.php URL, if encounter expired or file not found, restart from burpsuite captured step again

bro i know i get a shell as dash but now how to root it

as xander user:
Wildcards Spare tricks | HackTricks | HackTricks


This useful with sudo -l?

rooted

overview:

1.forget password vuln to sql injection (use sqlmap)

2. crack the admin hash(browfish) and login

3. file upload(bypass) ---> rce (avatar upload section)

4. get a reverse shell as use dash and get a user flag

5.  check for hidden files and get xander password and login via ssh

6.  with root use this one https://book.hacktricks.xyz/linux-harden...are-tricks u have to read it carefull and u will understand it

7. run the sudo -l and then proceed as sudo binary_usage and u get root flag

got the exploit to work found .ssh key but that is completly broken for some reason
Reply
#38
anyway we can get a shell as root? already rooted the box but wondering if i can get a shell as root instead of just reading files
tried to read /etc/shadow but no success

EDIT: you can just read /root/.ssh/id_rsa
Reply
#39
I'm so sad, I can't find the xander pw Sad
Reply
#40
(Apr 14, 2024, 05:57 PM)Kurovoid Wrote: I'm so sad, I can't find the xander pw Sad

nigga just check the files on dash home directory
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Heart [FREE] HackTheBox All Cheatsheets Tamarisk 13 704 34 minutes ago
Last Post: louikizzz
  [FREE] HackTheBox Academy - CBBH CDSA CPTS All Modules Flags Techtom 31 2,952 1 hour ago
Last Post: hwzus47431
  CBBH Write Ups hiddenhacker 24 6,455 2 hours ago
Last Post: reze
  [FREE] CPTS 12 FLAGS pulsebreaker 77 2,527 2 hours ago
Last Post: reze
  HTB Eloquia User and Root Flags - Insane Box 69646B 14 527 2 hours ago
Last Post: zamizamo

Forum Jump:


 Users browsing this forum: 1 Guest(s)