Covert Channels in TCP and IP Headers Drew Hintz

Slides:



Advertisements
Similar presentations
Module X Session Hijacking
Advertisements

SPATor: Improving Tor Bridges with Single Packet Authorization Paper Presentation by Carlos Salazar.
IPSec.
Network and Application Attacks Contributed by- Chandra Prakash Suryawanshi CISSP, CEH, SANS-GSEC, CISA, ISO 27001LI, BS 25999LA, ERM (ISB) June 2006.
Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
Configuring a Router with RIP Basic Configuration and Show Commands.
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
1 CS 4396 Computer Networks Lab Transmission Control Protocol (TCP) Part I.
1 Chapter 3 TCP and IP. Chapter 3 TCP and IP 2 Introduction Transmission Control Protocol (TCP) Transmission Control Protocol (TCP) User Datagram Protocol.
BZUPAGES.COM 1 User Datagram Protocol - UDP RFC 768, Protocol 17 Provides unreliable, connectionless on top of IP Minimal overhead, high performance –No.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
Traffic Management - OpenFlow Switch on the NetFPGA platform Chun-Jen Chung( ) Sriram Gopinath( )
Internet Control Message Protocol (ICMP). Introduction The Internet Protocol (IP) is used for host-to-host datagram service in a system of interconnected.
1 Chapter Six - Errors, Error Detection, and Error Control Chapter Six.
Sanjay Goel, School of Business/Center for Information Forensics and Assurance University at Albany Proprietary Information 1 Unit Outline Information.
CMSC 414 Computer and Network Security Lecture 21 Jonathan Katz.
Oct 19, 2004CS573: Network Protocols and Standards1 IP: Datagram and Addressing Network Protocols and Standards Autumn
CMSC 414 Computer and Network Security Lecture 26 Jonathan Katz.
Anonymizing Network Technologies Some slides modified from Dingledine, Mathewson, Syverson, Xinwen Fu, and Yinglin Sun Presenter: Chris Zachor 03/23/2011.
IP/ICMP Translation Algorithm (IIT) Xing Li, Congxiao Bao, Fred Baker
Gursharan Singh Tatla Transport Layer 16-May
FIREWALL TECHNOLOGIES Tahani al jehani. Firewall benefits  A firewall functions as a choke point – all traffic in and out must pass through this single.
SSH Secure Login Connections over the Internet
PPP (Point to Point Protocol)
CECS 5460 – Assignment 3 Stacey VanderHeiden Güney.
1 Internet Protocol: Forwarding IP Datagrams Chapter 7.
8: Network Security8-1 Security in the layers. 8: Network Security8-2 Secure sockets layer (SSL) r Transport layer security to any TCP- based app using.
Presentation on Osi & TCP/IP MODEL
Page 19/13/2015 Chapter 8 Some conditions that must be met for host to host communication over an internetwork: a default gateway must be properly configured.
Covert Communications Simple Nomad DC Feb2004.
Characteristics of Communication Systems
Distributed Denial of Service CRyptography Applications Bistro Presented by Lingxuan Hu April 15, 2004.
1 TCP/IP Perversion Rares Stefan, Third Brigade Inc. SecTor 2007.
Introduction to Networks CS587x Lecture 1 Department of Computer Science Iowa State University.
TCP Lecture 13 November 13, TCP Background Transmission Control Protocol (TCP) TCP provides much of the functionality that IP lacks: reliable service.
CS332, Ch. 26: TCP Victor Norman Calvin College 1.
University of the Western Cape Chapter 12: The Transport Layer.
1 The Internet and Networked Multimedia. 2 Layering  Internet protocols are designed to work in layers, with each layer building on the facilities provided.
CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
Layer 3: Internet Protocol.  Content IP Address within the IP Header. IP Address Classes. Subnetting and Creating a Subnet. Network Layer and Path Determination.
1 Chapter Six - Errors, Error Detection, and Error Control Chapter Six.
Traffic Management - OpenFlow Switch on the NetFPGA platform Chun-Jen Chung( ) Sriram Gopinath( )
Institute of Technology Sligo - Dept of Computing Chapter 12 The Transport Layer.
Covert Channels Drew Hintz. At A Glance Definitions Who are you? Who are “they”? A Couple Good Solutions A Couple Really Good Solutions Demo Tool.
CSE 592 INTERNET CENSORSHIP (FALL 2015) LECTURE 22 PHILLIPA GILL - STONY BROOK U.
CMSC 691 IAUMBC Analysis and Detection of Network Covert Channels Sweety Chauhan CMSC 691 IA 30 th Nov. 2005
Internet Protocol Version 4 VersionHeader Length Type of Service Total Length IdentificationFragment Offset Time to LiveProtocolHeader Checksum Source.
© Jörg Liebeherr (modified by Malathi Veeraraghavan) 1 Overview Formats, Data Transfer, etc. Connection Management.
Firewalls A brief introduction to firewalls. What does a Firewall do? Firewalls are essential tools in managing and controlling network traffic Firewalls.
Role Of Network IDS in Network Perimeter Defense.
4343 X2 – The Transport Layer Tanenbaum Ch.6.
Lecture 17 Page 1 Advanced Network Security Network Denial of Service Attacks Advanced Network Security Peter Reiher August, 2014.
Chapter 3 TCP and IP 1 Chapter 3 TCP and IP. Chapter 3 TCP and IP 2 Introduction Transmission Control Protocol (TCP) User Datagram Protocol (UDP) Internet.
K. Salah1 Security Protocols in the Internet IPSec.
Mike Switlick. Overview What is a covert channel? Storage / Timing Requirements Bunratty attack Covert_tcp Questions.
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 2 v3.1 Module 8 TCP/IP Suite Error and Control Messages.
Network Models. 2.1 what is the Protocol? A protocol defines the rules that both the sender and receiver and all intermediate devices need to follow,
The Transport Layer Implementation Services Functions Protocols
PPP Protocol.
PPP PROTOCOL The First semester
TCP.
Introduction to Networking
Transport Layer Unit 5.
Network Security: IP Spoofing and Firewall
SSH: SECURE LOGIN CONNECTIONS OVER THE INTERNET
Outline Using cryptography in networks IPSec SSL and TLS.
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
PPP Protocol.
Presentation transcript:

