# Jetty

Send a GET request to / with a random value in the Host header, the response will contain a list of all applications

<figure><img src="https://4199783661-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFF3hT6DtJlHn9jAel9%2Fuploads%2FDIMSINSUgr1kNXtWcl3w%2Fimage.png?alt=media&#x26;token=2ec5914c-46ff-4617-8da4-fc0507d6436c" alt=""><figcaption></figcaption></figure>

## RCE via upload file

upload a JSP web shell to `$JETTY_BASE/webapps/root/`&#x20;

<figure><img src="https://4199783661-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFF3hT6DtJlHn9jAel9%2Fuploads%2FFskJMTibKoNUTpmMJQwX%2Fimage.png?alt=media&#x26;token=496fa81e-52e8-4663-a263-a91e07b4869f" alt=""><figcaption></figcaption></figure>

## XSS via file upload

Test with this two types of payload:

1. XML-based: `<a:script xmlns:a="http://www.w3.org/1999/xhtml">alert('PTSWARM')</script>`
2. HTML-based: `<script>alert('PTSWARM')</script>`

<figure><img src="https://4199783661-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFF3hT6DtJlHn9jAel9%2Fuploads%2F4BDTCmiNk3n7PdO4dIWi%2Fimage.png?alt=media&#x26;token=69c4fb3a-9868-4e65-8cf0-624ed791e787" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4199783661-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFF3hT6DtJlHn9jAel9%2Fuploads%2F3lCDH9zb0q1WAjQs9Evm%2Fimage.png?alt=media&#x26;token=92aa9723-7f93-4caa-af58-d366775a3539" alt=""><figcaption></figcaption></figure>

## Resources

{% embed url="<https://swarm.ptsecurity.com/jetty-features-for-hacking-web-apps/>" %}

## Interesting Books

{% content-ref url="../../interesting-books" %}
[interesting-books](https://0xss0rz.gitbook.io/0xss0rz/interesting-books)
{% endcontent-ref %}

{% hint style="info" %}
**Disclaimer**: As an Amazon Associate, I earn from qualifying purchases. This helps support this GitBook project at no extra cost to you.
{% endhint %}

* [**The Web Application Hacker’s Handbook**](https://www.amazon.fr/dp/1118026470?tag=0xss0rz-21) The go-to manual for web app pentesters. Covers XSS, SQLi, logic flaws, and more
* [**Bug Bounty Bootcamp: The Guide to Finding and Reporting Web Vulnerabilities**](https://www.amazon.fr/dp/1718501544?tag=0xss0rz-21) Learn how to perform reconnaissance on a target, how to identify vulnerabilities, and how to exploit them
* [**Real-World Bug Hunting: A Field Guide to Web Hacking**](https://www.amazon.fr/dp/1593278616?tag=0xss0rz-21) Learn about the most common types of bugs like cross-site scripting, insecure direct object references, and server-side request forgery.
