EphemeralArtichoke•

This is beautiful. So as I understand, the problem was that the signature verification did not restrict to code that could be executed in the DLL. That is, you could find a way to insert your own code while making the signature verification pass by having the signature verification only apply to the portion of the DLL that corresponded to a legitimately signed HP library. No need to break the crypto if you can wiggle your way around it. Well done :-)

10
breen-machineOPTrusted Contributor•

Exactly! We were able to control the location within the DLL that the signature verification method was actually being applied to. We just stuffed some valid, signed code at the end of our malicious DLL and pointed it to that.

It's interesting though that HP didn't make this same mistake with their firmware signature verification. With that one, they verify the entire binary file and I didn't see any way around it.

5
EphemeralArtichoke•

haha, different people writing different crypto verification code.

Very nice writeup, btw :-)

2
kangarootamer•

This was a really great read! Thanks for the write up !!!

2
breen-machineOPTrusted Contributor•

HP just released the security bulletin to complement this issue https://support.hp.com/nz-en/document/c05839270

0