Page cover

🏝️Web - Server

Note : A JOURNEY TO GAIN KNOWLEDGE

Web - Server

F12 for flag

document

Syntax: X-Forwarded-For: <client>,<proxy1>,<proxy2>,<proxy3>

Change IP at client to private IP by adding an X-Forwarded-For header

It combines URL and hash md5 of that one, so that we just put other URL and hash of it.

4.HTTP - User-agent

change User-Agent to `admin`

5.Weak password

6.PHP - Command injection

document

7.Backup file

Use dirsearch find some interesting files:

/web-serveur/ch11/index.php~

8.HTTP - Directory indexing

http://challenge01.root-me.org/web-serveur/ch4/admin/backup/admin.txt

9.HTTP - Headers

With normal request we will get:

add Header to request:

Header-RootMe-Admin: True

10.HTTP - POST

11.HTTP - Improper redirect

Capture before it redirect

12.HTTP - Verb tampering

Ban Δ‘αΊ§u tưởng bruteforce ngα»“i xΓ i hydra vΓ  cΓ‘i rockyou.txt ra spam cαΊ£ tiαΊΏng

temper ở Δ‘Γ’y lΓ  chỉ cαΊ§n Δ‘α»•i method khΓ‘c ngoΓ i GET vΓ  POST lΓ  được, cα»© PUT vα»›i DELETE mΓ  phang

13.File upload - Double extensions

set file.php.png and send to the server

14.File upload - MIME type

Change Content-Type to image/png and rce

15.HTTP - Cookies

chan

change cookie from visiteur to admin

16.JSON Web Token (JWT) - Introduction

"none" signature algorithms

17.Directory traversal

Try with ../ and fuzz

18.JSON Web Token (JWT) - Weak secret

bruteforce secret key: lol

sign new signature

POST and look for the flag hm....

19.File upload - Null byte

create: file.php%0a.png

20.Install files

use dirsearch: /web-serveur/ch6/phpbb/install

21. JWT - Revoked token

source

Use python request to post data:

The problem that we have to bypass blacklist because with each access_token it will be added to blacklist:

  • with rfc3548 we can see that the character out of alphabet will be skipped

  • underscore β€œ_” , then replace with β€œ/”

  • add == in the end of jwt -> fast way to understand

22. CRLF

Input -> fuzz

Thα»­ nhαΊ­p bα»«a username vΓ  passoword ta thαΊ₯y rΓ΅ log ghi lαΊ‘i username -> tαΊ₯n cΓ΄ng tα»« Δ‘Γ’y

Mα»₯c tiΓͺu lΓ  cΓ³ thể log lαΊ‘iadminauthenticated.

gα»­i payload trΓͺn url vΓ  urlencode để server decode lαΊ‘i

23. Insecure Code Management

doc

http://challenge01.root-me.org/web-serveur/ch61/.git

24.PHP - assert()

doc

doc2

Detect lα»—i File Inclusion -> LFI via PHP's 'assert

KhαΊ£ nghi:

command:

Last updated