Thanks to Edward Snowden, Julian Assange, the NSA and others, information security has become a critical concern for many people across the globe. Computer users everywhere are concerned that they may be under the surveillance of some kind of government entity. Many experts say that encrypting data and using strong passwords can help a lot, but is it enough? Today, I'd like to talk about the frightening possibility that protection against surveillance may be in a place that is unreachable to most people: compilers.
In 1987, Ken Thompson, the co-creator of Unix, gave a very interesting lecture information security as part of his Turing Award acceptance speech. The speech, titled
Reflections on Trusting Trust gave an extremely alarming insight on just how difficult it is to keep data secure. In this talk, Thompson described how he was able to modify the source code of his C compiler to “deliberately mis-compile source whenever a particular pattern is matched”. The pattern that he used as a proof of concept was the login command for Unix. This command is absolutely critical to any Unix system, as it protects users' private data from other users via a password. Thompson was able to generate a C compiler that compiled login in special way, giving the command a bug that would allow anyone super user privileges if they were to type a very specific password that he came up with. This C compiler would compile any other code normally. Thompson went on to discuss the all too possible situation that a person with enough knowledge and experience could plant exploits like this into assembly and machine code, making it almost undetectable. “You can't trust code that you did not totally create yourself.”, Thompson concluded.
![[figure 7]](http://cm.bell-labs.com/who/ken/fig7.gif) |
| Proof of concept code by Thompson |
 |
| Ken Thompson |
With this horrifying revelation, it is very clear to that it is not possible to be completely secure. We can make our passwords as strong as possible, but are those passwords effective if we can't even trust our own tools? I will still do my best in regards to conventional security practices, but I acknowledge that they cannot protect me against a skilled enough attacker.
I leave you with a quote:
"The only system which is truly secure is one which is switched off and unplugged locked in a titanium lined safe, buried in a concrete bunker, and is surrounded by nerve gas and very highly paid armed guards. Even then, I wouldn't stake my life on it."
--
Gene Spafford, Director, Computer Operations, Audit, and Security Technology (COAST) Project, Purdue University