binary disassembly

bwanaaa

Senior member
Dec 26, 2002
739
1
81
If you had a string of 0s and 1s, then you can run a 'disassembler' to generate assembly code. Does this generally require that you assume that standard assembly requires 8 bit bytes? How is this accomplished?

Taking it one step further, has the following been accomplished- given a string of 0s and 1s, is it possible to custom generate a 'unique assembly code' that when used to disassemble the string will reveal whether the string is executable or gibberish?
 

dmens

Platinum Member
Mar 18, 2005
2,275
965
136
what's standard assembly? machine code in binaries is platform specific but it needs to be packaged properly for OS that runs on the platform.

i don't understand the second question. you can always try running objdump and see if it spits out sane machine code.
 

her209

No Lifer
Oct 11, 2000
56,336
11
0
You'd have to know what CPU architecture the assembly code was for. Assuming you know that, you can decode the binary "string" and determine if its valid or not.
 

TuxDave

Lifer
Oct 8, 2002
10,571
3
71
Originally posted by: her209
You'd have to know what CPU architecture the assembly code was for. Assuming you know that, you can decode the binary "string" and determine if its valid or not.

Exactly, a binary code can be an instruction for one architecture and gibberish for another architecture.