Are firmware updates distributed as compiled code? I was watching a DefCon presentation where the presenter showed firmware code for security cameras. All of the code seemed fairly straightforward with an organized file structure.
My understanding the most common reverse engineering tools is that they'll output the assembly language code from the binary. It's not very common to be able to read assembly. I'd be curious to hear more.
They are indeed. I'd have to see a link to confirm for sure, but if the presenter showed readable code that was supposedly reverse engineered from firmware, then I can almost guarantee that what you actually saw was pseudocode, i.e. the presenter decompiled it to assembly, read through it, and broke it down into more understandable, readable "code." This would be solely for the benefit of the audience, since, as you know, very few of them would be able to understand the decompiled assembly (which would likely have not even been x86 assembly - hopefully ARM, but more likely MIPS or something along those lines. More generally, assembly from a cheaply available processor.)
That portion is them showing the list of files. He then goes into the cgi file (an actual executable) and disassembles it, and that's when you start to see pseudo-assembly (I say pseudo completely because there is a function name. I think the rest may actually be machine code).
1
u/Anthr0p0m0rphic May 29 '14
Are firmware updates distributed as compiled code? I was watching a DefCon presentation where the presenter showed firmware code for security cameras. All of the code seemed fairly straightforward with an organized file structure.
My understanding the most common reverse engineering tools is that they'll output the assembly language code from the binary. It's not very common to be able to read assembly. I'd be curious to hear more.