Skip to content
Apollon

Adversarial defence for ML-based IDS

Never the same
model twice

Apollon answers every request with a classifier drawn by Thompson sampling. Attackers cannot learn a boundary that keeps moving. Detection stays accurate.

  • Published in Computers & Security, vol. 136, 2024
  • Five classifiers in the pool, one drawn per request
  • Drop-in scikit-learn estimator and command line
One disguised attack, sent again and againSimulation
attacker Apollon picks one model per request ? x′
Apollon
0 / 0 detected
Logistic Regression alone
0 / 0 detected
WhereBehind any flow-based IDS
What it stopsBlack-box evasion
CostOne model per request

The problem

A fixed model is a target

ZOO and HopSkipJump query an IDS, estimate where its decision boundary lies and push an attack just across it. That only works if the same model answers every query.

Attackers probe

Thousands of queries, each a slightly modified attack flow.

They map the boundary

Every answer refines their estimate of where benign begins.

They step across

The smallest change that flips the verdict becomes the evasion.

answered “attack” answered “benign” interval where the attacker still looks for the boundary
Single modelprobing…
Replay the evasion ×10
–
Apollonprobing…
Replay the evasion ×10
–

Same attack, same query budget: a decision-based attack (as HopSkipJump) binary-searches the perturbation δ that flips the verdict, then reuses it. Illustration of the mechanism; measured results are in the paper.

How it works

Sample, don't choose

Every classifier keeps a Beta posterior of how often it is right. Each request draws one value per classifier; the highest draw answers. Good classifiers answer most requests, but no answer is predictable.

Cluster

K-Means splits traffic; every classifier is trained per cluster.

Draw

One Beta draw per classifier; the highest answers this request.

Learn

Analyst feedback updates the posteriors online.

Thompson samplerInteractive
Draw a request to start.

Use it

From CSV to verdict

A scikit-learn estimator for your pipelines and a command line for experiments. Four commands take a CIC dataset from raw CSV files to an adversarial evaluation.

quickstart.pypython
from apollon import ApollonMAB
from apollon.data import prepare

data = prepare("cic-ids2017", ["data/CIC-IDS2017/"])
model = ApollonMAB(random_state=0)
model.fit(data.X_train, data.y_train)

# one Thompson draw per request
pred, arms = model.predict(data.X_test, return_arms=True)

# analyst feedback updates the posteriors
model.update(X_reviewed, y_reviewed)
$ apollon demoshell

        

Evaluation

Tested on real traffic

The paper evaluates Apollon on three public datasets of the Canadian Institute for Cybersecurity, against black-box attacks, and compares it with each classifier of its pool used alone.

DatasetTrafficAttacks
CIC-IDS2017Five days, enterprise networkDoS, DDoS, brute force, web, botnet, scans
CSE-CIC-IDS2018Ten days, large network on AWSSame families, more hosts
CIC-DDoS2019Reflection and exploitationDNS, LDAP, NTP, SNMP, SYN, UDP and more

ZOO

Score-based, zeroth-order optimisation of the attack towards benign.

HopSkipJump

Decision-based: needs only the predicted label.

Two settings

Direct queries to Apollon, and transfer from a surrogate model.

Questions

Does Apollon slow detection down?

No more than a single model: each request costs one cluster assignment, one Beta draw per classifier and one classifier evaluation. Training fits every classifier on every cluster.

Can I use my own classifiers?

Yes. Any scikit-learn classifier with predict_proba can be passed in ApollonMAB(arms=[...]); the paper's pool is RF, DT, NB, LR and MLP.

Does it need labels at run time?

No. Labels are needed to train. Afterwards, analyst feedback is optional: when it arrives, update moves the posteriors of the classifiers that answered.

Which attacks were evaluated?

ZOO and HopSkipJump, targeted towards the benign class, with functional features kept fixed, both querying Apollon directly and transferring from a surrogate.

Can analysts audit a randomised answer?

Predictions are reproducible with a seed, and every answer reports which classifier produced it (return_arms=True), so alerts stay auditable.

How do I cite Apollon?

Cite the article in Computers & Security 136, 103546 (2024). BibTeX, APA and IEEE formats are on the citation page.

Put your IDS
on the move

Install the package, run the demo, then point it at your traffic.

$pip install "apollon-ids[attacks] @ git+https://github.com/antoniopaya22/apollon"