You have an address, a handful of bytes, and a value that looks almost right. How do you tell whether you found the right object—or just something that happens to look convincing?
This book teaches you to answer that question. Start with bytes and pointers, work through a small reproducible lab, then connect those skills to DMA acquisition, Unity, and larger analysis tools. You can complete the first exercises with Python and an ordinary computer. Hardware comes later.
The examples use synthetic data and programs you control. The practical goal is to understand and verify memory observations in your own development, research, or authorized analysis environment.
New here? Read Chapter 1, then try the 15-minute lab. Already comfortable with pointers? Jump to the advanced reading path or use the topic finder.
| Chapter | What you will learn |
|---|---|
| 1. Start here | What DMA does, what you will learn, and where to begin. |
| 2. Memory foundations | Bytes, types, pointers, address spaces, and object lifetime. |
| 3. Tools and your first lab | A useful setup and a first result without hardware. |
| 4. Offsets and signatures | Find, describe, and validate locations without guessing. |
| 5. Acquisition | Connect the source, transport, translation, and analysis layers. |
| 6. Reading memory reliably | Exact reads, bounded decoding, and consistency. |
| 7. Controlled experiments | Change known inputs and distinguish observation from causation. |
| 8. Protections and observability | IOMMUs, permissions, and the limits of visibility claims. |
| 9. Troubleshooting | Work from a symptom to the smallest discriminating check. |
| 10. Unity in practice | Mono, IL2CPP, managed objects, and your own instrumented build. |
| 11. Address translation | Page tables, page boundaries, and missing pages. |
| 12. Performance and freshness | Batching, caches, latency distributions, and useful throughput. |
| 13. Reproducibility and tool design | Versioned layouts, evidence records, and dependable exports. |
| 14. Build a trustworthy reader | An end-to-end project with measurable acceptance criteria. |
| 15. Strings and collections | Decode text and variable-length records with explicit units and bounds. |
| 16. Modules, symbols, and build identity | Relate loaded addresses, file bytes, symbols, and exact builds. |
| 17. Comparing captures | Separate layout changes from meaningful changes in application state. |
| 18. Polling and replay | Handle duplicates, failures, generation changes, and observation age. |
| 19. Testing unfamiliar layouts | Challenge a decoder with boundaries, mutations, and independent evidence. |
| 20. A complete investigation | Turn several captures and a replay trace into a defensible conclusion. |
- Runnable labs and expected output
- Advanced lab for Chapters 15–20
- Glossary
- Checkpoint answers
- Worked exercises for Chapters 15–20
- Sources and further reading
- Corrections to the earlier guide
- Experiment record template
- Contributing and checking the book
Read Chapters 1, 2, and 3, then run the lab. Return to Chapter 4 once you can explain why a pointer is different from the value it points to. There is no need to understand page tables on your first day.
Read acquisition, reliable reads, and protections. Complete the lab's failure cases before connecting an acquisition source. Your first milestone is a correct, repeatable observation—not a fast polling loop.
Use Unity layouts, translation, performance, and reproducibility as reference chapters. The capstone gives you acceptance criteria for a reader that survives malformed data and changing layouts.
Chapters 15 through 20 take you from one record to a small investigation: decode a named collection, distinguish module and file locations, compare captures by identity, replay failures, and test the assumptions behind your conclusion. Follow the advanced lab alongside these chapters. It uses ordinary Python and synthetic observations, so you can reproduce the results without a device.
Each of these chapters includes a local contents list, detailed calculations, failure analysis, and exercises with worked solutions. Chapter 15 includes twelve exercises and a strings and collections casebook; Chapters 16–20 each add four. The calculation tools reproduce section mapping, numeric precision, replay state, and the final evidence report.
| If you are wondering… | Read… |
|---|---|
“What does 0x mean?” |
Hex, bytes, and endianness |
| “Which kind of address is this?” | Address spaces |
| “Why did my offset stop working?” | What an offset means |
| “Do I need to buy a board?” | Choose the smallest useful setup |
| “How do MemProcFS and LeechCore fit together?” | Acquisition layers |
| “Why do I keep reading zero?” | Troubleshooting by symptom |
| “Can one read contain two different moments?” | Consistency |
| “Does IL2CPP preserve C# object layouts?” | Unity's managed and native sides |
| “Why doesn't DMA imply unrestricted access?” | IOMMU and platform protections |
| “How do I measure improvements?” | Benchmark design |
| “Does a string length count bytes or characters?” | Text length units |
| “How do I find an RVA in a file?” | Section mapping example |
| “Did the data change, or just its position?” | Semantic comparison |
| “What should a reader do when a sample fails?” | Replay state transitions |
| “How do I challenge my decoder?” | Mutation experiments |
| “What does a finished investigation look like?” | Worked investigation |
Install Python 3.10 or newer. From the repository root:
python labs/memory_lab.py demo
python labs/advanced_lab.py demo
python -m unittest discover -s tests -v
python tools/book.py checkOn systems where Python is named python3, substitute python3. On Windows, py -3 is another common launcher. The examples use the standard library; they require no administrator access, drivers, memory dumps, or DMA hardware.
The lab is a deliberately invented byte format. It is not a Windows memory dump, a Unity object layout, or proof of hardware compatibility. The book labels those boundaries at the point where they matter.
This edition concentrates on reading and interpreting memory, with controlled state changes in your own fixtures or development builds. It includes the reasoning needed to evaluate acquisition results; it does not promise universal offsets, transparent access through platform protections, or an undetectable device.
Technical references were reviewed on 2026-10-23. Examples tied to external tools are identified separately from the locally executable labs. See the source notes for version-sensitive topics and the corrections for changes from the earlier overview.
The original README contained the whole guide. These landing points preserve its chapter headings while the contents above lead directly to the expanded chapters.
Continue to Chapter 1: Start here.
Continue to Chapter 2: Memory foundations.
Continue to Chapter 3: Tools and your first lab.
Continue to Chapter 4: Offsets and signatures.
Continue to Chapter 5: Acquisition.
Continue to Chapter 6: Reading memory reliably.
Continue to Chapter 7: Controlled experiments.
Continue to Chapter 8: Protections and observability. The earlier stealth claims are addressed in the corrections.
Continue to Chapter 9: Troubleshooting.
Continue to Chapter 10: Unity, then address translation, performance, and reproducibility.