---
description: >-
  https://portswigger.net/web-security/logic-flaws/examples/lab-logic-flaws-inconsistent-security-controls
---

# Inconsistent security controls

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FghRfrpyiFLCak3JAnb5M%2F1.png?alt=media&#x26;token=77d65d1c-5222-47e1-91fe-52ba7ce4b512" alt=""><figcaption></figcaption></figure>

We can go to the `Target > Site Map` tab in Burp Suite in order to see the domain.

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2F1Ld0KjnrwTWws39bdbAC%2F2.png?alt=media&#x26;token=288edc5b-c9e4-44a8-8654-a455b9e7aae3" alt=""><figcaption></figcaption></figure>

Let's left click on the domain present and then `Engagement tools > Discover content`.

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FUZO1Mdj3PxNg6Etnobzx%2F3.png?alt=media&#x26;token=35a9379f-b4e6-402a-9880-c7e40b1992e0" alt=""><figcaption></figcaption></figure>

That would tell us that there is a directory called `/admin`. Alternatively, we can also directory fuzzing tools. Let's visit the `/admin` page through the browser.

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2F0MpBT4961uCcopRKxZia%2F4.png?alt=media&#x26;token=f404065b-d2fb-4ea0-8d48-96696f782262" alt=""><figcaption></figcaption></figure>

As we can see, the admin page is only accessible to "DontWannaCry" users.&#x20;

Let's `Register` our user using our assigned email address.

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FcWMTProeeUDa2tf2GhX7%2F5.png?alt=media&#x26;token=eae29314-58ef-46cd-a708-7765182cdd21" alt=""><figcaption></figcaption></figure>

Next, we can go to the `Email client` and click our registration email.

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FRY99YUInDPlNjmYl0r5W%2F6.png?alt=media&#x26;token=1ced5738-0b51-494d-bb71-c58e90c4458c" alt=""><figcaption></figcaption></figure>

Then, we can login to our created account through the `My account` tab.

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2F72o0Aems43mlXGl3NFKA%2F7.png?alt=media&#x26;token=29054a40-189f-419b-a10b-0ac8eb291994" alt=""><figcaption></figcaption></figure>

Once inside, we get the option to change our email. Let's set it the following:

```
attacker@dontwannacry.com
```

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FqpjfLVXNwqBJKZ9ATDwV%2F8.png?alt=media&#x26;token=c77bc447-47a5-4432-89f1-e92fd8e3c442" alt=""><figcaption></figcaption></figure>

Once we update our email, the admin panel becomes accessible to us.

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FUbLqaAPKHUZEz0ZJcyY4%2F9.png?alt=media&#x26;token=f196ad51-dc47-487b-947a-ff2ccf67b250" alt=""><figcaption></figcaption></figure>

Let's go inside the admin panel.

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FkRfnB2JbkRNvkFRbDyvY%2F10.png?alt=media&#x26;token=983dd773-a86e-4504-a365-30749b84adf5" alt=""><figcaption></figcaption></figure>

We have to delete the `carlos` user.

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FYJfdAOVBgnzCCSuE2ocP%2F11.png?alt=media&#x26;token=a315c5ea-625f-4445-83d5-62f05b99bab5" alt=""><figcaption></figcaption></figure>

We have solved the lab.

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2F7jQXxYul5lnqdahNV9Qe%2F12.png?alt=media&#x26;token=679834b1-ddfe-416f-8525-d74de032541b" alt=""><figcaption></figcaption></figure>
