Better HN
topnewbestaskshowjobs
Log inSign up

cat_easdon

64 karma · joined Mar 8, 2020 (6y ago) · 5 submissions

Submissions

comment 6y ago · link · parent

Sorry - the presentation was never recorded. There's more information in the GitHub repo, however: https://github.com/cattius/opcodetester.

comment 6y ago · link · parent

Yeah, that's right - you could prove the absence of malicious microcode, but not the absence of hardware trojans, implants, etc. There are also the embedded microcontrollers to deal with (e.g. the Management Engine, Innovation Engine, and Power Management Controller on Intel).

comment 6y ago · link · parent

A team from Ruhr University Bochum reverse-engineered the microcode for the AMD K8 and K10 to implement custom microcode programs, they describe how they reverse-engineered the ROM here: https://www.syssec.ruhr-uni-bochum.de/media/emma/veroeffentl.... The problem with reverse-engineering on newer CPUs is that on both Intel and AMD the updates are now protected with cryptographic authentication, so you can't run arbitrary custom microcode to aid in understanding what it does. And as others have mentioned, the hardware complexity and small feature sizes make reverse-engineering the microcode engine or ROM by physical inspection much harder than on the K8. I expect it will be achieved at some point, though.

comment 6y ago · link · parent

Author here - the main reason there's no examples is because I didn't have any interesting ones to report at the time! I was trying to develop new detection methods, but found only the (thousands) of undocumented software prefetches which were previously reported by Domas in his Sandsifter project, e.g. 0f 0d /2 and /3-7 on Intel CPUs (these are documented by AMD, but not Intel, and opcode behavior varies more often between the two than you'd expect). Many of the interesting undocumented x86 opcodes (e.g. icebp, salc, loadall) were either only present in older CPUs or are now at least partially documented. There are some much more interesting undocumented opcodes on other architectures (which have architectural effects, e.g. changing register values, halting the CPU), but that's still an ongoing project.

Edit: 0f 0d /2 is documented as prefetchwt1 but (allegedly) unsupported by the CPUs I tested it on, so the fact it executes at all is undocumented.

comment 6y ago · link · parent

Author here - the aim of this project was to explore exactly why such opcodes are problematic for security. Even if they're implemented with entirely innocent intentions - e.g. for debug+verification purposes - they can lead to vulnerabilities in operating systems, emulators, and hypervisors. They induce edge cases which developers can't protect against if they don't know they exist in the first place (due to the lack of any public documentation). There's a more thorough writeup of the project here: https://github.com/cattius/opcodetester/blob/master/thesis.p....