LLMs can read and write executables byte by byte from a hex dump(sgiannopoulos.github.io)
310 points by fortran77 11 days ago | 182 comments
tl;dr: Researchers demonstrate that general-purpose LLMs can directly read, patch, and generate x86-64 executables from raw hex dumps without using compilers, disassemblers, or other tools. In experiments, the model identified programs (including a stripped FreeBSD binary, where it even found a real bug in confidence-interval tables), added features via byte-level patches that fit in existing padding, wrote working ELF64 files from scratch, and reverse-engineered a real malware sample in 211 seconds—correctly identifying its C2 server. An open-weights DeepSeek model reproduced the malware analysis, suggesting the capability isn't limited to frontier closed models, though context size remains a hard limit.
HN Discussion:
  • ↓The framing overstates LLMs' intuitive grasp of machine code; it's more mechanical than presented
  • ↓Generating machine code directly is impractical; higher-level source + deterministic compilers makes more sense
  • ↑This capability is genuinely useful for reverse engineering, debugging, and binary patching tasks
  • ~This points toward future LLM-optimized programming languages or new interfaces
  • ↑Personal anecdotes confirming LLMs handle hex dumps and binaries well in practice