Covert Channels in TCP and IP Headers Drew Hintz

Drew Hintz At A Glance Who are you? Who are they? Definitions Analysis of some covert channels Attack against timestamp covert channel Detection and prevention New covert channel tool

Drew Hintz Who Are You? Need to communicate covertly, but typical encryption is not the complete solution. Why not just encrypt? –Encryption may be outlawed –Key escrow may be mandatory US & UK Government –Might raise too many eyebrows Thrown in jail in China Employer may question what you are doing ‘Malicious’ code command and control

Drew Hintz Who are “they”? Casual Observer –Watching everyone –Automated systems sifting on keywords –Can only keep minimal state on traffic Dedicated Observer –Looking specifically at a few suspect people –All portions of traffic closely monitored –Many resources available, can easily keep state

Drew Hintz How covert is covert enough? Semi-Covert: Fooling the Casual Observer –If examined, traffic appears unusual –Assumes “they” won’t bother looking –Detecting it requires a low to moderate amount of work Truly Covert: Fooling Everyone –Traffic appears completely normal –Will work even if “they” know the procedure used –Detecting it is as hard as breaking the underlying cryptography

Drew Hintz Two Types of Covert Channels Extra communication to a host Hiding the fact that you’re even communicating with a host

Drew Hintz Extra Communication to a Host Useful when you must hide the fact that you’re encrypting data Method –Uses some amount of cover/permissible traffic –Sender embeds covert message outbound –Receiver gets traffic as normal –Receiver analyzes traffic, retrieves message

