‹ BackHN Continuity

Thread

Ten lines of code that changed my world

148 points · 46 comments · dimonomid

  1. drpython · · focus · HN ↗
    Nice article.

    Brought back a lot of memories.

    In the early 2000s, when video games weren't protected against DLL injection hacks, I spent a lot of time writing DLL injectors for fun and learning.

    The line I used in every experiment was:

    `jmp $` (or `EB FE` in machine code)

    It was the shortest infinite loop in x86 assembly, equivalent to `while 1: ;`

    I would create a minimal DLL with this assembly code, inject it into games like Battlefield 1942, and observe it in OllyDbg. The injected DLL would then start on a new thread and access all the game data in memory.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.