Algorithm Search⌘K

Intrusion and malware detection

Problems

  • Anomaly detection

    Given data that come mostly from normal behavior, learn a score that is high on points unlike that behavior, and flag the points whose score passes a threshold.

    intro
  • Intrusion detection

    Decide from audit logs, system calls or network traffic which events are attacks, with few missed attacks and few false alarms.

    intro
  • Malware detection

    Decide whether a program or file is malicious from its bytes, its static structure or its behavior when run.

    intro
  • Binary code similarity

    Decide how similar two binary functions or programs are, across compilers and options, to find known bugs or patched code.

    advanced

Algorithms

  • Byte n-gram malware classification

    Represents each executable by the presence of selected byte n-grams and trains a standard classifier to tell malware from clean files.

    O(n L log L) worst1 languagescore
  • Context-triggered piecewise hashing

    Cuts a file where a rolling hash of the last 7 bytes hits a trigger value, hashes each piece to one character, and compares files by the edit distance of these strings.

    O(n log n) worst1 languagescore
  • Isolation forest

    Builds random trees that split on random features and values, and scores a point as anomalous when its average path to isolation is short.

    O(t s d log s + n t log s) worst1 languagescore
  • Linear sweep disassembly

    Decodes instructions one after the other from the start of a code section. It covers every byte, but data mixed with the code is decoded as instructions and can push it out of step.

    O(n) worst · average · best1 languagescore
  • Local outlier factor

    Scores each point by the mean local reachability density of its k nearest neighbors divided by its own, so a point in a sparser place than its neighbors scores well above 1.

    O(n^2 (d + log n)) worst1 languagescore
  • One-class support vector machine

    Learns a region in a kernel feature space that holds most of the training data, by separating the data from the origin with maximum margin, and flags new points outside it.

    O(n^2 d + r n) worst1 languagescore
  • Recursive traversal disassembly

    Decodes instructions by following the control flow from entry points, which skips data but misses code reached only by indirect jumps.

    O(n + e) worst · average1 languagescore
  • System call sequence anomaly detection

    Stores the short sequences of system calls a program makes in normal runs and flags runs with many sequences never seen.

    O(k s) worst1 languagescore
  • k-nearest-neighbor outlier detection

    Scores each point by the distance to its k-th nearest neighbor and reports the m points with the largest scores, with a pruning rule that stops the scan of a point that cannot reach the top m.

    O(n^2 (d + log k) + n log m) worst1 languagescore
  • Content prevalence worm detection

    Finds worms by counting repeated payload substrings with Rabin fingerprints and flagging ones that are common and spread to many addresses.

    O(n s) worst · average1 languagesadvanced
  • Control flow structuring

    Turns the control flow graph of a binary function into structured if, while and switch statements, with as few gotos as possible.

    O(n^2) worst · average · best1 languagesadvanced
  • Logical attack graph generation

    Builds an attack graph of polynomial size by Datalog derivation over host configurations and vulnerabilities, under the monotonicity assumption.

    O(m b n^(b+1)) worst · average1 languagesadvanced
  • Malware behavior clustering

    Turns sandbox traces into sets of behavioral features and clusters samples into families with locality-sensitive hashing and single linkage on the Jaccard index.

    O(n k l d + n^2 (d + log n)) worst1 languagesadvanced
  • PCA subspace method for traffic anomalies

    Projects link traffic onto the residual subspace of its main principal components and flags times when the residual norm passes the Q-statistic.

    O(t m^2 + w m^3) worst1 languagesadvanced
  • Payload anomaly detection

    Models the byte frequency distribution of normal packet payloads per port and length and flags payloads far from it by a simplified Mahalanobis distance.

    O(s + 256 n) worst1 languagesadvanced
  • Support vector data description

    Finds the smallest sphere in a kernel feature space that holds most training points, and flags points outside it.

    O(n^2 d + r n) worst1 languagesadvanced
  • Threshold random walk scan detection

    Detects a scanner by a sequential probability ratio test on whether its connection attempts succeed or fail.

    O(n log n) worst1 languagesadvanced

Techniques

  • Misuse detection

    Detects attacks by matching events against patterns of known attacks. It misses new attacks, and its false alarms depend on how specific the patterns are.

    intro
  • Control-flow flattening

    Puts all basic blocks of a function under one dispatcher loop that picks the next block by a state variable, which hides the control flow.

    core
  • Entropy-based packer detection

    Flags executables whose sections have byte entropy near 8 bits, a sign of compression or encryption by a packer.

    core
  • Opaque predicate

    A condition whose value the obfuscator knows but a static analyzer cannot easily find, used to add fake control flow.

    core
  • Autoencoder anomaly detection

    Trains an autoencoder on normal data and flags inputs whose reconstruction error is large.

    advanced
  • Generic unpacking

    Runs a packed program under monitoring and dumps memory when it executes a page it wrote, which reveals the unpacked code.

    advanced
  • Virtualization obfuscation

    Translates code into bytecode for a random custom virtual machine and ships the interpreter, so analysts must first decode the machine.

    advanced

Concepts

  • Base-rate fallacy in intrusion detection

    Because intrusions are rare, Bayes' rule makes most alarms false unless the false alarm rate is tiny: in Axelsson's example, about 1 in 100,000 just to make half of the alarms real.

    core
  • Metamorphic malware

    Malware that rewrites its own code into a different but equivalent form in each copy, so no fixed byte pattern matches all copies. Unlike polymorphic code, it keeps no constant body.

    core

Theorems

Models

  • Attack graph

    A graph of network states or security conditions and exploits that shows every way an attacker can reach a goal.

    core
  • Attack tree

    An AND-OR tree whose root is an attacker goal and whose leaves are basic steps, evaluated bottom up for cost or probability.

    core
  • Denning's intrusion detection model

    Profiles each subject by statistical metrics of its audit records and flags records that deviate from the profile.

    core