Drew Hintz Finding a Good Covert Channel First find a place that random data is being transmitted naturally –Ex. Initial Sequence Numbers, complex timing of network transmissions –Then replace that random data with your own ‘random data’ which is actually an encrypted message

Drew Hintz A simple example Alice wants to send a message to Bob Alice FTPs Bob a couple of old vacation pictures, meanwhile Bob records all traffic Alice encodes the secret message byte by byte in the padding of several TCP segment headers Bob looks at padding of recorded traffic

Drew Hintz Unseen Path of Communication Useful if you do not want your association with a node to be known –Communicating with a closely scrutinized node –Accessing ‘forbidden’ material –Malicious activity Use another node to relay information for you

Drew Hintz Finding a Good Channel Use a hard to monitor node as an intermediary Protection is possible even if all networks are watched –Mixes, onion routing Prevents association of incoming and outgoing –Also use extra communication covert channel Prevents detection that a node is relaying info

Drew Hintz Unseen Path Example Alice and Bob both are allowed to make requests to the same small webserver To transmit a one, Alice pounds the webserver with heavy traffic To transmit a zero, Alice doesn’t make any requests Bob makes requests to the webserver and measures latencies

Drew Hintz Evaluating a Covert Channel Bandwidth –bits per TCP connection –bits per packet Ease of Detection Permissibility –How often will it be permitted? Prevention Difficulty of Implementing Special Cases or Restrictions

Drew Hintz What are we going to look at? Extra communication covert channels –Needed if encryption is restricted –Hidden path is being looked at heavily by anonyminity researchers TCP/IP Headers –Occurs frequently on networks –Able to piggy-back on legitimate traffic

Drew Hintz TCP URG Pointer Sequence number that points to end of urgent data Only interpreted if URG control bit is set Set the 16-bit URG pointer to the value that you’re transmitting, however do not set the URG bit To be a bit more stealthy, the URG pointer value should be restricted to be near the sequence numbers so that it actually could be pointing at something

Drew Hintz URG Pointer Evaluation Bandwidth –Good: 16 bits per TCP Segment; much less if the URG pointer is restricted to be near sequence numbers Detection –Easy: URG pointer rarely used, and should never be used without setting the URG control bit –Also, URG pointer must actually point to data Prevention –Moderate/Easy, if URG bit is not set, rewrite pointer –Perhaps disallow use of URG

Drew Hintz URG Pointer Eval (continued) Permissibility –Traffic normalizers and some firewalls may clear the URG pointer, especially if the URG control bit is zero Difficulty of Implementing –Easy, simply replace bits in packets in transit Special Cases –Can not be used in TCP segments where the URG pointer is actually being used

Drew Hintz Padding & Reserved bits Similar to URG example Lower bandwidth Padding is easy to detect, because almost always set to zeros Padding and reserved bits may be rewritten by some routers

Drew Hintz IP Type of Service Indicates quality of service requested –Precedence, delay, throughput, reliability, reserved Set the IP ToS byte to your data To be much more stealthy, only modulate the Delay bit

Drew Hintz IP ToS Evaluation Bandwidth –1 byte per IP datagram if using entire ToS field –1 bit per IP datagram if using only delay bit Detection –Easy if using entire ToS field, because the entire field is never used –Moderate if using only the delay bit Look for frequent occurrences of set delay bits

Drew Hintz ToS Evaluation (continued) Permissibility –Passed through tested equipment Prevention –Easy, rewrite all ToS bits –Could slightly alter handling of traffic Difficulty of Implementing –Easy, simply replace bits in packets in transit Special Cases –Could slightly alter actual handling of traffic, but not noticeable

Drew Hintz Initial Sequence Number (ISN) Sequence numbers used to index TCP data being transmitted ISN should be random to prevent TCP session hijacking and spoofing Choose your initial sequence numbers to be the message to be transmitted

