3 ms·
So where all this authentication and web UI code resides? Is it in the BIOS? Is there somewhere a packed JQuery or something?
by ComodoHacker 9y ago
So where all this authentication and web UI code resides? Is it in the BIOS? Is there somewhere a packed JQuery or something?
- tyingq 9y agoIt's in the AMT code, written in C, in the management engine processor...which is separate from the main processor. See: https://software.intel.com/en-us/node/631399 https://software.intel.com/en-us/node/631399 They are using HTTP Digest Authentication, which is built into browsers. The purpose was to keep passwords from being clear text over regular http connections. So, the code on the client side is in the browser. The code on the server side is in the management processor, and it is a C implementation of HTTP Digest Auth. The bug is that they used strncmp, but used the length of the incoming hash from the client as the string length to compare, versus the actual length that the hash string is supposed to be. The exploit is to send an empty hash. That requires a proxy, or browser plugin, since the browser creates the Digest Auth Headers. The empty hash causes something like strncmp(expected, received_hash_string, 0), and of course, two zero length strings are equal.
- jjnoakes 9y ago> The bug is that they used strncmp, but used the length of the incoming hash from the client as the string length to compare, versus the actual length that the hash string is supposed to be. Ignoring timing attacks, they should have used strcmp(), not strncmp(). strncmp() is for testing if one string is a prefix of another; they wanted to test if some string equaled another. Since this is crypto related stuff, though, they should be using a strcmp()-like routine that works in a content-independent timing fashion.
- adkafka 9y agoBut using strcmp could result in buffer overflow, no?
- jjnoakes 9y agoHow so? We aren't talking about strcpy(), just strcmp(), and all the strings in question should be nul-terminated (if they aren't then mem* routines should be used and more length checks would be needed; there are also timing attacks to worry about if we're considering all the possible issues). But normally strncmp isn't safer than strcmp. They just do different things.