Most of the network traffic uses https protocol and it's difficult to get information about data payloads unless you have access to endpoints.
By using and analyzing initial TLS handshakes, good visibility can be achieved in encrypted traffic to detect the following use cases:
- Breach Detection
- Insider and Advanced Threat Detection
- High Risk Application Detection
- Policy Violations
- Encrypted Traffic Analytics
Fingerprints in the digital world are similar to what human fingerprints are in the real world. A fingerprint is a group of information that can be used to detect software, network protocols, operating systems or hardware devices.
Fingerprinting is used to correlate data sets in order to identify with high probability network services, operating system number and version, software applications, databases, configurations and more. Once the penetration tester has enough information, this fingerprinting data can be used as part of an exploit strategy against the target.
In order to detect OS, networks, services and application names and numbers, attackers will launch custom packets to the target. These packets will receive a response from the victim in the form of a digital signature. This signature is one of the keys to identify what software, protocols and OS is running the target device.
Fingerprinting techniques are based on detecting certain patterns and differences in network packets generated by operating systems. These often analyze different types of packets and information such as TCP Window size, TCP Options in TCP SYN and SYN+ACK packets, ICMP requests, HTTP packets, DHCP requests, IP TTL values as well as IP ID values, etc.
Active fingerprinting is the most popular type of fingerprinting in use. It consists of sending packets to a victim and waiting for the victim’s reply to analyze the results. This is often the easiest way to detect remote OS, network and services. It’s also the most risky as it can be easily detected by intrusion detection systems (IDS) and packet filtering firewalls. A popular platform used to launch active fingerprint tests is Nmap. This handy tool can help you detect specific operating systems and network service applications when you launch TCP, UDP or ICMP packets against any given target.
Passive fingerprinting is an alternative approach to avoid detection while performing your reconnaissance activities. The main difference between active and passive fingerprinting is that passive fingerprinting does not actively send packets to the target system. Instead, it acts as a network scanner in the form of a sniffer, merely watching the traffic data on a network without performing network alteration.
In cybersecurity fingerprinting, one of the most popular methods involves OS name and version detection and is part of usual data intelligence process when running your OSINT research. While many tools may fit into this particular category, the following tools are popular in security community:
Nmap has many features as a port scanner, but also as an OS detection software.
A simple OS detection query using nmap looks like this:
$ sudo nmap -O X.X.X.X
In case there is a firewall blocking your request, you can add the -Pn option, as shown below:
$ sudo nmap -O X.X.X.X -Pn
A more aggressive approach can be taken by using -A option, but this may result in firewall detection from the remote host:
$ sudo nmap -A X.X.X.X
P0f offers a good alternative to Nmap and cane be used as a passive fingerprinting tool used to analyze network traffic and identify patterns behind TCP/IP based communications that are often blocked for Nmap active fingerprinting techniques. It includes powerful network-level fingerprinting features, as well as one that analyzes application-level payloads such as HTTP. It’s also useful for detecting NAT, proxy and load balancing setups.
Once installed, you can perform any fingerprinting against the network by running:
$ p0f -i eth0
It is also possible to read offline pcap file
$ p0f -r some_capture.cap
Ettercap (http://ettercap.github.io/ettercap/)
Ettercap is network sniffing tool that supports many different protocols including Telnet, FTP, Imap, Smb, MySQL, LDAP, NFS and encrypted ones like SSH and HTTPS.
This tool is often used to launch man-in-the-middle attacks by the hackers. However, it is useful as a fingerprinting tool that can help identify local and remote operating systems along with running services, open ports, IP, mac address and network adapter vendor.
Ettercap can be easily installed on most Unix/Linux platforms. In order to perform OS and service detection, it will sniff the entire network and save the results in profiles.
In addition to fingerprinting remote OS names and versions, it is also possible to fingerprint specific network services.
Hassh (https://github.com/salesforce/hassh) has become de-facto SSH Fingerprinting standard to accurately detect and identify specific Client and Server SSH deployments. These fingerprints uses MD5 as a default storage method for later analysis and usage comparisions.
While SSH is a fairly secure protocol, it has a few drawbacks when it comes to analyzing interaction between client and server. In this case, using Hassh can help in situations that include:
- Managing alerts and automatically blocking SSH clients using a Hassh fingerprint outside of a known “good set”.
- Detecting exfiltration of data by using anomaly detection on SSH Clients with multiple distinct Hassh values
- In forensic investigation, SSH connection attempts can be tracked with greater granularity and can be followed up by source IPs. Since "Hassh" based hash is associated with SSH client software, it's possible to detect the origin even if the IP is behind a NAT and is shared by different SSH clients.
- Detecting and identifying specific client and server SSH implementations.
Hassh works by using the MD5 “hassh” and “hasshServer” (created from a specific set of algorithms by SSH clients and SSH server software) in the SSH encrypted channel. This generates a unique identification string that can be used to fingerprint client and server applications. e.g.
c1c596caaeb93c566b8ecf3cae9b5a9e SSH-2.0-dropbear_2016.74
d93f46d063c4382b6232a4d77db532b2 SSH-2.0-dropbear_2016.72
2dd9a9b3dbebfaeec8b8aabd689e75d2 SSH-2.0-AWSCodeCommit
SSL fingerprinting using JA3 ( https://github.com/salesforce/ja3)
JA3/JA3S developed by Salesforce team is an SSL/TLS fingerprint method. This tool allows you to create fingerprints that can be produced on any platform for threat intelligence analysis.
In the same cases, using JA3/JA3S as a fingerprinting technique for the TLS negotiation between both ends (client and server) can produce a more accurate identification of the encrypted communications and helps identify clients and servers with high probability in almost all cases e.g.
Standard Tor Client:
JA3 = e7d705a3286e19ea42f587b344ee6865 (Tor Client)
JA3S = a95ca7eab4d47d051a5cd4fb7b6005dc (Tor Server Response)
DNS fingerprinting using fpdns (https://github.com/kirei/fpdns)
Some tools like Fpdns can be used to identify based on queries DNS the software that is used as the DNS server. This is especially TRUE even if DNS server "BIND" version printing is disabled.
$ sudo apt install fpdns
$ sudo fpdns -D site.com
Replace site.com with the actual site of your interest!
- https://securitytrails.com/blog/cybersecurity-fingerprinting
- https://blogs.cisco.com/security/tls-fingerprinting-in-the-real-world
- https://www.netresec.com/?page=Blog&tag=Satori
- https://www.grc.com/fingerprints.htm
- https://jis-eurasipjournals.springeropen.com/articles/10.1186/s13635-016-0030-7
- Various DNS tools - https://www.dns-oarc.net/tools