Aug 10, 2023, 09:58 AM
Hi everybody. What problem with cookie-monster? PLS any hint
|
HTB Download
by WurumDurum - Sunday August 6, 2023 at 10:38 AM
|
|
Aug 10, 2023, 09:58 AM
Hi everybody. What problem with cookie-monster? PLS any hint
Aug 10, 2023, 11:41 AM
Hi !
I'm also stuck to gaining access to postgres user. I think it's a JSON injection like : "{"flashes":{"info":[],"error":[],"success":["."]},"user":{"id":1,"username":"'WESLEY', process.env.NODE: { startsWith: 'p'"}}"' can someone give us an hint to forge this cookie ? (Aug 10, 2023, 10:56 AM)Bl4ckPwn Wrote: This box is definitely not a medium diffculty it was revised from medium to hard ! and i think it's like an insane one!... i got lfi but i can't enumerate users! i know that prisma client is the key but i can't immaginate how to inject json too!
Aug 10, 2023, 12:16 PM
it's only user : pass
Aug 10, 2023, 12:30 PM
(Aug 10, 2023, 11:41 AM)dsqdqsfqfsdgtru Wrote: Hi ! VERY close my friend, the payload should look more like: {"flashes":{"info":[],"error":[],"success":[]},"user":{"username":"WESLEY", "password": { "startsWith": "p"}}}
Aug 10, 2023, 12:35 PM
(This post was last modified: Aug 10, 2023, 12:37 PM by clotheslineman.)
(Aug 10, 2023, 12:32 PM)mimaf13122 Wrote:(Aug 10, 2023, 12:30 PM)clotheslineman Wrote: VERY close my friend, the payload should look more like: When you send this (notice no password) to /home/: {"flashes":{"info":[],"error":[],"success":[]},"user":{"username":"WESLEY",}} You'll get a page that has all of WESLEY's files since it's searching for files belonging to someone with the username WESLEY. If you send this: {"flashes":{"info":[],"error":[],"success":[]},"user":{"username":"WESLEY", "password": { "startsWith": "p"}}} You'll only get the list of all of WESLEY's files **IFF** his password hash starts with "p", otherwise you'll get a shorter page than what you got with the first cookie. The hashes are stored as hex so the only valid characters to guess are 0-9 and a-f which should make the next steps much easier. You'll essentially be guessing and checking along the lines of this: {"flashes":{"info":[],"error":[],"success":[]},"user":{"username":"WESLEY", "password": { "startsWith": "0"}}} {"flashes":{"info":[],"error":[],"success":[]},"user":{"username":"WESLEY", "password": { "startsWith": "1"}}} {"flashes":{"info":[],"error":[],"success":[]},"user":{"username":"WESLEY", "password": { "startsWith": "2"}}} {"flashes":{"info":[],"error":[],"success":[]},"user":{"username":"WESLEY", "password": { "startsWith": "20"}}} {"flashes":{"info":[],"error":[],"success":[]},"user":{"username":"WESLEY", "password": { "startsWith": "21"}}} {"flashes":{"info":[],"error":[],"success":[]},"user":{"username":"WESLEY", "password": { "startsWith": "22"}}} {"flashes":{"info":[],"error":[],"success":[]},"user":{"username":"WESLEY", "password": { "startsWith": "23"}}} {"flashes":{"info":[],"error":[],"success":[]},"user":{"username":"WESLEY", "password": { "startsWith": "24"}}} {"flashes":{"info":[],"error":[],"success":[]},"user":{"username":"WESLEY", "password": { "startsWith": "240"}}} ...
Aug 10, 2023, 12:46 PM
(This post was last modified: Aug 10, 2023, 12:48 PM by clotheslineman.)
(Aug 10, 2023, 12:40 PM)mimaf13122 Wrote:(Aug 10, 2023, 12:35 PM)clotheslineman Wrote:(Aug 10, 2023, 12:32 PM)mimaf13122 Wrote:(Aug 10, 2023, 12:30 PM)clotheslineman Wrote: VERY close my friend, the payload should look more like: Hey, don't worry about it, I was stuck on it from Sunday until yesterday xD Now if you manage to find a way to root the machine I will be very interested in hearing what you find I personally automated it with a small ~140 line JavaScript program I wrote, but I'm sure there are other methods you could use for that
Aug 10, 2023, 12:54 PM
(Aug 10, 2023, 12:48 PM)mimaf13122 Wrote:(Aug 10, 2023, 12:46 PM)clotheslineman Wrote: Hey, don't worry about it, I was stuck on it from Sunday until yesterday xD Now if you manage to find a way to root the machine I will be very interested in hearing what you findThank you That's entirely fair, I'm starting to think the same The issue is the exploit required (I think) is easy enough to pull off, but I need access to the postgres user in order to do it. I believe this is the exploit we'll have to use since root commonly uses "su -l postgres", but I can't figure out how to get access to that postgres user
(Aug 10, 2023, 12:54 PM)clotheslineman Wrote:(Aug 10, 2023, 12:48 PM)mimaf13122 Wrote:(Aug 10, 2023, 12:46 PM)clotheslineman Wrote: Hey, don't worry about it, I was stuck on it from Sunday until yesterday xD Now if you manage to find a way to root the machine I will be very interested in hearing what you findThank you Getting a shell as root is the same as the shell as postgres, simply exploited differently. They are the same because the creds you find to first gain access to postgres give you {pg_write_server_files} privileges. If you simply write a test file to disk, it will be owned by postrgres. This forum account is currently banned. Ban Length: Permanent (N/A Remaining)
Ban Reason: Spamming | Contact us via http://breachedmw4otc2lhx7nqe4wyxfhpvy32ooz26opvqkmmrbg73c7ooad.onion/contact if you feel this is incorrect.
Aug 10, 2023, 01:54 PM
(Aug 10, 2023, 01:45 PM)cutty Wrote:(Aug 10, 2023, 12:54 PM)clotheslineman Wrote:(Aug 10, 2023, 12:48 PM)mimaf13122 Wrote:(Aug 10, 2023, 12:46 PM)clotheslineman Wrote: Hey, don't worry about it, I was stuck on it from Sunday until yesterday xD Now if you manage to find a way to root the machine I will be very interested in hearing what you findThank you That's the thing, I haven't found where the postgres creds could be reachable. I checked the prisma.schema file which references an environment variable, but /proc/self/environ isn't reachable with the LFI and I can't think of any other way to find it |
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads… | |||||
| Thread | Author | Replies | Views | Last Post | |
| [FREE] HackTheBox Dante - complete writeup written by Tamarisk | 602 | 91,608 |
56 minutes ago Last Post: sabero_exe |
||
| [FREE] CPTS 12 FLAGS | 68 | 1,951 |
9 hours ago Last Post: VictorPipeau |
||
| [FREE] 300+ Writeups PDF HackTheBox/HTB premium retired | 371 | 92,809 |
10 hours ago Last Post: phannguyenbaouy1 |
||
| [FREE] HackTheBox Academy - CBBH CDSA CPTS All Modules Flags | 21 | 2,617 |
Today, 05:08 AM Last Post: popoler |
||
| Hack the box Pro Labs, VIP, VIP+ 1 month free Method | 23 | 2,269 |
Yesterday, 02:10 PM Last Post: kkkato |
||