Exploiting Ammyy Admin – developing an 0day
Ammyy Admin's remote-screen rendering code trusts the screen dimensions and stroke-set coordinates sent by the peer, so a stroke set can draw a rectangle just past the end of the allocated image buffer. An attacker who controls the connecting side could overwrite the renderer thread's return address and run code on the victim's machine.
scriptjunkie.us
Published on scriptjunkie.us
« Easy Smart Card SSH Setup
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker controlling the connecting side could execute arbitrary code on the victim's machine; the exploit was demonstrated only over direct IP connections, not through Ammyy's relay servers.
What the attacker needed
Victim runs Ammyy Admin; attacker controls the connecting side; direct IP connection (relay untested)
How it was found
- Set up an Ammyy Admin connection between two virtual machines and capture the traffic.
- Hook the internal send/receive functions to dump the plaintext protocol to a file.
- Turn the sniffer into a fuzzer that flips bits in the plaintext and replays it to the controller.
- Run the fuzzer automatically across several VM pairs until crashes with instruction-pointer control appear.
- Trace the crashing transcript in a debugger to identify the stroke-set parser and the out-of-bounds write.
- Craft a stroke set whose coordinates place the write over the renderer thread's return address and deliver shellcode in the image buffer.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Ammyy Admin is a remote-control program: one computer sends pictures of its screen to the other. The receiving side reserves a block of memory for the picture based on the size the sender claims, but it does not check that every drawing instruction stays inside that block. A malicious sender can therefore write past the end of the block and take over the receiving program.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.