ORPHANWARE RECOVERY
Home/Guides/Differential testing, or how we prove a rebuild matches the original

Differential testing, or how we prove a rebuild matches the original

Differential testing proves a rebuild by running the original program and the recovered program side by side on the same inputs and comparing their outputs exactly. Thousands of generated fuzz cases exercise ordinary paths and edge cases no person would try by hand. Zero divergence means every case tested matched. It does not mean every case possible was tested. That is the proof standard behind Verified Recovery, and the measured record on this site is 9 of 9 C and C++ targets recovered with zero divergence across thousands of fuzz cases per target, including 8,127 lines recovered from bzip2 1.0.8.

Last updated

Why reading the code is not enough

Two programs can look alike and still disagree on the cases that matter: the odd input, the boundary value, the error path nobody exercises by hand. Reading recovered source and judging that it looks right is an opinion. Running it once on a sample file is a demo. Neither is proof. A business that depends on the program needs a stronger claim: the rebuild behaves like the original on a large, documented set of cases, including cases chosen to find differences rather than to confirm them.

That is what differential testing does. It treats the original binary as the specification and the rebuild as a candidate, and it asks whether their outputs match when both are driven by the same inputs. The method is old and ordinary in software engineering. Applied to recovery, it is the step that separates a verified rebuild from a decompiler dump.

How a differential test run works

The recovered source is compiled into a working program. Then both programs, the original and the rebuild, are run on the same generated inputs:

  • Generate fuzz cases. Inputs are produced automatically from what the program accepts: files, flags, record shapes, and value ranges inferred during reconnaissance. The generator is biased toward extremes and combinations a person would skip.
  • Run both programs. Each case is fed to the original binary and to the rebuild under the same conditions.
  • Compare outputs exactly. Exit codes, written files, and printed output are compared byte for byte, or field for field when the format is structured. A mismatch is a divergence.
  • Fix and retest. Each divergence is traced in the recovered source, corrected, and the full suite is run again until the run is clean.

The deliverable is not a slogan. It is a report that states how many cases ran, what matched, what did not, and any known limitations of the test setup. That report is what the Verified Recovery tier includes.

What zero divergence means

Zero divergence means every case in the final test run produced matching output between the original and the rebuild. It is a concrete, checkable claim about the cases that were run. On this site the measured record is stated the same way everywhere:

  • 9 of 9 C and C++ test targets recovered to compilable source, with zero divergence across thousands of fuzz cases per target.
  • 8,127 lines recovered from bzip2 1.0.8.
  • The test set included the sbase sort, tar, and find utilities, bzip2 1.0.8, a C++ text statistics tool, and a hostile build compiled with aggressive optimization, link time optimization, and stripped symbols.
  • Delphi and Object Pascal feasibility passed on October 19, 2026, on a Free Pascal target, verified across 4,654 fuzz cases. Embarcadero Delphi and VCL forms work is less certain and starts with a recon verdict on the specific binary.

Those numbers are the same proof numbers published on the homepage. They are not estimates, and they are not a claim about every possible program.

Honest limit: fuzz testing proves the rebuild matched the original on every case tested, not on every case possible. It is the strongest evidence available for this work, and it is much stronger than a manual review, but it is not a mathematical proof of equivalence for all inputs.

What zero divergence does not mean

It does not mean the recovered source is character-identical to the original author's text. Compilation strips comments and most original names. The recovered source is a readable, buildable reconstruction of behavior. Differential testing proves behavior, not authorship.

It does not mean every platform recovers equally. Visual Basic 6, managed code, and native C++ leave different amounts of structure behind. Packed or deliberately obfuscated binaries need extra stages first. Some binaries are not realistic recovery candidates at any reasonable price, which is why every engagement starts with a recon verdict.

It does not mean the test covered every input the program could ever see. The suite is large and adversarial by design, but it is finite. The report documents the suite and the limits so a buyer can judge the claim instead of trusting a marketing phrase.

Where this sits in the recovery pipeline

Differential testing is the last stage, not the first. The full pipeline is reconnaissance, decompilation with Ghidra, reconstruction into readable source, recompilation into a working binary, and then differential verification. The process guide walks those stages in order. The can source code be recovered guide explains what comes back and what is lost for good. This page is the proof method behind the last stage, written so a buyer can evaluate the claim before paying for it.

Orphanware Recovery is a one-operator service in Coeur d'Alene, Idaho. Josiah Wilson directs every engagement and signs off on every result. AI agents run the decompilation, reconstruction, and testing pipeline under his direction, which is what makes thousands of verification cases per program practical at fixed prices.

Which tier includes this proof

The published tiers separate the verdict from the proof:

  • Recon Report, $45, about 3 days. Inventory and an honest feasibility verdict. No full recovery and no differential report yet.
  • Source Recovery, $120, about 5 days. Readable recovered source and a recompiled working binary with compile verification, for scope already agreed in a recon.
  • Verified Recovery, $250, about 7 days. Everything in Source Recovery plus the full differential test report: thousands of generated cases, outputs compared exactly, edge cases and known limitations documented.

There is no hourly billing. Larger or multi-program work is quoted from the recon in writing before any commitment. The cost guide explains what drives price and what to compare it against.

If you want the proof before you buy the work, start with the recon. See a sample Recon Report, read the intake checklist, or go straight to the $45 Recon Report.

Start with a $45 Recon Report

An honest verdict on whether your program can be recovered, what it does, and what a full recovery would take. Fixed price, delivery in about 3 days.