Skip to content
On this page

Insecure Direct Object References (🇬🇧 ENG | 🇵🇱 PL) ​

ENG 🇬🇧: Link: https://portswigger.net/web-security/access-control/lab-insecure-direct-object-references

After clicking "Access the lab," we see the option to go to the chat on the right side of the screen:

live chat link

We proceed there and check the functionality. We type anything to see how it works:

live chat 1

The creators have added a bit of humor:

live chat response

Besides the "Send" option, we also have the "View transcript" option. We click this button and after a moment, we see that we have downloaded a file named "2.txt".

2.txt file

What can we immediately check? We can check if we can access the file named "1.txt", for example.

Let's go to Burp Suite. We find the request that allowed us to download the file. Here it is:

download conversation request

To do this, we can right-click and select "Send to Repeater":

send to repeater

In the "Repeater" tab, we change "2" to "1":

change the parameter

changed to one

Let's click "Send".

It seems that we have received a "200" status and can download the password without any trouble:

password revealed

A closer look:

take a closer look

Text:

fn3pdkri3fkexsme2glb

We copy it, go to "My Account", log in as carlos using the freshly downloaded password:

carlos and his password

Task accomplished:

lab solved


🇵🇱 PL: Link: https://portswigger.net/web-security/access-control/lab-insecure-direct-object-references

Po kliknięciu "Access the lab", widzimy możliwość przejścia do chatu po prawej stronie ekranu:

live chat link

Przechodzimy tam i sprawdzamy funkcjonalność. Wpisujemy cokolwiek, aby zobaczyć jak to działa:

live chat 1

Twórcy zadbali o odrobinę humoru:

live chat response

Oprócz opcji "Send", mamy także opcję "View transcript". Klikamy ten przycisk i po chwili widzimy, że pobraliśmy plik o nazwie "2.txt".

2.txt file

Co można od razu sprawdzić? Można sprawdzić, czy możemy dostać się do pliku np. "1.txt".

Przejdźmy do Burp Suite. Znajdujemy zapytanie, dzięki któremu byliśmy w stanie pobrać plik. Oto one:

download conversation request

Aby to zrobić, możemy kliknąć prawym przyciskiem myszy i wybrać opcję "Send to Repeater":

send to repeater

W zakładce "Repeater" zmieniamy "2" na "1":

change the parameter

changed to one

Kliknijmy "Send".

Wygląda na to, że otrzymaliśmy status "200" i możemy bez przeszkód pobrać hasło:

password revealed

Widok z bliska:

take a closer look

Tekst:

fn3pdkri3fkexsme2glb

Kopiujemy, przechodzimy do "My Account", logujemy się jako carlos, używając świeżo pobrane hasło:

carlos and his password

Zadanie zaliczone:

lab solved