LLMs can read and write executables byte by byte from a hex dump
Trending on Hacker News: LLMs can read and write executables byte by byte from a hex dump (152 points / 107 comments, via sgiannopoulos.github.io)
In one line
With only a hex dump, no tools and one reply, a frontier LLM explains compiled programs, adds features by editing their bytes, and writes working executables from scratch.
Opening excerpt
Almost nobody writes machine code by hand. We write source, and a compiler and linker turn it into bytes; to go back, we use disassemblers and decompilers. There are good reasons for this. x86-64 instructions vary in length, jumps are relative byte distances, and one wrong header field means the file won’t load. So what can an LLM do with those bytes when it has none of these tools?
Takehi et al. recently showed that LLMs can read and write neural network weights directly, which they call Weight-Space Programming . We ask the same question about the other artifact we treat as unreadable output: compiled code.
We define Machine Code Programming as a general-purpose LLM reasoning directly about an executable’s bytes, with no compiler, assembler, disassembler or execution between it and the file. We test three abilities and one real-world case:
We gave the model the hex dumps of three programs we wrote ourselves, plus one real binary from FreeBSD, ministat . The LLM correctly identified what all four programs were, with only their bytes as input .
(Excerpted from the original; full article via the source link below.)
This story hit the Hacker News front page today (152 points / 107 comments, via sgiannopoulos.github.io). Our Tech Radar aggregates daily signals on AI engineering, backend architecture and DevOps — browse the related services and further reading below, or get in touch with our team.
Source: Hacker News