Skip to main content

homoglyph_encode

Function homoglyph_encode 

Source
pub fn homoglyph_encode(payload: &str) -> String
Expand description

Homoglyph substitution — replaces select ASCII characters with visually identical Unicode characters from other scripts.

Bypass mechanism: WAFs match ', ", <, >, =, etc. as literal bytes. Unicode homoglyphs look identical in logs but aren’t matched by byte-level regex. If the backend performs Unicode normalization (NFKC) or accepts these codepoints in SQL/HTML contexts, the payload executes.

Context: Effective against byte-level WAFs. Requires backend Unicode tolerance (common in modern frameworks).