Inspect a program you wrote

Reading time
10 minutes
Written

A toolchain answers questions about a file you are allowed to open. It does not decide whether you are allowed to open it. Ghidra's README describes a local framework for disassembly, decompilation, graphs, and scripts. Microsoft's ildasm shows intermediate language for a managed executable, and the documentation says to use it only with trusted input. The workflow that belongs here is short: write the program, compile it, inspect it, and write down where the tool and the source disagree.

Permission is a separate question

The research brief on toolchains says the legal companion note is the place for copyright limits, and that extracting a commercial application is not a demo this site should host. This essay does not restate that law. It stays on programs written for the exhibit.

The companion file is in the repository [1]. The toolchain brief is [2].

Four columns, and the bytes win

A useful note records the loader's format and image base, one import, one string that appears in the source, and a control-flow graph, each beside the source that produced them. An import is not evidence that the name runs every time. A graph is not a proof of intent. If a decompiler shows something else, the bytes win.

A decompiler's source-like text is a reconstruction. Missing symbols, inlining, and compiler helpers make it diverge from the file the author typed. The divergence is the lesson. Where the tool emits a state machine or a helper the author did not write, the note should say compiler output, not hidden logic.

What the public tools say they are

The README, opened from the Ghidra repository on 28 October 2026, calls Ghidra a software reverse engineering framework created and maintained by the National Security Agency's Research Directorate. The capabilities it names include disassembly, assembly, decompilation, graphing, and scripting, in an interactive mode and an automated mode, with extensions in Java or Python. It warns that some versions have known security vulnerabilities and points at the project's advisory index. This essay does not describe those bugs.

Getting Started, effective as of Ghidra 12.2, requires a Java 25 64-bit JDK and describes a headless batch mode and a PyGhidra mode. It says BSim is a plugin for finding structurally similar functions in collections of binaries. Similarity is not authorship, not a vulnerability finding, and not permission to open a binary you do not control. On this site those automated modes stay in scope only for a build from this repository.

The repository LICENSE file is the Apache License, Version 2.0. That license governs the tool. It does not govern a binary you load.

Microsoft documents ildasm as a companion to the IL assembler. It takes a portable executable that contains intermediate language and writes text the assembler can consume. It operates on PE files on disk, not on files in the global assembly cache, and the page says it should only be used with trusted input.

The ILSpy repository describes the project as a .NET decompiler with support for PDB generation, ReadyToRun, and metadata. A PDB means symbols are already available, so the exercise is comparison, not recovery of a secret.

Tool pages: Ghidra README [3], Getting Started [4], license [5], ildasm [6], ILSpy [7].

An archive format, and the defensive half

Electron's ASAR documentation, opened the same day, calls the format a simple archive used to bundle an application, including to conceal source code from cursory inspection. It also says the archives cannot be modified. Concealment from a glance is the vendor's phrase. The page does not call that encryption.

Electron's security tutorial says, among its recommendations: do not enable Node.js integration for remote content, enable context isolation, enable process sandboxing, do not disable webSecurity, define a content security policy, and use a current Electron version. The same page says disabling webSecurity disables the same-origin policy. This essay does not repeat the insecure examples on that page.

ASAR [8]. Security tutorial [9].

Methodology

The method of this note is a reading. A sentence that states what a public document says is a paraphrase of a page opened on 28 October 2026, and the limit sits in the same paragraph.

NIST Special Publication 800-115, the September 2008 PDF opened on 28 October 2026, says its purpose is to provide guidelines for organizations on planning and conducting technical information security testing and assessments, analyzing findings, and developing mitigation strategies.

Section 2 of the same publication distinguishes testing, examination, and interviewing, and this note does not perform a test.

Section 2.1 of that publication names three phases: Planning, Execution, and Post-Execution.

This note records those phase names and does not copy a technique from the publication.

The CSRC record for the same publication states the purpose again. It is a catalog of the PDF, not a second specification. Special Publication 800-53A and the Open Source Security Testing Methodology Manual are named inside SP 800-115 and were not opened.

Threat model

The OWASP community page on threat modeling, opened on 28 October 2026, says threat modeling works to identify, communicate, and understand threats and mitigations within the context of protecting something of value.

The same page says a threat model typically includes a description of the subject, assumptions, potential threats, actions that can mitigate each threat, and a way of validating the model.

Microsoft's threat modeling tool page, opened on 28 October 2026, says the STRIDE model categorizes different types of threats and simplifies the overall security conversations.

The page names six categories: Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, and Elevation of Privilege.

This note names those six categories and does not repeat the page's examples.

The subject of this threat model is a program the author compiled, on a machine the author controls.

No product, host, or person is named as a target.

The threats that belong here are category names. One is a reconstruction mistaken for the source the author typed. Another is publication of a detail the direction file excludes. Tampering, repudiation, denial of service, and elevation of privilege stay names. They are not carried out, and no impact on a named system is stated. Validation is another reading of the same URLs. Passing a check of this page is not a security validation.

Limitations

The NIST technique sections were named from the table of contents and from the overview in section 2.2. They were not copied. A section title is not a procedure. The STRIDE examples on the Microsoft page were in the fetched HTML and were not brought across. The OWASP page is a community page. The manifesto it names was not opened. A citation inside SP 800-115 is not a reading of the cited work. No command, constructor, bit pattern, or opcode definition is copied into a program. No vulnerability is described.

