ML for Cyber Security
Sign in to save your progress, earn points, and unlock module exams.
Unit 5 of MLCS
Feature engineering from network traffic and malware binaries, lexical URL features, NLP features for phishing email detection, and malware detection models in practice.
Why a strong feature set carries a simple classifier further than a weak feature set carries a sophisticated one, and the three tests, discriminative, available at decision time, robust to trivial evasion, every feature in this unit is checked against.
Flow-level features, duration, packets per second, packet size statistics, byte ratios, and TCP flag counts, that summarise raw packets into the fixed numeric vector a model can actually learn from, with a runnable summarisation function.
Static analysis features, imported API calls, section entropy, PE header anomalies and string artefacts, and a runnable Shannon entropy function, the single most informative static feature a malware classifier can have.
The five-step production malware-detection pipeline, from static and dynamic feature extraction through scoring, human review of low-confidence predictions, and regular retraining, plus the WannaCry and Mirai case studies that changed how defenders think about features.
Treating a URL as text and letting TF-IDF discover discriminative substrings automatically, a runnable URL tokeniser and TF-IDF classifier, and the trade-off between lexical and hand-engineered structured URL features.
A full TF-IDF plus logistic regression phishing-email pipeline with bigrams, why ngram_range=(1,2) lets the model separately learn phrases like urgent action, a real chart of the actual top ten words a trained model learned to associate with spam, and the SMS Spam Collection benchmark.
Why pure text features miss structural signals, a real feature-importance chart showing sender-link mismatch and urgency-word count outranking raw word counts, the Business Email Compromise case study where there is no malware payload at all, and the five-step combined feature pipeline, plus feature leakage.
A one-page summary table of every topic in this unit, seven self-study questions to test understanding, and a lab exercise building your own structural phishing feature and checking its feature-importance ranking.
Assessments
ML for Cyber Security: Complete Assessment
Start final exam →