Bypassing WAFs with Unicode Compatibility

Modern WAFs are tough, but Unicode normalization can be their undoing. Learn how to use compatibility characters to sneak payloads past security filters.

1 min read
ibrahimsql
195 words

Bypassing WAFs with Unicode Compatibility#

Web Application Firewalls (WAFs) often rely on blacklists. They block <script>, javascript:, and alert(. But what if we can write these words without using standard ASCII characters?

The Magic of Unicode Normalization#

Many systems normalize input before processing it. This means they convert "fancy" characters into their standard ASCII equivalents.

  • (Fullwidth Less-Than) becomes <
  • script (Fullwidth Latin) becomes script
  • (Telephone Sign) might become TEL

The Attack#

If the WAF checks the input before normalization, but the backend application processes it after normalization, we have a bypass.

Example: XSS#

WAF Rule: Block <script>

Payload: <script>alert(1)</script>

Flow:

  1. WAF: Sees <script>. This does not match <script>. PASS.
  2. Backend: Normalizes input. <script> becomes <script>.
  3. Execution: The browser executes the script.

Finding Compatible Characters#

You can use the IDNA (Internationalizing Domain Names in Applications) standard to find these mappings.

  • I can be represented by (Roman Numeral One)
  • K can be represented by (Kelvin Sign)

Conclusion#

Unicode is vast and complex. Whenever you face a WAF, check if the application performs normalization. It might be your golden ticket.

---
Share this post:

What do you think?

React to show your appreciation

Related Posts

Comments