What stays outside the note

Dynamic analysis, in the brief's boundary, means running a program you wrote, on a machine you control, with a debugger you are allowed to attach, and with the network off or pointed only at a service you run. The note records the input, the output, and the source line. Attaching to another person's process, disabling a protection in someone else's product, and intercepting traffic that is not yours are outside this method. A diff of two builds you produced can ask which changes are the compiler's. A diff of a vendor's unannounced security patch is not a portfolio exercise, and this essay does not describe one.

CY-001, the cybersecurity lab, correlates fictional events. Its heading says signals are not verdicts. The bundled records are invented. It is not a reversing bench, and this essay does not add one.

Direction section 9 allows the security card to be specific about areas, methods, toolchains, and questions. It does not allow a working exploit, a bypass for a live product, a credential, or an unpatched vulnerability detail. This essay stays inside that line.

A specification is not a procedure

The Ghidra language specification index, opened as a raw file on 28 October 2026, says a SLEIGH specification formally describes the translation from the bit encoding of machine instructions, for a particular processor, to human-readable assembly language and into p-code, which that page calls Ghidra's internal representation of code.

The SLEIGH manual, last updated 31 October 2023 in the copy read on 28 October 2026, says it describes the syntax of the SLEIGH processor specification language developed for the Ghidra project. It traces the name to SLED, the Specification Language for Encoding and Decoding, attributed there to Norman Ramsey and Mary F. Fernández. It says the main addition of SLEIGH is semantic description of instructions for data-flow and decompilation analysis. The papers it cites for that lineage were not opened in this pass.

The same manual says the Ghidra decompiler's design follows the basic structure of Cristina Cifuentes' 1994 thesis, Reverse Compilation Techniques, and it lists four stages: translation to an intermediate representation, data-flow transformation, control-flow analysis, and back-end generation. It says SLEIGH implements the first stage. The thesis was not opened. This essay does not specify a transformation.

Language index raw file. SLEIGH manual raw file. The longer working note in the repository is research/wave6/ghidra-method.md. It is not a preview page.

Raw p-code is a translation, and the graph is later

The p-code reference, last updated 16 January 2026 in the copy read on 28 October 2026, says p-code is a register transfer language designed for reverse engineering applications, general enough to model the behavior of many different processors.

The same reference says an instruction is translated into p-code operations on parts of processor state called varnodes, and that this direct translation is called raw p-code. It says raw p-code can emulate instruction execution. This essay does not emulate anything, and it does not define an opcode.

The reference says raw p-code is a first step toward a data-flow graph, not the whole analysis, and it names MULTIEQUAL and INDIRECT as opcodes specific to graph construction. Those names mark a boundary. This essay does not define them.

P-code reference raw file.

Batch mode is named, and the command stays in the install

Getting Started, effective as of Ghidra 12.2, says Ghidra is traditionally run in a graphical mode and is also capable of a headless batch mode from the command line. The page points at a file inside an install for the details. This essay does not repeat a command or that filename.

Direction section 9 allows the security card to name areas, methods, toolchains, and questions. It does not allow a working exploit, a bypass for a live product, a credential, or an unpatched vulnerability detail. This fuller draft adds the public specification language and still adds none of those.

What the disagreement label is for

The SLEIGH manual's account of semantic description is the public reason a reconstruction can contain structure the author of a program did not type. Where a note ever compares source and tool, the label should be specification semantics, compiler output, or decompiler hypothesis. This essay still has no listing to compare.

References

  1. Legal companion in the repository, reverse-engineering-legal-ethics.md. Named, not restated, in this essay.
  2. Toolchain brief, reverse-engineering-toolchains.md. Access date 28 October 2026.
  3. Ghidra README, raw README. Opened 28 October 2026. The project homepage at ghidra-sre.org returned 403 on this pass. The advisory index is named by the README and is not described here.
  4. Getting Started, GhidraDocs/GettingStarted.md. The raw file was the copy read, effective as of Ghidra 12.2.
  5. LICENSE file, Apache License, Version 2.0. The raw file was the copy read.
  6. Microsoft, Ildasm.exe. Opened 28 October 2026.
  7. ILSpy, icsharpcode/ILSpy. Opened 28 October 2026.
  8. Electron, ASAR archives. Opened 28 October 2026.
  9. Electron, security tutorial. Opened 28 October 2026. Insecure examples on that page are not copied.
  10. The cybersecurity lab, cybersecurity.html.
  11. Ghidra language specification index, raw file. Opened 28 October 2026.
  12. SLEIGH manual, raw HTML. Last updated 31 October 2023 on the copy read.
  13. P-code reference, raw HTML. Last updated 16 January 2026 on the copy read.
  14. Working note in the repository, research/wave6/ghidra-method.md. Not served on the preview. Access date 28 October 2026.
  15. OWASP community page on threat modeling, Threat modeling. Opened 28 October 2026. The manifesto and the separate project site were not opened.
  16. Microsoft threat modeling tool page, STRIDE categories. Opened 28 October 2026. Examples on that page are not repeated.
  17. NIST Special Publication 800-115, September 2008, PDF. Title page, purpose, table of contents, and section 2 overview only.
  18. CSRC publication record, SP 800-115. Catalog abstract. Not a second specification.