Remix.run Logo
lossolo 5 days ago

Yeah, it looks like CTF like POC, not what I would call reasonable code by any measure:

https://github.com/StalkR/misc/blob/master/go/gomium/exploit...

The tight goroutine loop that flips one variable between two different struct types just to win a race is not something a typical developer writes on purpose. The trick to "defeat" compiler optimizations by assigning to a dummy variable inside an inline function. Carefully computing the address difference between two slices to reach out of bounds, then using that to corrupt another slice’s header. I mean calling mprotect and jumping to shellcode is outright exploit engineering, not business logic and it's not part of the attackers payload.

Chances of exact PoC pattern showing up in the wild by accident is basically zero.