views:

66

answers:

1

I tried creating a temporary certificate using makecert and creating a spc from the certificate using cert2spc. I signed some exe with the generated spc. I then use the binary editor in VS 2008 to flip some bits (tampered it) in the exe. To my surprise I was able to execute the application.

I was expecting that the system will detect the tampering and will complain. Hence the question.

Any guidance would be appreciated.

+1  A: 

No, because any code in the binary to check the signature can also be tampered with.

I recommend obtaining a copy of IDA Pro and disassembling one of your binaries. After you have the raw assembler you can edit specific opcodes using a hex editor. In short, this is the tactic that the cracker community uses. I don't believe that there will ever be a way to stop this, the ps3 and xbox360 both use digital signatures to protect their binaries, but this doesn't stop piracy.

Rook
Thanks for the response. I wonder about what kind of tampering attack the digital signatures can with stand. Am I doing anything wrong in a way I am assigning signatures to my binaries. I am doing this just for the purpose of learning.
Anand Patel
Learning is awesome, I totally support that. The problem with this scenario is that the attacker has full control over the system, he owns the computer and processor and the binary, so as a software developer you don't have the control. Where digital signature works exceedingly well is in network communications. SSL/TLS which powers HTTPS would not be possible without digital signatures. The difference is that the attacker is on the outside looking in on 2 people that want to communicate in a secure manner.
Rook