Drew Hintz ISN Evaluation Bandwidth –Low: 32 bits per TCP connection Detection - ‘Impossible’ Prevention –Difficult, have to proxy all TCP connections

Drew Hintz ISN Evaluation (continued) Permissibility –Will pass through all, except some proxies Difficulty of Implementing –Moderately Easy, simply replace the function used to generate initial sequence numbers Special Cases –Some OSs (such as Windows 98) do not choose random ISNs

Drew Hintz Timestamp Low-bit Modulation TCP option Modulate low bit of TCP timestamp to convey data Presented by Giffin, et al at PET2002 At low bandwidths, the low bit of the timestamp is quite random (based on complex timings)

Drew Hintz Timestamp Evaluation Bandwidth –Low: one bit per TCP segment Detection –Very, very difficult for low bandwidth Prevention –Moderate/Easy, strip out TCP timestamp option Permissibility –Permitted on just about all networks

Drew Hintz Timestamp Eval (continued) Difficulty of Implementing –Moderate, many things must be kept in mind –Must be sure timestamps are monotonically increasing –In order to to this, a fast connection will be slowed down while sending covert data

Drew Hintz Timestamp Detection - Fast When on a fast connection, the sending of TCP segments will be slowed down to a fixed rate Algorithm to detect: –Count number of different & total timestamps sent by a particular host –Calculate the ratio of total to different timestamps –If timestamp covert channel is being used on a sufficiently fast network, the ratio will converge to about 1.94 To prevent slow down more than needed

Drew Hintz Timestamp Detection - Slow For even a slow connection, it is very difficult, but possible, to detect The covert channel makes the low bit more random than it normally is Algorithm: –Record all the low bits of the timestamp –Put them through a complex randomness test –If very random, then covert channel being used To prevent introduce some non-random data

Drew Hintz Detection and Prevention Detect anomalous traffic –Some IDSs can do this, but it can be very noisy Perform normalization of traffic –norm –BSD pf –Use a pump method to defeat timing channels Can not close all covert channels, only possible to decrease bandwidth and ease

Drew Hintz Implementation Issues Encryption must happen at some level Is data being transmitted? What data is being transmitted? Reliability vs. Bandwidth

Drew Hintz Encryption is a Key Component Good encryption must be used for theoretically secure covert channels Assume covert channel method is well known Must ensure same ciphertext is not transmitted multiple times –Stream cipher initialized with a common time and key could be used

Drew Hintz Is data being transmitted? Send checksum at end of each sequence of data –Receiver examines traffic and attempts to find data/checksum matches Checksum must be securely keyed, otherwise attacker could do the same Magic flag that receiver watches for

Drew Hintz What Data is being Transmitted? Can use unmodified portion of header and data as a nonce Use the hash of the nonce as an index into the data being transmitted Transmit data sequentially Implement more advanced protocols

Drew Hintz Reliability vs. Bandwidth Using hash of nonce provides high reliability, low bandwidth, simple solution Transmitting data sequentially provides high bandwidth, low reliability, simple solution Implementing a more advanced protocol is ideal for long messages

Drew Hintz Covert Channel Tool Sending component is a proc Linux Kernel Module that modifies outgoing TCP/IP traffic by replacing hard_start_xmit Receiving component sniffs incoming traffic using libpcap

Drew Hintz Implemented Covert Channels Initial Sequence Number TCP Timestamp low-bit modulation –Has high-speed protection Urgent Pointer IP Type of Service TCP Reserved Bits

Drew Hintz Implemented Data Indexing Sequential transmission of the data SHA of unmodified portions of header and data used as index into the data

Drew Hintz Work to be Done Improve user interface Built-in encryption Add more options for covert channels Analyze how various routers, IDSs, etc. handle illegal data Implement more robust protocol for data transmission (TCP over TCP?) (:

Drew Hintz Any Questions? Get the goods: Shameless plug for OSVDB –Vulnerability database by the community –