I
I
Ivan the Terrible2015-08-18 21:48:42
Programming
Ivan the Terrible, 2015-08-18 21:48:42

Why do you need to know machine code?

I recently watched the movie "Who Am I". There the main character can read the "Machine Code". The question is: Why do you need to be able to read machine code and write on it for a hacker? What advantage does this provide?

Answer the question

In order to leave comments, you need to log in

8 answer(s)
S
Saboteur, 2015-08-18
@saboteur_kiev

Right now, it is not necessary to know the machine code by heart - there are a lot of disassemblers that will translate the code for you.
Having an understanding of machine code in order to understand how a program is stored and executed is a must for any self-respecting programmer working with languages ​​close to C.
It is especially useful to have an idea for working with embedded and other pieces of hardware

D
D', 2015-08-18
@Denormalization

Previously, in the days of *.com files, it was fashionable to come to a party, and write a program in machine codes directly in debug.exe, and everyone was like "AH!! 1"
But in general, yes, these are all inventions of directors and screenwriters. Nobody writes in machine code. Yes, you can remember a few opcodes for reverse engineering, but for the most part, no one needs it. (0.0001% who needs it - an error).

M
Mrrl, 2015-08-18
@Mrl

The last time I needed native code was recently when I wanted to see what a C# function would compile to. You cannot use the debugger - it gives unoptimized code. Therefore, the code fragment had to be pulled out directly in the program (two stack jumps - and I am in the vicinity of the call point). It is easy to print a fragment in hexadecimal form, but it is not clear how to drag it from there into some disassembler. I had to lift the code tables and disassemble it myself.

A
Andrey Burov, 2015-08-18
@BuriK666

A bunch of examples habrahabr.ru/hub/reverse-engineering
Well, of course, not quite machine code. But it's close...

V
Vladimir Martyanov, 2015-08-18
@vilgeforce

For example, to know that the INT3 command is 0xCC. And when suddenly in the debugger in the studio it will be in the variable 0xCCCCCCCC - to understand that the trouble is with access to memory, and not it is not clear where the values ​​\u200b\u200bcame from.

V
Vladlen Grachev, 2015-08-18
@gwer

In the general case, it is not very necessary. Even when parsing someone else's binary, you will still work with mnemonics, without pure machine code. That is already an assembler.
In the film, they could call anything by machine code.
But in life it is used by hardware developers, for which this machine code is then needed. For the processor understands only it. And in order for him to understand, this understanding must be laid in him. Well, as an option, programming all this previously developed hardware is very direct, as described here .

G
globuser, 2015-08-19
@globuzer

Machine code, mnemonics, addresses - all this will be useful to you if, by the nature of your activity, you will work in the field of system programming, device programming, cryptography occasionally, information security. If in most cases you are a full-time system administrator, application programmer, office worker or student, then this will not give you much pleasure, and there will be no benefit. Well, if only for their own raising their spirits and satisfying their knowledge. If you are a real hacker from a secret group who opens pentagons for suitcases of money, then there is nowhere without zeros and ones ... Although in this case you would not ask such a question, and indeed you would not sit on such a site at all :)

N
nikitos_ruli, 2016-04-02
@nikitos_ruli

The hacker just needs to know the machine code. It is thanks to him that they break most of the software, that is, they make their own changes to the machine code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question