4 ms·
What is the purpose of this?
by gyon 4y ago
What is the purpose of this?
- junon 4y agoFun!
- gyon 4y ago
- flatiron 4y agoIt’s a one liner to have gdb put “exit” as the next line in a program so it closes itself. Not a security bug or anything. Just fun.
- iasay 4y agoA way to annoy developers. This and cron + sleep + rand could be fun.
- derivagral 4y agoI've had some different friends work with colleagues who literally do this. My friends typically left for various reasons, but it never seemed like the best way to "make you improve your code" to me.
- bigiain 4y agoYou are evil. Wanna get a beer sometime?
- sva_ 4y agoI think it would be better to cause an exception or even a segfault for that
- staticassertion 4y agoIn theory you could maybe use this to kill some endpoint agent used for security monitoring in a way that, if someone were to go investigate the crash, maybe they wouldn't immediately think "oh shit, someone killed it". Attackers do kill those agents, absolutely, but you'd have to be root to kill the agent with this method (and ideally any method), at which point endpoint instrumentation and forensic artifacts are unreliable anyway. Any logs that someone were looking at that said "attacker killed me" could just be deleted/ rewritten. The attacker could even rewrite them on the fly and ship them off the box so you're none the wiser :)
- GuB-42 4y agoOne use I can think of is killing a child process in such a way that the parent process considers it has successfully returned. For example you have a "curl" command in a script that is waiting for a server that doesn't respond, killing the process with the kill command may cause the script to fail. If you want the script to continue anyway, you can use that trick.