πŸ”Payload Encoding

Payload encoding transforms payloads before injection, which is essential for bypassing input validation, WAFs, and encoding-specific attack vectors.

πŸ“Š Encoding Types

The Encoder field specifies which encoding transformations to apply to payloads:

πŸ”— URL-Encode Key Characters

Encodes only the characters that have special meaning in URLs:

< > " ' & / \ ; = ( ) { } [ ] | ` ~ !

Before: <script>alert(1)</script> After: %3Cscript%3Ealert(1)%3C%2Fscript%3E

πŸ”— URL-Encode All Characters

Encodes every character in the payload as %XX:

Before: test After: %74%65%73%74

πŸ“ HTML-Encode Key Characters

Encodes characters using HTML entities:

< β†’ &lt;
> β†’ &gt;
" β†’ &quot;
' β†’ &#x27;
& β†’ &amp;

Before: <img src=x onerror=alert(1)> After: &lt;img src=x onerror=alert(1)&gt;

πŸ”’ Base64-Encode

Encodes the entire payload as Base64:

Before: admin:password After: YWRtaW46cGFzc3dvcmQ=

🌐 Unicode-Encode

Encodes characters using Unicode escape sequences:

Before: <script> After: \u003cscript\u003e

βš™οΈ Configuration

πŸ“ Using the Encoder Field

πŸ”— Multiple encoders can be chained β€” they are applied in sequence:

🎯 URL-Encode Specific Characters

For fine-grained control, use UrlEncode and CharsToUrlEncode:

Field
Description

UrlEncode

βœ… Enable custom URL encoding

CharsToUrlEncode

πŸ”€ The specific characters to URL-encode

πŸ“š Encoding Examples by Vulnerability Type

πŸ’‰ XSS with URL Encoding

Useful when the application URL-decodes input before rendering.

πŸ—„οΈ SQL Injection with Space Encoding

Encodes only spaces and quotes for SQL injection payloads.

πŸ“„ XXE with Base64

Useful when the application processes Base64-encoded XML entities.

πŸ›‘οΈ WAF Bypass with Unicode

Unicode encoding can bypass WAF rules that only check for ASCII patterns.

⚑ Encoding Pipeline

The full payload processing pipeline with encoding:

πŸ’‘ Tips

  • πŸ§ͺ Test encodings manually β€” Use Burp Decoder to verify your encoding produces the expected result

  • πŸ”— Chain encodings β€” Double encoding (e.g., URL-encode twice) can bypass some WAFs

  • 🎯 Use CharsToUrlEncode for precise control β€” Only encode the characters that need encoding

  • πŸͺž Match encoded payloads β€” When using Payload Reflection match type (MatchType 3 vs 4), be aware that MatchType 3 checks for the encoded payload while MatchType 4 checks for the original

Last updated