Şef (Chief-Sef)
Research on a security engine that inspects PE files before they are run: machine-learning-assisted static analysis today, extending to hardware isolation in the future.
Real output
$ python tahmin_et.py notepad.exe Dosya: notepad.exe | tur: EXE Boyut_Bayt : 360448 Sifir_Orani : 22.73 Ortalama_Entropi : 3.202 Toplam_API : 310 Supheli_API : 1 DLL_mi : 0 DZ_sayi : 1424 DZ_entropi : 5.8505 (+ 78 dizge ozelligi daha; toplam 86) Zararli olasiligi: %2.0 -> zararsiz (EXE esigi 0.700: dogrulamada zararsiz EXE'lerin %1'i asar) Not: skor EMBER2024'un %50 zararli ornekleminden; gercek ortamda zararli cok daha nadir, gercek olasilik daha dusuktur.
Unabridged output of the native model (EMBER2024, Random Forest, 86 features) on a benign Windows file · 26 October 2026. The command was run in the file's own folder. The tool prints in Turkish: “Zararli olasiligi: %2.0 -> zararsiz” means “probability of being malicious: 2.0% → benign”; the EXE threshold 0.700 is the score that 1% of benign EXEs exceeded in validation, and the note says the score comes from EMBER2024's 50%-malicious sample, so the real probability is lower. Live malware is not run on a personal computer; results on the malicious side come from measurements on the EMBER2024 dataset.
Phase 1 · Static analysis · completed on 25 September 2026 · native model moved to EMBER2024 on 17 October 2026
Project overview
Chief-Sef aims to pre-screen malware by combining PE features, Shannon entropy and API usage. Explainable measurements and the final human decision are at the heart of the design.
Technology
Development process
5 October 2026 · Transparency note: I am not building Şef alone but together with AI. I work with Claude Code for coding, and I also get support from Claude in technical discussions and text drafts. I decide which features are added, how results are interpreted and what gets published; I try to test and verify every output the AI produces. AI is a powerful tool and the decision belongs to a human: the architect of the system is a human, but the tools that write the code are agentic AIs.
- Static feature extraction and a Random Forest model were built on real EMBER data.
- Measurement consistency was examined with temporal and independent tests; Phase 1 closed on 25 September 2026.
- Measurements showed that the model misses most recent .NET malware; an experimental .NET specialist model is in progress to address this.
- The native model moved to EMBER2024 (17 October 2026): both classes from EMBER2024 data, 86 features including string features, balanced training within each file type; the decision criteria were written down before any result was seen.
- Phase 2 (Linux system-call monitoring with eBPF) and Phase 3 (NPU/TEE hardware isolation) have not started yet; they are on the roadmap.
Feasibility and status
In my assessment, Şef is viable as a research and pre-screening layer, but it is not yet at the point of making a security decision on its own. For the Phase 1 model (EMBER 2018, 5 features) the README reports 83.8% temporal accuracy, 90.1% same-period accuracy and a 3.5% independent false-alarm rate.
That model has been replaced by the native model trained on EMBER2024. Thresholds were chosen on held-out training weeks 48–51, for 1% false alarms per file type; the test weeks 52–63 (959,738 files) were measured once with those fixed thresholds:
| File type | Missed malware | False alarms on EMBER2024 benign files |
|---|---|---|
| EXE | 17.7% | 0.83% |
| DLL | 19.5% | 1.43% |
Overall test AUC 0.9865. On 5,635 real benign files from this machine: false alarms 0.25% (EXE) and 0.21% (DLL). How to read these numbers:
- 50% of the test files are malicious. EMBER2024 is sampled 50/50 per week. 0.83% is the share of EMBER2024's benign EXEs that raised an alarm, not the share of alarms that are false. In real use malware is far rarer, so the real probability behind a given score is lower and the share of alarms that are false is higher.
- The DLL false-alarm rate exceeds its 1% target (1.43%). The threshold was set on weeks 48–51; a likely cause is drift over time, but that cause was not measured. The threshold has to be re-validated over time.
- The local validation set is aging. Since it was measured on 9 October, 857 of its files have been deleted and hundreds updated; the 5,635 rows the measurements rely on are frozen instead of being re-scanned.
- The local 0.25% / 0.21% are low partly because of the mix. 61.6% of the local set is .NET (3,471 / 5,635), where the native model almost never alarms (0.03% [0.01-0.16]). On the non-.NET local files the false-alarm rate is 0.51% [0.28-0.91] (EXE 0.28%, DLL 0.55%).
- Random Forest beat LightGBM only against untuned LightGBM; a tuned LightGBM is a separate, not-yet-run experiment.
- .NET is still a weak spot. Measured separately with criteria registered beforehand, same fixed thresholds: in the test weeks, 33.7% of malicious .NET EXEs are missed (17.6% of non-.NET EXEs). On EMBER2024's separate .NET test set the native model misses 49.8% of malware at 1.05% false alarms (86.7% of malicious .NET DLLs); the Phase 1 model missed 92.8% there at 0.46% false alarms. At the same false-alarm rate as Phase 1, the native model misses 59.8% (92.7% of malicious .NET DLLs). Better, not good enough: the .NET specialist model is not yet connected to the prediction tool.
Source of the numbers: README, “Native model” section. The next step is a small, measurable eBPF experiment on Linux. I will consider the NPU/TEE side only once the threat model, the hardware choice and the latency cost are clear.
Browse the technical sources on GitHub →Research notes
- My model scored 90%. On a temporal split, it scored 83.8%When training and test data come from the same month, the score gets artificially easy; the realistic number comes from a temporal split.
- A 90%-accurate model missed 93% of recent .NET malwareAn overall score can hide a subgroup collapsing: the .NET blind spot and the “DLL means benign” shortcut.
Turan Tech