Jock Tanner2015-11-02 09:12:36
Jock Tanner, 2015-11-02 09:12:36

"A compiler has no place on a combat server" - truth or prejudice?

Recently, my interlocutor on Habré, when discussing a certain issue, casually mentioned that the compiler with the toolchain should be removed from production servers for security reasons. I did not object to him then, but since then I have thought a lot on this topic and, frankly, it never occurred to me what exactly these considerations might be.
Generally speaking, there is no code in gcc, ld, as, make, and other tools that can be exploited for privilege escalation; these features are not needed. If the attacker already has extra rights or a way to raise them, then it does not matter how exactly he delivers the exploit to the victim machine: in the form of text or a ready-made binary.
Approaching the question from the other side, I do not remember a single mass exploit that would be based on a compiler vulnerability. Well, it's also hard for me to imagine a secure server on Gentoo or FreeBSD, which would not have a compiler.
Of course, my horizons in the field of information security are very limited, so I turn to the collective mind. Can removing the compiler from a UNIX-like or Linux server installation improve security, and if so, in what way? And if there are any historical precedents that are now irrelevant, then it would be very interesting to learn about them.
Thank you.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
asd111, 2015-11-02

You're right.
The compiler is not a way to get remote access.
The main methods are errors in ftp, ssh, smtp, web server, interpreter or weak passwords.

Ruslan Fedoseev, 2015-11-02

having a compiler is just an extra relief for the cracker.
Example. Let's say hosting lives on the server. And on one of the sites a hole was found that allows you to upload files. And suppose the cracker has a description of the vulnerability that exists on the server. In order to use it, you need to build the code, run the binary and enjoy )
So, it's easier to download the source, build it on the spot, and run it. You can also upload a binary, but you need to observe the architecture, library versions, kernel... And in addition to the source code of the Trojan, you also need to download the toolchain for its assembly....

Eddy_Em, 2015-11-03

Complete nonsense. but how to compile scripts, CGI, etc.?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question