#Cybermonday
by hooneyman - Saturday August 19, 2023 at 08:16 PM
#1
I'm Starting with Cybermonday #hard machine... Big Grin  we can to put our hints here for help.


22/tcp open  ssh    syn-ack ttl 63
80/tcp open  http    syn-ack ttl 62


in cybermonday.htb/.htacess 

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>

    RewriteEngine On

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]

    # Send Requests To Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>


But i think right path is injecting SQL or working with LARAVEL.. i got some errors with laravel console.
#2
May be shall we forge the JWT Token.

But it seems to be corrupted (incorrect signature)
#3
laravel error page - thought command injection, no dice?
#4
(Aug 19, 2023, 08:45 PM)HerVelizy Wrote: May be shall we forge the JWT Token.
It's not a JWT token, it's just a JSON encoded in B64. Notice that there aren't any dots in the cookie ^^"

I think we should keep on trying to exfiltrate via the 500 error stacktrace thing...
#5
Updating a profiles email with an empty box takes you to the illuminate stackstrace and leaks the SQL queries. They're using prepared statements, so it doesn't look like they're vulnerable. Username field doesn't seem to be exploitable with SSTI. Figured out that login request can be JSON too, so I tried to bypass with null values in json and also no luck. Potentially we are missing something within enumeration? Is there a way to get entire files from illuminate?
#6
Connecting to http://cybermonday.htb/assets../.env gives you the .env file. This gives you the APP_KEY variable, so now it's possible to forge the Laravel token and possibly get access as admin to reach dashboard. After looking around in the code, there should be a file upload in the dashboard to create a new product.

APP_NAME=CyberMonday
APP_ENV=local
APP_KEY=base64:EX3zUxJkzEAY2xM4pbOfYMJus+bjx6V25Wnas+rFMzA=
APP_DEBUG=true
APP_URL=http://cybermonday.htb

LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=cybermonday
DB_USERNAME=root
DB_PASSWORD=root
#7
(Aug 20, 2023, 05:36 AM)M3Y Wrote: I'm in the webhooks but it seem you need to put the admin role
in the jwt

https://imgur.com/a/NMK4DnF

I've been trying to figure out the format of the laravel cookies. The first portion appears to be static, but the second portion is semi dynamic. Is it encrypted again somehow??
#8
(Aug 20, 2023, 05:46 AM)BigBaller Wrote:
(Aug 20, 2023, 05:36 AM)M3Y Wrote: I'm in the webhooks but it seem you need to put the admin role
in the jwt

https://imgur.com/a/NMK4DnF

I've been trying to figure out the format of the laravel cookies. The first portion appears to be static, but the second portion is semi dynamic. Is it encrypted again somehow??

second portion - it's _token ( request during registration exp: _token=QorEraYXs3BJy53YN8vua2kQNdt3VvMr1K9dawnK&username=test&email=test%40test.test&password=test )
#9
(Aug 20, 2023, 02:42 AM)ByteBuster Wrote: There is a .git folder in /assets../.git. Upon examining the content, we can perform a mass assignment.




@if(auth()->user()->isAdmin)

+                            <a href="{{ route('dashboard') }}"

 
to access the dashboard panel.

How did you find /assets.. ??
#10
(Aug 20, 2023, 05:46 AM)BigBaller Wrote:
(Aug 20, 2023, 05:36 AM)M3Y Wrote: I'm in the webhooks but it seem you need to put the admin role
in the jwt

https://imgur.com/a/NMK4DnF

I've been trying to figure out the format of the laravel cookies. The first portion appears to be static, but the second portion is semi dynamic. Is it encrypted again somehow??

I have the same issue.

Did someone try CVE-2018-15133 ?


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

Forum Jump:


 Users browsing this forum: 1 Guest(s)