logoalt Hacker News

LLMs can read and write executables byte by byte from a hex dump

51 points • by fortran77 • last Wednesday at 2:15 PM • 20 comments • view on HN

Comments

bita_nidir • today at 3:10 PM

I don't think it'll make sense for an LLM to program directly on the cpu opcode level due to the overhead.

But I hope you all realize that the programming language of the future is going to be for LLMs. It'll tightly optimized for LLMs and we'll get nice tools to understand them. They'll probably be great, with loads of fancy tooling.

➕ show 1 reply
pier25 • today at 2:13 PM

I've suspected for years that AI companies have been using commercial software to train their models including games, audio plugings, DAWs, etc. It would not surprise me one bit if we find out they used torrented pirated apps like they did with books and music.

There's certainly eg open source audio dev material out there but not nearly as much as web dev. How else do you explain all the avalanche of vibe coded audio plugins and DAWs appearing this year?

➕ show 4 replies
MomsAVoxell • today at 2:44 PM

Back in the day, thats how we got executables from one system to another, over ASCII-tuned serial lines. I had a colleague in the 80’s who could muscle-memory a “hx.c” which would produce the requisite hex listing given an input, and if that input was a hex listing, reproduce the binary. It was something like 12 lines of C code and it saved our asses so many times, he eventually made a DOS compatible equivalent that could be piped into DEBUG.com to produce the same results.

mfuzzey • today at 2:51 PM

This can be useful in the reverse engineer / malware analysis case where there is existing machine code and no source but I don't think that AI "writing machine code directly rather than high level languages" makes sense. Code generation by LLMs is a non deterministic process so it makes far more sense to generate higher level compilable source code once and then compile it with a deterministic compiler for each target rather than generate machine code non deterministically several times seperately for each target.

Neywiny • last Wednesday at 10:44 PM

Wow. It can read bytes from a byte output? That's incredible

JKCalhoun • today at 2:27 PM

An uninteresting case I am sure, but I have been leaning on LLMs to disassemble 6502 hex dumps and it's no doubt easy-lifting for them.

And the proof of course is that I can reassemble/link, with "modern" tools, their presented assembly and it combines right back into a hex dump mirroring the original.

Anyway, it's been a joy to take the long-out-of-print book, "The First Book of KIM", and re-typeset it (re-assemble it?) for modern hobbyists like myself. LLMs have allowed me to clean up the poor OCR-extracted text from the original. Claude has not only done that, but found missing labels and "equates" in the assembly, as legitimately printed in the book—not OCR errors.

Heck, Claude latched on to a bug in the classic "WUMPUS" game that apparently the author was not even aware of. (But I left that bug in for hobbyists to find—or exploit.)

layer8 • today at 2:35 PM

I wonder if prompt injection via an executable is possible. Especially in the context of having AI perform malware analysis.

secondcoming • today at 2:15 PM

I recently watched a video of a guy trying to unbrick his Harley Davidson Livewire electric motorbike. Harley Davidson were unable to do it. Perplexity created an app to sniff the canbus and talk to the battery and other components on the bike. Soon it'll be possible to write your own firmware for things like this.

[0] is the episode I'm referring to, but the whole series of videos about his woes with this bike are quite interesting.

[0] https://www.youtube.com/watch?v=Z4Ty0oqA_Bk