research pair · malware gym RL × hardened detector

adversarial-malware-lab

A portfolio research pair: a static-analysis detector (sklearn ensemble over a static PE feature vector), a Malware Gym RL environment whose discrete actions are functionality-preserving PE mutations, and a pure-NumPy Q-learning evader that learns to evade it — followed by an adversarial-retraining loop that hardens the detector. Run real RL episodes in your browser in seconds.

static-analysis detector  malware gym RL  pure-numPy agent  adversarial retraining  before/after robustness

Train the RL evader against the detector

Runs N episodes of tabular Q-learning (pure NumPy) against the embedded detector. Mutation cost −0.10, threat-drop shaping, +1.0 on evasion.

run a simulation to see the episode learning curve, before/after robustness and the learned mutation strategy.

Mutate one binary and watch its score fall

Pick a malicious sample from the pool. The learned agent applies up to K functionality-preserving PE mutations; a final score below 0.50 = evasion.

run an evasion attempt to see the detection score before / after and the mutation list.

Harden the detector against the evader

Refit the detector on the corpus augmented with samples mutated by the evader, then measure the recovered detection rate on evasive samples.

retrain to see detection recovered on mutated malware without losing accuracy on clean malware.

detector pool · 40 malicious binaries · threat threshold 0.50 · max mutations per episode 6