# XSS Reflected

## XSS - Reflected - First Order

Go to login page form [https://127.0.0.1/index.php?page=login.php](https://127.0.0.1/index.php?page=login.php)

and log in using login bypass or inserting password.

Go to a page vulnerable to XSS reflected like as: [https://127.0.0.1/index.php?page=dns-lookup.php](https://127.0.0.1/index.php?page=dns-lookup.php)

<figure><img src="https://677614291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrRWtuMw6xkkeDjZfkcWC%2Fuploads%2FsehpqG3JuEZwvUOEVOKt%2Fimage.png?alt=media&#x26;token=1b1b8f01-22f2-49f2-ad0a-1bed1654f65c" alt=""><figcaption></figcaption></figure>

injecting the javascript payload: `<script>alert(document.cookie)</script>` we can execute directly the command and obtain a reflected session cookie id of current account (admin):

<figure><img src="https://677614291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrRWtuMw6xkkeDjZfkcWC%2Fuploads%2Fxw2c6RaKR91qA5EHVVlU%2Fimage.png?alt=media&#x26;token=ef5053e1-69c1-46c6-942d-24bd870c5417" alt=""><figcaption></figcaption></figure>
