Web
Wordpress
Reverse Shell #1 - Edit existing Plugin
Examples
Kali
git clone https://github.com/pentestmonkey/php-reverse-shell.git
cp php-reverse-shell/php-reverse-shell.php .
subl php-reverse-shell.php Update the page with your reverse shell then save. This will make the plugin not appear anymore under Installed Plugins

Curl the page to activate it.
Kali
Reverse Shell #2 - Upload Plugin
Examples
revshell.php code
Kali
TomCat
Common usernames and passwords
Examples
Reverse Shell
Examples
Kali


Spring Boot
Reverse Shell
Examples
Kali #1
Below example checks the IP which may not be necessary.
Kali #2

reverse.sh
Kali #1
Kali #2
Download payload
Kali #3
Run payload
Kali #3

See CMDS from page source
Examples
Sometimes you can't see the results of the output from the page so you need to check the page source.

Kali
Browser
CGI-Bin
Scanning
Examples
See if a cgi-bin folder appears in the inital scans, if it does start scanning that direcoty for .cgi files.
Kali

Shell
Examples
Link: https://book.hacktricks.xyz/network-services-pentesting/pentesting-web/cgi
Kali#1
Kali #2

Change request type
Examples

Change the request to POST and add everything else highlighted, we see the status message now changes.

Now we change the yaml to the the emergency override code mentioned in the room.

Now we perform the same steps again except this time for the api/nostromo route and the new file we discovered.



WebDav Cadvaer
If server is using WebDav and we have credentials we can login and upload files.
Examples
Kali
XXE Injection
Exploiting XXE - In-Band
Examples
Exploiting XXE - Out-of-Band
Examples
SSRF + XXE
Examples
XML-RPC
Check if it is enabled
Examples
wpscan or a scan maybe able identified that xmlrpc.php exists, if it is check if it is enabled.

View Files
Examples
Input
Base64 encode the file
XSS
Reflected XSS
Examples
CVE-2023-38501 - Vulnerable Web Application 1
Stored XSS
Examples
CVE-2021-38757 - Vulnerable Web Application 2
Dom-Based XSS
Examples
XSS - Steal JVT
Examples


I tried updating the token it didn't work


Next we're going to try to steal the JWT from another user.
Kali
Browser

This was annoying because if I went to my posts it wouldn't work so I went to Jakes post and changed the number from 2 to 6 to get to the report page. Then just clicked the report button

we got a token from a user that isn't us

We can see it is from Michael who is an admin.


Sent again but this time just forwarded the request so we could see what that script was doing

The script was printing the flag

This wasn't working before but after next time I went to this box tried I could just update the cookie from the browser and it worked.

Brower cookie
CSRF
Examples
Last updated