Defeating a 40-year-old copy protection dongle
Defeating a 40-year-old copy protection dongle

### Time-Traveling with a Soldering Iron: Defeating a 40-Year-Old Copy Protection Dongle
In a dusty box in the attic, you find it: a floppy disk for a piece of software that was once cutting-edge. It might be an early CAD program, a niche scientific analysis tool, or a legendary piece of music production software. But next to the disk is a strange plastic nub with a 25-pin connector. This, my friends, is a hardware dongle, a relic from the wild west of personal computing and the key to resurrecting that software.
The problem? The original computer it ran on is long gone, and even if you had one, the dongle itself might be failing. To run this software on a modern machine via an emulator, or to simply ensure its survival, you have one path: defeat the dongle. This isn’t about piracy; it’s about digital archaeology.
#### Understanding the Ancient Guardian
Forty years ago, in the era of the IBM PC/XT and the Apple II, software was easy to copy. A simple `diskcopy` command was all it took. To protect their investment, developers created these hardware keys. The concept was simple: the software would periodically send a “challenge” to a specific hardware port (usually the parallel printer port), and the dongle, acting as a physical key, would provide the correct “response.” If the response was wrong or absent, the program would crash, refuse to save, or simply not run at all.
These early dongles ranged from laughably simple to deceptively complex:
* **Passive Dongles:** The simplest form. They were little more than a specific wiring configuration inside the plastic shell. The software would write data to certain pins on the parallel port and read the result from others, expecting a unique pattern created by the dongle’s internal jumpers.
* **Active Logic Dongles:** These contained simple logic chips (like PALs or GALs) or even tiny microcontrollers with their own stored memory (EPROMs). They could perform cryptographic calculations—primitive by today’s standards, but a significant hurdle in the 1980s.
#### The Digital Archaeologist’s Toolkit
To crack this digital lock, you need to blend old-school hardware skills with modern software analysis. Your workbench should include:
* **Hardware:** A logic analyzer is your most critical tool. It acts like a wiretap for the parallel port, allowing you to “eavesdrop” on the conversation between the software and the dongle. A multimeter and a soldering iron are also essential for physically examining the dongle.
* **Software:** A disassembler like IDA Pro or Ghidra is needed to turn the program’s machine code back into something a human can understand. You’ll also need a debugger (like a vintage version of SoftICE or a modern equivalent in a virtual machine) to step through the code in real-time.
#### The Process: A Two-Pronged Attack
The goal is to either replicate the dongle in software or remove the check from the program entirely.
**1. The Eavesdropping Phase: Capturing the Secret Handshake**
First, you need to see what the dongle is actually doing. You connect the logic analyzer to the parallel port pins and run the software (ideally on original hardware or a very accurate emulator). As the program runs, you trigger the functions that you suspect are protected.
You watch the logic analyzer’s output, capturing the “challenge” data the computer sends to the dongle and the “response” data it gets back. You repeat this process many times. Is it the same challenge/response every time? Or is there a complex algorithm at play? This capture gives you the raw data—the secret language spoken between the software and its key.
**2. The Reverse-Engineering Phase: Finding the Lock in the Code**
While the hardware analysis is happening, you load the software’s main executable file into your disassembler. You’re looking for the specific part of the code that handles the copy protection. You can search for strings like “dongle not found” or “protection error.” More reliably, you can search for the code that directly accesses the hardware port addresses for the parallel port (e.g., `0x378`, `0x379`).
Once you find this section of code, you can trace its logic. You’ll see the code that sends the challenge and the code that reads the response. Critically, you will find a comparison and a conditional jump—the “if/else” statement that decides your fate. In assembly, it might look something like this:
“`assembly
CMP AX, [ExpectedValue] ; Compare the value from the dongle (in AX) with the correct value
JNE ProtectionFail ; Jump to the failure routine if they are NOT equal
; … program continues successfully
“`
**3. The Bypass: Choosing Your Weapon**
Now that you understand the mechanism, you have two primary ways to defeat it:
* **Path A: Emulation (The Elegant Solution)**
You use the data captured by your logic analyzer to write a small piece of software—a driver or a patch—that emulates the dongle. This program intercepts the software’s calls to the parallel port. When the software sends a challenge, your emulator simply provides the correct, pre-recorded response. This is the purest form of preservation, as it leaves the original program untouched.
* **Path B: Patching (The Brute-Force Solution)**
You go back to the disassembled code. You find that critical `JNE ProtectionFail` (Jump if Not Equal) instruction. Using a hex editor or a debugger, you overwrite that instruction. You might change it to a `JMP` (an unconditional jump) that always bypasses the failure routine, or you might replace the instructions with `NOP` (No Operation) commands, effectively erasing the check from existence. It’s a surgical strike, but it permanently alters the original program.
#### More Than a Hack
Defeating a 40-year-old dongle is a journey back in time. It’s a puzzle that tests your skills in hardware, software, and logic. It’s the thrill of seeing a long-dormant piece of digital history flicker back to life. In a world where digital information is often ephemeral, this work is a crucial act of preservation, ensuring that the foundational software of our modern world isn’t lost to the bit-rot of time and the failure of forgotten plastic keys.
