All models

Endgame-DGA

Character-level LSTM that flags domain names produced by malware domain generation algorithms.

Language · 1,658 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (134 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
136.8K
Operations
1,658
Framework
PyTorch
Recurrent
Yes
Published
2016
Cited by
339 (as of 27 November 2026)
Authors
Jonathan Woodbridge, Hyrum S. Anderson, Anjum Ahuja, Daniel Grant
License
GPL-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m14379
Graph hash
1549caf087cf656fa0d1f6bebb55543e12e0cb6895aa95d98a43c64840269f12
Skeleton hash
6fdc0d8d0789661d7c98262dfa067b71f61631f85eacf8096b29b79804d13f79
Architecture hash
d71772533b5d2f05a3788de40d5dad865e58a74ad4149e82a1519a2f71711aa4
Diagram SHA-256
d783f6dc2bc3a4626377ce9e1cc0285efb5c441a12e76e6392eef2c90dba591f
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

The Endgame DGA LSTM is a character-level classifier that reads a raw domain name and predicts in real time whether a domain generation algorithm (DGA) produced it. Many malware families use DGAs to generate a large number of pseudo-random domain names for reaching a command and control server. Blocking that traffic normally means reverse engineering each sample and blacklisting its domains, a process malware authors circumvent with many seeds or a dynamic seed list. Classifying each queried domain on its own, with absolutely no contextual information, instead alerts administrators to malware on their networks.

The model is compact: an embedding layer, an LSTM layer and a fully connected output layer that is simple logistic regression. A trivial pre-processing step removes top-level domains and converts all characters to lowercase. The input alphabet consists of nonredundant valid domain name characters: lowercase alphanumerics, period, dash and underscore. The embedding dimension d is 128, chosen larger than the alphabet to give the model extra degrees of freedom, though results were relatively insensitive to that choice. The LSTM layer acts as implicit feature extraction, learning patterns of characters rather than representing a name as a bag of bigrams. In the published Keras code the binary model is an LSTM of 128 units, a Dropout of 0.5 and a Dense layer with a single output. Input sequences are padded to a maximum length of 75 characters.

A multiclass variant produces nb_classes scores, one for each family known by the classifier, through a softmax so the scores form a distribution. Benign training domains come from the Alexa top 1 million. DGA domains come from the OSINT DGA feed from Bambenek Consulting, thirty families and approximately 750,000 examples. In binary classification the LSTM reaches an AUC of 0.9993 against 0.9939 for the bigram logistic regression model. In production terms, the LSTM model classifies 90% of all DGAs with a 1 in 10,000 false positive rate. Multiclass attribution reaches a micro-averaged F1 score of 0.9906. Only the LSTM classifier consistently detected suppobox, an English dictionary-based DGA, apparently by learning the dictionary it uses. The released repository implements only the LSTM and bigram classifier from the paper, and the captured member is that binary LSTM, classifying domains as DGA or benign. Unlike the paper, the repository generates its own DGA domains from the 11 algorithms it carries.

Key idea. The paper introduces an LSTM network to predict DGA-generated domains from raw characters, with no hand-picked features or contextual information. It reports significant improvements over previous real-time and retrospective techniques on open datasets.

  • DGA
  • domain generation algorithm
  • LSTM
  • domain name
  • command and control
  • Alexa top 1 million
  • Bambenek OSINT feed
  • bigram logistic regression
  • suppobox
  • matsnu
  • dga_predict

AI-written summary, checked automatically against its sources; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{woodbridge2016predictingdomaingenerationalgorithms,
      title={Predicting Domain Generation Algorithms with Long Short-Term Memory Networks}, 
      author={Jonathan Woodbridge and Hyrum S. Anderson and Anjum Ahuja and Daniel Grant},
      year={2016},
      eprint={1611.00791},
      archivePrefix={arXiv},
      primaryClass={cs.CR},
      url={https://arxiv.org/abs/1611.00791}, 
}