Other Pages
Before exploitating
Always check for already existing exploits. Even if the application seems to be custom made.

Cross Site Scripting
The most frequently used character to test for XSS injection:
HTML
JavaScript
Default payload
Img payload
XSS Cookie Stealer
Attacker side
Payload encoding
Compress the JavaScript code with JSCompress.
Convert it into CharCode using the following JavaScript code:
Execute the encoded payload:
Command Injection
Reflected
Blind
Blind (ping rce listener)
Kali:
Victim:
BLIND OAST
Blind redirecting the input
Command seperators
More command seperators
Inline Command Execution (Linux)
Check if command is executed via cmd or powershell
Vulnerable Software Exploits
SQL Injection

Exploiting SQL Injection
Fuzz String
BOOLEAN BASED
If outputs of the payloads differ application is probably vulnerable to SQL Injection.
Payload 1:
Payload 2:
TIME BASED
Change response times to avoid false positives.
Useful SQL commands
Additional info about hidden system tables in MSSQL:
Manual Code Execution
INTO OUTFILE
In some cases you can spawn the webshell using SQL Injection.
If xp_cmdshell is set to True we are able to execute shell commands on the system.
MSSQL Hash grabing
Client:
Server:
MSSQL dir listing
File upload
WebshellsFile upload bypass
Null Bytes
Path Traversal
It be also found in filename while uploading the file. Url encoding is worth trying. Path traversal is not File Inclusion - it can only read contents of the files.
We can use this to read local files.
Default payloads
Linux
Windows
Encoded payloads
Dot url encoding
Url encoding
Bypass
PoC files
Exploitation files
Search also for other types of private key: e.g. id_ecdsa...
Private SSH keys in user's home folder (you can enumerate the users by reading the /etc/passwd file)
IIS Server log files
IIS Server config files
File Inclusion
Application include given file (local or remote) in the application running code.
We can use this to execute local or remote files.
Search for this vulnerability in parameters which refers to the another file in the system.
Local File Inclusion
The sever loads a local file.
In order to achieve code execution try to include this line of code in some file on the system:
Then include the file with the following parameter (or just urlencode reverse shell):
Remote File Inclusion
The file is loaded from a remote server (Best: You can write the code and the server will execute it). In php this is disabled by default (allow_url_include).
PHP Wrappers
Instead of executing the files you can read and review its contents using php wrappers.
Read sensitive information (hardcoded credentials, secrets) and understand application logic.
Achieve code execution.
WAF / Security Mechanisms bypass (allow_url_include setting needs to be enabled).
Template Injection
Default Payloads
Common
Common
Spring
.NET
For more information visit https://book.hacktricks.xyz/pentesting-web/ssti-server-side-template-injection
Fuzz String
Flask Jinja2
Filter bypass (newlines in urlencoding)
NTLM Relay
You can inject path to your smb server in order to capture hashes:
Last updated