News for hackers. Stuff that matters.
Re:LLMs can read and write executables byte by byte from a h... by adrian_b on Saturday November 21, 2026 @12:43PM (#50591668)
Disassembly is not 100% solved, at least not in a way that is easy for an LLM to use.

Disassembling directly an executable program, especially when it is some proprietary program for which there is no debugging information, is likely to produce a lot of garbage that does not correspond to correct assembly instructions.

Correct disassembly can be obtained only by simulating the execution of the program and disassembling only the instructions that are reached in this way. This is still not completely foolproof, because during simulation some parts of the code might be reached only for some specific input data, which is unknown. Sometimes one may guess all the possible inputs and disassemble anything reached in this way, but in reality some of those inputs can never occur, which can lead to erroneously disassembling parts that should not be disassembled, as they are not instructions.

That said, most executable programs are easy to disassemble, but some may be intentionally or unintentionally very obfuscated, and for such cases any disassembling tool would have to be guided by a human to achieve a complete disassembly.

Re:LLMs can read and write executables byte by byte from a h... by g-b-r on Saturday November 21, 2026 @02:53PM (#50592978)
Disassembly means going from bytes to assembly, it's not only "solved" but trivial.

You're talking about reverse engineering in your comment

Re:LLMs can read and write executables byte by byte from a h... by 1000100_1000101 on Saturday November 21, 2026 @05:46PM (#50594402)
I think they're worried about self-modifying code, compressed code, intermingled code and data, hand-crafted overlapping instruction sequences (for systems with non-fixed instruction lengths) and other esoteric cases like that.
Re:LLMs can read and write executables byte by byte from a h... by g-b-r on Saturday November 21, 2026 @05:54PM (#50594452)
No, to me it seems that they were really just talking of reverse engineering
Re:LLMs can read and write executables byte by byte from a h... by 1000100_1000101 on Saturday November 21, 2026 @09:17PM (#50595567)
The part about "erroneously disassembling parts that should not be disassembled, as they are not instructions" makes me think of const data in a text section.

I'll admit I expanded on the possibilities after that, because otherwise it didn't make much sense. Nobody cares if an instruction is run or not. You can still disassemble the instructions. In fact reading non-reachable code might reveal vulnerabilities you could reach if you altered the stack via a buffer overflow... only evaluating actual program flow seems like a way to overlook things.

Re:LLMs can read and write executables byte by byte from a h... by g-b-r on Saturday November 21, 2026 @11:27PM (#50596237)
Well, now I read a "disassembly instructions" in his comment, did I really miss it or he edited it?

I apologize if it was me who misunderstood it

Re:LLMs can read and write executables byte by byte from a h... by adrian_b on Sunday November 22, 2026 @05:07AM (#50598043)
Disassembling a binary file is never needed, unless it is a file that you have not generated yourself, in which case this is indeed a part of reverse engineering.

If you have no debugging information for the file, you cannot know that some byte sequence is unreachable code.

To identify what such a sequence of bytes is, you can try to decode it in various ways, e.g. by disassembling it, by interpreting it as ASCII or Unicode characters, by interpreting it as a sequence of floating-point or integer numbers, etc. If anyone of these decoding attempts looks plausible, you can guess that it is correct. So if it disassembles into a sequence of plausible instructions, you can conclude that it is unreachable code, but your guess is seldom certain.

In any case, the disassembling may start only by executing the program and following the control flow, and also noting all memory addresses that are accessed by loads and stores.

If after that there remain memory regions that have not been accessed in any way, possibly because you could not simulate all the possible program inputs, e.g. because the program accessed a hardware dongle that you do not possess, then you can start to decode in various ways the regions with unknown content, attempting to guess their purpose.

Re:LLMs can read and write executables byte by byte from a h... by adrian_b on Sunday November 22, 2026 @04:55AM (#50597950)
Yes I was talking about reverse engineering.

I am not aware of any other situation where you have a sequence of bytes that are machine instructions and that must be disassembled, except when you have extracted them from a binary executable file after identifying their location, which is indeed a part of reverse engineering.

If you do not extract the bytes to be disassembled from a binary file that you have generated yourself, that is a part of reverse engineering.

If you generated the binary file yourself, you have no need to disassemble it. If you want to look at the assembly language program, you do not need to disassemble anything, because whatever tools you used to generate the binary will provide the assembly language equivalent.

Re:LLMs can read and write executables byte by byte from a h... by g-b-r on Saturday November 21, 2026 @11:40PM (#50596308)
No, I was mistaken, I apologize
Re:LLMs can read and write executables byte by byte from a h... by adrian_b on Sunday November 22, 2026 @04:46AM (#50597879)
If you have bytes that are known to be CPU instructions, disassembling them is indeed trivial.

But from where can you get such bytes?

Normally such bytes can be obtained only from a binary executable file, by what you called "reverse engineering", though complete reverse engineering includes a lot of work beyond identifying the machine instructions inside a binary file and disassembling/decompiling them.

I cannot imagine what source of bytes that are machine instructions do you have in mind, otherwise than those that must be obtained through reverse engineering.

If you generated yourself the binary file, there is no need to disassemble it, because any high-level language compiler provides upon request the corresponding assembly language program.

Re:LLMs can read and write executables byte by byte from a h... by g-b-r on Sunday November 22, 2026 @10:43AM (#50600682)
> by what you called "reverse engineering"

No, with reverse engineering I meant arriving at some readable code in a programming language.

But I had both misread what you wrote and was mistaken, even simply translating bytes in an executable to assembly is not trivial; I last dealt with it long enough that I didn't remember the issues.