← All notes

Build log / July 2026

Building a malware detector from first principles.

I wanted a project that would force me to connect file evidence, detection logic, testing, and the way risk is communicated.

After studying exploits, operating systems, and defensive concepts, I wanted an application project that made those ideas concrete. I chose a small malware-detection tool in Python—not because a beginner project can replace a mature security product, but because building the pieces would expose how detection decisions are made.

Start with dependable file facts

The first version has a deliberately small scope. It accepts a file path, calculates a SHA-256 hash, reports file size and type, handles missing or inaccessible files, and produces both readable terminal output and structured JSON.

Those features are not a verdict. They establish a reliable analysis record that later checks can use and that another person can review.

The next technical layers

The project gives me a reason to study the Windows Portable Executable format, extract strings, inspect imported operating-system functions, calculate entropy, and write rule-based detections with YARA.

Each signal has limits. High entropy can suggest packing, compression, or encryption, but it does not prove malware. An unusual import can deserve attention without making a file malicious. A rule needs testing against both malicious and harmless samples so I can see false positives and false negatives instead of hiding them.

Detection has to become a decision

The business side matters as much as the analysis. A useful report should explain what was observed, why it changes risk, how confident the tool is, and what a human should do next. The long-term goal is not a dramatic “malware” label; it is a transparent chain from file evidence to a reviewable recommendation.