Librarian is an open-weight Neural Network trained to detect and flag C2 Domains generated by DGA algorithms.
-
Lightweight Structure
The model uses a lightweight structure, allowing it to be easily run on DNS recursion servers to stop C2 malware -
High Accuracy The model reaches 95.13% accuracy, similar to rates reached by academic papers
-
Ensemble Inference 3 files are used with soft voting to maximise efficacy
-
Automatic Threshold Calculation Optimal threshold is automatically found from validation data
-
Python is used to train the model
- Tensorflow and Keras were used for training
- 11 inputs are mathematically calculated for the model
-
Dense Swish layers - 32 -> 64 -> 32 -> 16 -> 1
Features extracted:
- Shannon Entropy (normalized randomness score)
- Vowel-Consonant Ratio
- Longest Consecutive Consonants
- Dictionary Count (matching top 10k English words)
- Bigram Distribution
- Trigram Distribution
- Total Length
- Digit Percentage
- Longest Consecutive Digits
- Letter/Digit/Symbol Transition Count
- Index of Coincidence
{
"DB Path": "path/to/domains.db",
"Learning Rate": 0.001,
"Batch Size": 256,
"Num Epochs": 10000,
"Num Training Entries": 180000
}-
GAN training to experiment with adversarial generation techinques
-
NEAT implementation to further reduce the model's resource cost
- The model is a series of 3, found under Effective Model 6
- Soft voting is used automatically
- The system calculates the optimal threshold from the testing data