Page cover

🚢Sink HTB

Nmap

so we can see we have 2 port so when we go to the 5000 we see a web and on the 3000 its Gitea

Foot Hold

so when we login into the web but there was nothing so i saw the request

SO IN THIS WE HAVE 2 INFO FIRST WE CAN SEE THE SERVER name AND THE VERSION

and then we can see something new so gone try to find exploit for both of them

HAProxy (High Availability Proxy) is a fast, free, and open-source software solution that functions as a high-availability load balancer and proxy server for TCP and HTTP-based applications.

https://portswigger.net/daily-swig/haproxy-vulnerability-enables-http-request-smuggling-attacks

https://nathandavison.com/blog/haproxy-http-request-smuggling

this is how it look

so after this we got admin cookie and we got three passwd

so this how it look so now we are admin so when we go to the notes then we can see there some password that admin have saved so we gone try then on the Gitea

Initial access

so then with that cred i loged in then in i saw there where 9 commits so i wasted no time and want for them

so we got id_rsa

and then

Shell as David

so we got the user let pwn this now so as we got something in commits so i want to different repo and look for commits i got some commits too

so in that we got keys of aws

so we have keys, so to use aws cli we have to give him keys and all info so he can know where are we from

so after this we saw some local port and then we tried to look for secrets

so we got list of all secrets , then we got one user david

so then i saw david then i looked for david secrets for that i used the cmd blow

so after this we will get the pass of david

To The Root

so now we will do some thing from david so now we have to configure again the aws after configuring the aws then we just try to find some new files so we saw some kind encrypted file in david home folder and those files need some kind of keys

so to see all key we can do this

so aws use kms to manger servers , so then we listed keys now we will try which one will work

so one by one we saw all keys and this is for encryptionalorithms

so then i just want to read some doc and i get to know we can decrypted it with this

https://awscli.amazonaws.com/v2/documentation/api/2.0.34/reference/kms/decrypt.html#examples

this is where i found it

so after this

First we specify the endpoint Second we specify the Key Manager Server Then the ciphertext is used to indicate which file needs to be decrypted . After that, for the output, we provide the text in which the decrypted data should be written. Next, we give the Key ID. Finally, we give the

type, which tells the system which method or format to use for the operation.

then we got some kind of base64 code so i want to cyberchef and de code it and boom in that we file have admin password

hackerman we are in so i tried at web site but ne mean we are admin there already so think maybe it’s for root and i was for root and gg

ssh hacker man we are in gg

So who ever read this till here i know it way to much shit but will do batter if you guys have any kind of suggestion plz let know so i can improve

  • DC user id 861859120806232065, user name extremeudayyt

Last updated