Event Loop Blocking + Lazy images
Last updated
Last updated
Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE) Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
In this exploit, @aszx87410 mixes the lazy image side channel technique through a HTML injection with kind of event loop blocking technique to leak chars.
This is a different exploit for the CTF chall that was already commented in the following page. take a look for more info about the challenge:
Connection Pool ExamplesThe idea behind this exploit is:
The posts are loaded alphabetically
An attacker can inject a post starting with "A", then some HTML tag (like a big <canvas
) will fulfil most of the screen and some final <img lazy
tags to load things.
If instead of an "A" the attacker injects the same post but starting with a "z". The post with the flag will appear first, then the injected post will appear with the initial "z" and the big canvas. Because the post with the flag appeared first, the first canvas will occupy all the screen and the final <img lazy
tags injected won't be seen in the screen, so they won't be loaded.
Then, while the bot is accessing the page, the attacker will send fetch requests.
If the images injected in the post are being loaded, these fetch requests will take longer, so the attacker knows that the post is before the flag (alphabetically).
If the the fetch requests are fast, it means that the post is alphabetically after the flag.
Let's check the code:
Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE) Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)