Skip to content

Comment on How I compiled TrueCrypt 7.1a for Win32 and matched the official binariesparent

Comments

Let me say it again, you can patch the WELL KNOWN points of any program.

I don't care where your compiler's AST tree or code generation is. For any compromised program (including a compiler) all I need to do is to monitor the files it generates (patch file_open), for any executable output files, patch its main entry point and add in a payload.

When a compromised compiler is generating your compiler, it will patch your compiler's entry point and add in an extra payload. When your compiler compiles another compiler, it will do the same thing, and so to any other programs it generates.

It's virus writing 101.

How do you identify an executable output file?

File that contains _main? File that ends in .exe?

Watch for an ELF/COFF/PE/etc. header.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.