Abstract
We present an application of Artificial Intelligence techniques to the field of Information Security. The problem of remote Operating System (OS) Detection, also called OS Fingerprinting, is a crucial step of the penetration testing process, since the attacker (hacker or security professional) needs to know the OS of the target host in order to choose the exploits that he will use. OS Detection is accomplished by passively sniffing network packets and actively sending test packets to the target host, to study specific variations in the host responses revealing information about its operating system. The first fingerprinting implementations were based on the analysis of differences between TCP/IP stack implementations. The next generation focused the analysis on application layer data such as the DCE RPC endpoint information. Our new approach involves an analysis of the composition of the information collected during the OS identification process to identify key elements and their relations. To implement this approach, we have developed tools using Neural Networks and techniques from the field of Statistics. These tools have been successfully integrated in a commercial software (Core Impact).
Introduction
In cybersecurity, identifying a target's operating system is a fundamental precursor to any penetration test. Selecting the appropriate exploit requires precise knowledge of the host environment, such as distinguishing between Windows Server 2003 and a Linux Kernel 2.6. Traditional tools like Nmap rely on sending a series of "probes"—specific TCP/UDP packets—and comparing the responses to a database of signatures using a "best fit" or Hamming distance approach.
However, this rule-based methodology faces significant challenges. It is often too rigid to handle non-standard network configurations and can suffer from weighting issues where rare operating systems are incorrectly identified due to shared unique traits. Furthermore, simple matching fails to capture the complex, non-linear relationships between different packet headers.
Methodology
To address these limitations, we proposed a system utilizing Multi-Layer Perceptrons (MLP) trained via backpropagation. Our approach employs a hierarchical classification structure, using a tree of specialized networks to first categorize the OS family and then refine the specific version or kernel.
Network Probes and Data Processing
The system analyzes responses from various network probes. These probes include specific TCP flags and port states designed to elicit unique responses from different IP stack implementations.
To make training feasible, we applied dimensionality reduction techniques:
- Correlation Matrix: Eliminated redundant features, reducing the input space for the OpenBSD family from 568 dimensions to 34.
- Principal Component Analysis (PCA): Compressed data while maintaining 98% of the variance.
- Adaptive Learning Rate: Implemented a dynamic learning rate to accelerate training convergence.
Training Data
Due to the impracticality of scanning thousands of diverse real-world machines, we utilized Monte Carlo simulations to generate synthetic training data based on Nmap's rules and empirical OS distribution statistics.
Results
The neural network approach demonstrated superior performance, particularly in handling complex application-layer data like DCE-RPC endpoint information. In head-to-head testing, the neural network module achieved zero errors, significantly outperforming the traditional "best fit" algorithm.
Key performance highlights include:
- High Precision: The system provided confidence scores as high as 0.996 for Windows 2000 Server SP1.
- Efficiency: By identifying discriminative fields, we built lightweight networks requiring as few as four hidden neurons.
- Probabilistic Logic: Unlike linear scoring, the MLP naturally learns the probability of an OS, mitigating the "rare OS" bias.
Conclusion and Future Work
Our research demonstrates that neural networks can effectively bypass the limitations of classical fingerprinting techniques. While synthetic data provided a robust starting point, future work will focus on incorporating real-world network "noise" and firewall-filtering simulations. Additionally, applying these methods to client-side fingerprinting and optimizing existing tools like Nmap by selecting only the most discriminative probes remain promising avenues for further development.
Summary updated