Home > Networking Tips > Network Security > OSI: Securing the Stack, Layer 4 -- Fingerprinting
Networking Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

NETWORK SECURITY

OSI: Securing the Stack, Layer 4 -- Fingerprinting


Michael Gregg
12.04.2006
Rating: -4.48- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Layer 4 of the OSI model is the transport layer. The transport layer is in the middle of the OSI model, with three layers below and three layers above. In this article, I discuss fingerprinting and how it is related to the transport layer. Fingerprinting is the act of operating system (OS) To better understand how fingerprinting works, we first need to review some transport layer basics. identification. For example, is the client running MAC OS 10, BSD or Windows 2003 Server?

Securing the stack series
Bookmark this index for our securing the stack series.
Two protocols are primarily associated with the transport layer: First, there is User Datagram Protocol (UDP), which is a connectionless protocol. UDP offers no mechanisms for reliability; it was designed for speed. Next, there is Transmission Control Protocol (TCP), which is connection-oriented and is designed for reliability. TCP provides reliability by using flow control, checksums for error detection, sequence and acknowledgment numbers, a defined window size, and even a startup and shutdown process.

TCP also uses a set of control bits or flags. These flags are used to control the flow of data. Some common flags include:

  • URG: Specifies urgent data.
  • ACK: Specifies a value. The acknowledgment sequence number is significant and should be examined by the recipient.
  • RST: Specifies a reset. RST can be used to terminate a connection that is experiencing problems.
  • SYN: Specifies a synchronization. The SYN is used to start up a session.
  • FIN: Specifies a finish. A FIN is used at the conclusion of connection to signal a session teardown.
Both TCP and UDP act as middlemen in that they are responsible for making a connection. Specifically, the transport layer is responsible for host-to-host connectivity. When thinking of connectivity, imagine a phone call. The very act of hearing someone answer a phone can (usually) tell you a lot about them -- whether they are young or old, male or female. Fingerprinting works in much the same way, as the attacker is attempting to identify the target. The target needs to be identified before an attack can be launched. Fingerprinting can be an active or passive activity.

Passive fingerprinting

Passive fingerprinting is hard to detect. It does not inject traffic into a network and works much like a packet sniffer. Passive fingerprinting tools examine packets and look at default values in the IP, ICMP and TCP header to determine the type of operating system that created the packets. Passive fingerprinting may not be as accurate as active fingerprinting, but it is stealthy. Programs such as Siphon, Ettercap and p0f are all tools based on the passive fingerprint concept. To get more background on passive fingerprinting, consider reviewing this article from the Honeynet Project: Know your enemy: Passive fingerprinting.

To get a better idea of how passive fingerprinting tools work, let's look more closely at the program p0f. This passive fingerprinting tool uses the p0f.fp file to store known OS fingerprints. A small portion of that file is shown here:

----------------- MacOS -------------------
32768:255:1:48:M*,W0,N:.:MacOS:9.0-9.2
----------------- OpenBSD -----------------
16384:64:1:64:M*,N,N,S,N,W0,N,N,T:.:OpenBSD:3.0-3.4

Look closely at the first entry while I briefly describe the first four fields. First, the value "32768" is the TCP initial window size. Next, the value "255" is the IP time-to-live (TTL). This is followed by a "1" that denotes the IP don't-fragment bit. The fourth field, "48," defines the total length in bytes of the TCP SYN packet. These attributes uniquely define a MAC OS 9 operating system. Compare these values with those shown in the entry for OpenBSD. You should see quite a bit of difference. What this means is that each vendor uses slightly different values when designing an OS. These differences can be used to identify the system. If you would like to learn more about p0f, check out the p0f applications home page.

Active fingerprinting

Active fingerprinting isn't low-key like passive fingerprinting. Whereas passive fingerprinting cannot be detected by an intrusion detection system (IDS), active fingerprinting can. What active fingerprinting provides for hackers is much more accuracy. Active fingerprinting functions by sending oddly formatted TCP packets. The result is that each target responds differently to these malformed packets. Active fingerprinting tools include Xprobe2 and Nmap.

Nmap works by sending out different types of packets to the target host. Once Nmap has identified at least one open and one closed port, it can begin the actual OS identification. Nmap can send out a stream of packets with different TCP flag settings or TCP options. The hope is that one of these packets will cause the targeted system to respond. As an example, one such scan sends a TCP packet with the flag settings of SYN, FIN, PUSH and URGENT. This is not a normal packet.

Defenses against passive scanning are limited, but IDS tools can be used to detect active fingerprinting. Snort can be used to pattern match against known active fingerprinting scans. Morph is another option. Morph is an OS fingerprint confusion tool that attempts to confuse active fingerprinting tools so that they cannot make an accurate discovery.

Whatever your choice, what's important is to understand how these techniques work so that you can better defend against them.

About the author:
Michael Gregg has more than 15 years of experience in IT. Michael is the president of Superior Solutions Inc., a Houston-based training and consulting firm. He is an expert on networking, security and Internet technologies. He holds two associate degrees, a bachelor's degree and a master's degree. He currently maintains the following certifications: MCSE, MCT, CTT, A+, N+, CNA, CCNA, CIW Security Analyst and TICSA.

Rate this Tip
To rate tips, you must be a member of SearchNetworking.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
Network Security
Securing the new network architecture: Security for distributed, dynamic networks
How to configure Windows Server 2008 advanced firewall MMC snap-in
Security across network boundaries with Secure Mobile Architecture
USB storage devices: Two ways to stop the threat to network security
Network security: Using unified threat management (UTM)
Network security: Empower users without endangering IT
Network analysis -- Enhancing security assessments
VPN security: Hiding in plain sight, using network encryption
OSI: Securing the Stack, Layer 8 -- Social engineering and security policy
Anti-spam protocols help reduce spam

The OSI Model
What network monitoring tools monitor all OSI layers?
How do routers and switches differ in the OSI model?
How can I define the layered approach to protocols?
How does a Layer 3 switch work in a network?
OSI -- Securing the stack
OSI: Securing the Stack, Layer 8 -- Social engineering and security policy
OSI: Securing the Stack, Layer 7 -- Applications
OSI: Securing the Stack, Layer 6 -- Encryption
Network security -- Taking the layered approach
Is it possible to convert a Layer 2 switch to a Layer 3 switch?

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
ES-IS  (WhatIs.com)
FTAM  (SearchNetworking.com)
layer 2  (SearchNetworking.com)
Network layer  (SearchNetworking.com)
OSI  (SearchNetworking.com)
physical layer  (SearchNetworking.com)
Session layer  (SearchNetworking.com)
Technical Office Protocol  (SearchNetworking.com)
TP0-TP4  (SearchNetworking.com)
Transport Services Access Point  (SearchNetworking.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersNetworking Product Trials
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2000 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts