Every network carries more information than its users put into it. A packet has fields that are supposed to look random, a connection has a rhythm, a computer asks the Domain Name System (DNS) for names all day long, and a firewall lets some of this through without reading it. A covert channel is what happens when someone uses that slack on purpose. The opener of this series placed the network family on the map and quoted the definitions of 1973 and 1985; the previous part showed marks that are meant to survive. This part goes the other way: hidden signals that are meant to pass unseen through a network, and the defenders who try to see them or to scrub them out. After reading, you will be able to say what Butler Lampson meant by confinement and what the trusted-systems evaluators of the 1980s and 1990s did with his idea, classify any channel as a storage or a timing channel, hide and recover a character in an Internet Protocol (IP) header by hand, estimate a channel's bandwidth, explain how a tunnel through the Internet Control Message Protocol () or the DNS works and how fast it can be, compute how many bytes fit in one DNS query, run two of the published detection tests on toy data, and choose between detecting a channel and destroying it by normalization.

From a shared computer to the network

The idea began inside one machine. In "A Note on the Confinement Problem", published in Communications of the ACM (the magazine of the Association for Computing Machinery) in October 1973, Butler Lampson of the Xerox Palo Alto Research Center imagined a customer who hands data to a service program written by someone else, and asked how to make sure the service cannot pass that data back to its owner (Lampson, 1973, text). He argued that this problem is worse than the service simply not working: a service that fails leaves evidence in its wrong outputs, while a service that leaks usually leaves none. To build intuition he listed the ways out, numbered from 0 to 6, and the list still reads like a catalogue of modern covert channels.

Lampson's leakWhat carries the informationLampson's categoryA network descendant
0. Remember the data and hand it over at the next callThe service's own memory(ruled out first: a confined program must be memoryless)An implant that stores and forwards
1. Write a permanent file in the owner's directoryStorage maintained by the systemStorageA file dropped on a share the attacker reads
2. Create a temporary file and grant the owner accessStorage, read while the service still runsStorageA short-lived object on a cloud service
3. Send a message through interprocess communicationAn ordinary channel misusedStorageA connection to an attacker's server
4. Encode the data in the bill for the service, or in the time chargedA legitimate channelLegitimateData hidden in a field the protocol must carry
5. Use file interlocks: a file open for writing cannot be opened for reading, so its state acts as a shared bitA resource attribute nobody thinks of as dataStorageA header field set to a chosen value
6. Vary the ratio of computing to input and output, or the paging rate, so that another process sees the system slow downThe system's performanceCovertPacket timing and rate

Lampson credited examples 5 and 6 to A. G. Fraser of Bell Laboratories, and noted of example 6 that the channel is noisy but that coding theory lets information through reliably however small the effect, as long as it is not zero, at a rate that may be very low (Lampson, 1973). His remedies are still the two options a network defender has. Masking lets the caller fix every input the service makes into legitimate and covert channels, as a purchase order fixes the price before the work is done; enforcement makes the supervisor see that the confined program's effect on covert channels conforms to that specification, even if that means slowing it down or generating spurious disk references. Where enforcement costs too much, Lampson accepted a cheaper alternative: bound the capacity of the channel and live with some leakage.

The vocabulary shifted afterwards. For Lampson, "covert" meant only the channels not intended for information transfer at all, such as the effect on system load, and he set storage channels apart. The Trusted Computer System Evaluation Criteria (TCSEC) of the United States Department of Defense (DoD), issued in December 1985 and known as the Orange Book (Cabuk, 2006), used covert channel for every channel that violates the security policy and split it into storage and timing channels, the definitions the opener quotes (Department of Defense, TCSEC, 1985). The test is simple to state. In a storage channel, the sender writes something, a value, a flag, an object's existence, and the receiver reads it; in a timing channel, the sender changes when things happen, and the receiver measures it. Every network channel in this part is one or the other, and some are both.

The Orange Book and its pink guide: analysing a channel

What the criteria demanded

The TCSEC made covert channel analysis a condition of its higher classes. A system evaluated at class B2 had to have its developer "conduct a thorough search for covert storage channels" and determine the maximum bandwidth of each one, by measurement or engineering estimation; at B3 the search had to cover covert channels of both kinds; at A1, the highest class, formal methods had to be used in the analysis (TCSEC, sections 3.2.3.1.3, 3.3.3.1.3 and 4.1.3.1.3). Section 8 explained the thresholds quoted in the opener: 100 bits per second was called high because it was roughly the speed at which many terminals of the time ran, and the criteria found it hard to call a system secure if it leaked at the rate of a common output device (TCSEC, section 8).

The Rainbow Series guide of 1993

In November 1993 the National Computer Security Center (NCSC) published "A Guide to Understanding Covert Channel Analysis of Trusted Systems", NCSC-TG-030, one of the coloured "Rainbow Series" guides. Its foreword is signed by the centre's director, Patrick R. Gallagher, Jr.; its acknowledgements name Virgil D. Gligor as primary author, Jonathan K. Millen for the identification and bandwidth estimation sections, and the centre's first covert channel working group, which met from 1989 to 1991 (NCSC-TG-030, November 1993). The guide collects five definitions of a covert channel, from Lampson's 1973 notion of a channel "neither designed nor intended to transfer information at all" through those of Schaefer (1977), Huskamp (1978) and Kemmerer (1983), who described channels that use entities not normally viewed as data objects, to its own policy-based definition consistent with the TCSEC (NCSC-TG-030, section 2.1). It then teaches three things that carry over to networks almost unchanged: how to find channels, how to estimate their bandwidth, and how to handle them.

Finding them: the shared resource matrix. Richard Kemmerer's method of 1983, as the guide describes it, lists the primitive operations of the trusted computing base (TCB) as rows and the attributes of shared resources as columns, marks each cell R where the operation reads the attribute and M where it modifies it, closes the matrix transitively to capture indirect reads, and then examines every column where one process can modify what another, at a level that does not dominate the first, can read (NCSC-TG-030, section 3.2.3). A cell that turns out to be a legal channel is labelled L, one that conveys no useful information N, one where sender and receiver are the same process S; what remains is a candidate covert channel.

Worked example: Lampson's file lock as a matrix (built for this article from the guide's method and Lampson's example 5).

PrimitiveAttribute: lock state of file FWho can call it
open(F)R (it fails if F is open) and M (it sets the lock)High (sender) and Low (receiver)
close(F)M (it clears the lock)High (sender)

Column "lock state of file F" has an M reachable by High and an R reachable by Low, and Low's level does not dominate High's. The channel is not legal (L), it conveys a bit each time (not N), and sender and receiver differ (not S). It is a covert storage channel. The matrix did not need to know anything about intent: it found the channel from the shape of the system.

Estimating bandwidth. The guide gives a formula from Tsai and Gligor (1988) for the maximum attainable bandwidth of a noiseless channel: B(0) = b × (Tr + Ts + 2Tcs)⁻¹, where b is the encoding factor (usually 1), Ts and Tr are the average times for the sender to set and the receiver to read a 0 or a 1 over the possible transitions, and Tcs is the context-switch time (NCSC-TG-030, section 4). Its own worked example, an inode-table channel on a -like system, uses Ts = 3.05 milliseconds, Tr = 12.1 milliseconds and Tcs = 3 milliseconds:

  • B(0) = 1,000 ÷ (12.1 + 3.05 + 2 × 3) bits per second;
  • 12.1 + 3.05 + 6 = 21.15;
  • 1,000 ÷ 21.15 = 47.28 bits per second.

That is above the TCSEC's "acceptable" one bit per second and below its "high" 100, the uncomfortable middle where most real channels sit.

Handling them. The guide's chapter 5 offers three responses (NCSC-TG-030, section 5):

  1. Elimination, by removing the shared resource or the interface feature that creates the channel.
  2. Bandwidth limitation, by adding noise or delay. The guide's example is directly relevant to networks: most systems create process identifiers by incrementing a counter, so a receiver can tell whether a sender created a process in between by checking whether two identifiers it obtains are consecutive, a channel of 10 to 500 bits per second; allocating identifiers pseudo-randomly and non-monotonically reduces it to negligible values at negligible cost. A second example is Wei-Ming Hu's "fuzzy time" of 1991, which randomizes the relation between real and virtual time so that a receiver cannot time events precisely, at a cost the guide reports as 5 to 6% of performance on a VAX.
  3. Auditing, so that use of the channel can be detected and dealt with procedurally.

Hold on to the process identifier. It is the same mistake, a counter that tells an outsider what happened in between, that made the IP identification field useful to attackers a few years later, and the same cure, randomization, that firewalls apply to it today.

The control that survives

The Orange Book was retired, but the requirement lives on. The current catalogue of security controls of the United States National Institute of Standards and Technology (), Special Publication (SP) 800-53 Revision 5, includes control SC-31, Covert Channel Analysis: perform an analysis to identify the avenues for covert storage or timing channels, and estimate their maximum bandwidth. Its enhancements test a subset of channels for exploitability, reduce the maximum bandwidth to organization-defined values and measure bandwidth in the operational environment; the discussion says that analysis is meaningful where information could flow without authorization across security domains, such as systems holding export-controlled information with connections to external networks, and that complete elimination, especially of timing channels, is usually impossible without significant performance impact (NIST SP 800-53 Revision 5, September 2020, SC-31).

Into the network: the first channels in local area networks

Sebastian Zander, Grenville Armitage and Philip Branch surveyed network covert channels and their countermeasures from 1987 to 2006 in Communications Surveys and Tutorials in the third quarter of 2007 (IEEE is the Institute of Electrical and Electronics Engineers). Their history starts with C. G. Girling's "Covert Channels in 's" (a LAN is a local area network), published in the IEEE Transactions on Software Engineering in February 1987, and with work by Padlipsky and colleagues (Zander, Armitage and Branch, 2007). Those first proposals already contain almost every later idea:

  • Addresses as symbols. Encode information in the destination address of a frame, or in the order in which a set of valid addresses is used; the number of bits per frame depends on how many addresses the sender can choose from.
  • Lengths as symbols. Modulate the length of link-layer frames.
  • Time as symbols. Send or stay silent in each time interval, an on/off channel; Girling also suggested lengthening the interval between packets to fight noise, at the cost of capacity.

The same survey records the countermeasures Girling proposed for his own channels: limit the number of possible packet sizes, and let senders emit only a small number of different packet rates, so that the capacity of each channel falls to an acceptable level (Zander, Armitage and Branch, 2007). Wolf (1989) added channels in reserved fields and padding of LAN frames; T. G. Handel and M. T. Sandford II's "Hiding Data in the OSI Network Model" at the first international workshop on information hiding in 1996 walked the seven layers of the Open Systems Interconnection (OSI) model looking for places to hide (Wendzel, Zander, Fechner and Herdin, arXiv:1406.2901).

Storage channels in packet headers

Rowland's covert_tcp, 1996 and 1997

The paper that put header channels in front of a wide audience was "Covert Channels in the Protocol Suite" (TCP is the Transmission Control Protocol) by Craig H. Rowland, published in the online journal First Monday (volume 2, number 5, 1997), with an appendix containing a program, covert_tcp, dated November 1996 (Rowland, First Monday mirror at the University of Łódź). Rowland chose three fields because packet filters and reassembly were less likely to alter them than the option fields: the IP identification field, the TCP initial sequence number (ISN) and the TCP acknowledgement number. He listed the uses plainly: getting past packet filters, sniffers and "dirty word" search engines, and carrying encrypted or unencrypted information through networks that forbid it, which he called TCP/IP steganography.

The IP identification field is a 16-bit value the sender assigns "to aid in assembling the fragments of a datagram", in the words of the IP specification, (RFC) 791 (RFC 791, September 1981). Rowland's first method replaced it with the character to be sent; because his program did no byte ordering, the receiver recovered each character by dividing the field by 256. His paper shows the word HELLO and a line feed crossing between two hosts in packets that looked like connection requests to a web server, one packet per second (Rowland, 1997).

Worked example: "HELLO" in the IP identification field

The values below are those printed in Rowland's capture; the binary column is computed for this article. Each character is shown with its code in the American Standard Code for Information Interchange ().

CharacterASCII codeIdentification field (code × 256)HexadecimalThe 16 bits
H7218,4320x48000100 1000 0000 0000
E6917,6640x45000100 0101 0000 0000
L7619,4560x4C000100 1100 0000 0000
L7619,4560x4C000100 1100 0000 0000
O7920,2240x4F000100 1111 0000 0000
line feed102,5600x0A000000 1010 0000 0000

Decoding is the reverse: 18,432 ÷ 256 = 72, which is H in ASCII. Three things in the table betray the channel before any decoding. The low byte is always zero, which a real identification counter almost never produces six times in a row. The two packets carrying L have the same identification, which an incrementing counter never does. And the sequence jumps up and down instead of rising. Rowland himself noted the second weakness for his sequence-number method: like a substitution cipher, the same character always gives the same value, and he suggested mixing the data with random numbers or encrypting it first.

The ISN method worked the same way at a larger scale: the character multiplied by 16,777,216 (that is, 65,536 × 256), so that H became 1,207,959,552 in the 32-bit sequence number of a SYN packet, and the receiver divided it out again (Rowland, 1997). The third method, the bounce, used a stranger as relay. The sender forged a SYN with the receiver's address as its source and a busy, innocent server as its destination, with the data in the sequence number; the innocent server answered the supposed sender with a SYN/ACK or a reset whose acknowledgement number was the sequence number plus one, and so delivered the hidden byte to the real receiver, from a legitimate address. How the three-way handshake numbers its segments is explained in the TCP connection lifecycle.

What the rate means. One byte per packet at one packet per second is 8 bits per second. Measured against the TCSEC's scale, that is eight times the "acceptable" rate and a twelfth of the "high" one, from a program a few pages long. Rowland's own advice for protection was an application proxy that does not let packets from separate networks pass directly to each other, because a proxy rebuilds every header; a packet filter might stop the channel only if it performed true address translation that rewrote the entire header, which he warned was often not the case (Rowland, 1997).

Random is not random enough: Murdoch and Lewis, 2005

It became common to say that any field filled with random-looking data, the identification field, the ISN, the low bit of the TCP timestamp, is a perfect place to hide encrypted data. Steven J. Murdoch and Stephen Lewis of the University of Cambridge Computer Laboratory showed at the Information Hiding workshop of 2005 that it is not (Murdoch and Lewis, Embedding Covert Channels into TCP/IP, 2005). Real operating systems generate these values with structure, and a passive warden who knows the structure can test for it. Among their tests:

FieldWhat a genuine stack does (as Murdoch and Lewis describe it)What the warden checks
IP identificationOlder Linux (before 2.4) used one global counter; Linux 2.4 and later a per-destination counter for packets that may be fragmentedSequential values across, or within, destinations
IP identificationOpenBSD toggles the most significant bit every rekey interval (3 minutes or 30,000 identifiers) and never repeats a value within an intervalThe toggle pattern; any duplicate
TCP ISNLinux 2.2 and early 2.4 put a time-derived value in the top byte that rises every 5 minutesSubtract the clock and look for the rekey timer
TCP ISNOpenBSD ISNs always have bit 15 clearedAny ISN with bit 15 set
TCP timestampA covert scheme that bumps timestamps to send bits leaves a measurable ratio of distinct valuesThe ratio of distinct values to the span of values

Their conclusion was that a passive warden can detect the earlier schemes because the headers they produce are easily told apart from those of a genuine stack; they then showed how to map encrypted data onto ISNs that are indistinguishable from those of Linux and OpenBSD, so that, once again, only the key holder could prove a message exists (Murdoch and Lewis, 2005). Their paper also examined Nushu, a passive channel in Linux ISNs presented by Joanna Rutkowska in 2004, and found a flaw: when the values used to start its encryption repeated, two ISNs could be combined to cancel the keystream. In practice, then, the strength of a header channel depends on imitating one particular operating system exactly, which is the same lesson the steganalysis part drew for images under the name cover-source mismatch.

The standard changes under the channel: RFC 6864

In February 2013 the Internet Engineering Task Force () updated the identification field's specification in RFC 6864, written by J. Touch. Its abstract observes that the old rule, an identification unique for every datagram of a given source, destination and protocol within the maximum datagram lifetime, would limit connections to 6.4 megabits per second for typical datagram sizes, so existing systems were already violating it. The update defines the field only for datagrams that may be fragmented: for an "atomic" datagram (Don't Fragment set, no more fragments, offset zero), sources may set the field to any value and every device must ignore it (RFC 6864, February 2013). Its security considerations draw the consequence for this part directly: an ignored field is unconstrained, so it can more easily be used as a covert channel, and rewriting it in atomic datagrams to avoid that use is now possible and may be desirable, except where the Authentication Header protects it.

Eleven patterns for every channel

By 2013 there were more than a hundred published hiding techniques in network protocols. Steffen Wendzel of the Fraunhofer Institute for Communication, Information Processing and Ergonomics (FKIE), Sebastian Zander, Bernhard Fechner and Christian Herdin surveyed 109 of them, developed between 1987 and 2013, and showed in ACM Computing Surveys (2015) that they reduce to 11 patterns; 76 techniques, 69.7%, use only four of them: reserved or unused fields (24 techniques), adding redundancy (21), value modulation including its case and least-significant-bit variants (21), and random values (10) (Wendzel, Zander, Fechner and Herdin, arXiv:1406.2901, version of 19 March 2015).

In the table, PDU is a protocol data unit, the Dynamic Host Configuration Protocol, the time to live, the Secure Shell and HTTP the Hypertext Transfer Protocol.

PatternWhat changesExamples the survey lists
Size modulationThe size of a header element or packetLengths of LAN frames (Girling 1987); IP fragment sizes
P2 Sequence (with P2.a Position and P2.b Number of elements)The order, position or count of elementsOrder of HTTP header fields; position of an IPv4 option; number of DHCP options
P3 Add redundancyNew space created to hold dataAn extra IPv4 option or IPv6 destination option; extra HTTP header fields
P4 PDU corruption or lossDeliberately corrupted or dropped packetsCorrupted 802.11 frames
P5 Random valueA field meant to be randomIP identification and TCP ISN (Rowland 1997); DHCP transaction identifier
P6 Value modulation (with P6.a Case and P6.b Least significant bit)One of n allowed values, the case of letters, or low bitsHigh or low TTL; case of HTTP headers; low bits of the TCP timestamp
P7 Reserved or unusedA field the protocol ignoresReserved bits of IPv4 and IPv6 headers
P8 Inter-arrival timeThe gaps between packetsTiming of LAN frames (Girling); keystroke delays in SSH (Shah and colleagues, 2006)
P9 RateThe throughput of a flowDelayed serial-port handshakes
P10 PDU orderThe order of packetsOrder of IPsec packets or TCP segments
P11 Re-transmissionDeliberately repeated packetsSending selected DNS requests once or twice

Patterns P1 to P7 are storage channels and P8 to P11 timing channels. The authors' practical point is that defences can be designed per pattern rather than per channel: a normalizer that zeroes reserved fields defeats every P7 channel at once, including ones not yet invented. The survey also notes that P5 values are rarely truly random, citing Murdoch, which is why the random-value pattern remains detectable.

Timing channels on the wire

On, off and replayed

Serdar Cabuk, Carla Brodley and Clay Shields presented a working IP covert timing channel, "IP covert timing channels: design and detection", at the ACM Conference on Computer and Communications Security (CCS) in October 2004, and Cabuk's doctoral thesis of 2006 at Purdue University's Center for Education and Research in Information Assurance and Security (CERIAS) develops it (Cabuk, Network Covert Channels, CERIAS Technical Report 2006-53). Their simple channel sends a 1 by transmitting a packet in a time interval and a 0 by staying silent, with synchronization sequences to keep sender and receiver aligned; the thesis measures how contention noise (other traffic the receiver sees) and clock skew (jitter in the network) reduce its accuracy. The thesis then introduces time-replay channels, which record the inter-packet delays of legitimate traffic and replay them as symbols, so that the covert traffic has the same distribution as normal traffic.

JitterBug, from G. Shah, A. Molina and M. Blaze's paper "Keyboards and covert channels" (USENIX Security Symposium, 2006), went further: a compromised keyboard adds tiny delays to keystrokes so that the gaps between packets of an interactive network session, such as an SSH login, carry the bits, without any compromise of the computer itself and without creating new traffic; for small timing windows its traffic looks almost exactly like the original (Gianvecchio and Wang, CCS 2007, describing JitterBug). Steven Gianvecchio and Haining Wang distinguish active timing channels, which generate their own traffic and are faster, from passive ones such as JitterBug, which modulate existing traffic and are harder to detect.

How they are detected

Gianvecchio and Wang, of the College of William and Mary, sorted the detectors into two families (Gianvecchio and Wang, 2007):

  • Shape tests look at first-order statistics, the mean, variance and distribution of the delays. The Kolmogorov-Smirnov test measures the largest distance between the observed distribution of delays and a reference one.
  • Regularity tests look at how those statistics change over time. Cabuk's regularity test cuts the delays into windows of w values, computes the standard deviation σᵢ of each window, and reports the standard deviation of the relative differences |σᵢ − σⱼ| ÷ σᵢ over all pairs i < j. Legitimate traffic changes its variability from moment to moment; a covert channel with a fixed encoding tends not to, so its regularity score is low. Cabuk's second test, ε-similarity, measures the proportion of similar delays, because an on/off channel clusters its delays at multiples of the interval.

Their own contribution, an entropy-based detector, uses the entropy of the delay distribution to catch abnormal shape and the corrected conditional entropy, an estimate of entropy rate designed for small samples, to catch abnormal regularity; in their experiments the combination detected the on/off channel, a replay channel and JitterBug, while previous tests failed against a channel whose distribution is close to that of legitimate traffic (Gianvecchio and Wang, 2007). Cabuk's thesis records the limit on his own side: the regularity measures failed once noise exceeded about 10%, and replayed delays defeat distribution analysis under certain assumptions (Cabuk, 2006).

Worked example: the regularity test on twelve delays

Numbers chosen and computed for this article, with windows of w = 4 delays in milliseconds and population standard deviations.

WindowCovert on/off traffic (interval 20 ms)σInteractive legitimate trafficσ
120, 40, 20, 6016.585, 120, 30, 1545.62
240, 20, 20, 6016.58300, 10, 80, 900350.17
320, 20, 40, 4010.0012, 8, 15, 102.59

Covert traffic: the relative differences are |16.58 − 16.58| ÷ 16.58 = 0, |16.58 − 10.00| ÷ 16.58 = 0.397 and |16.58 − 10.00| ÷ 16.58 = 0.397; their standard deviation is 0.187. Legitimate traffic: |45.62 − 350.17| ÷ 45.62 = 6.676, |45.62 − 2.59| ÷ 45.62 = 0.943 and |350.17 − 2.59| ÷ 350.17 = 0.993; their standard deviation is 2.691. The covert flow is fourteen times more regular. Notice also that every covert delay is a multiple of 20 ms, which is exactly what ε-similarity counts. A channel that replays recorded human delays would defeat both numbers, which is why Gianvecchio and Wang added entropy measures.

Tunnels: when the channel carries a whole protocol

A covert channel carries a few bits in a place nobody looks. A tunnel carries an entire conversation, often a full IP connection, inside another protocol that a firewall lets through. (Adversarial Tactics, Techniques, and Common Knowledge), the knowledge base of attacker behaviour, defines protocol tunnelling as explicitly encapsulating one protocol within another to avoid detection or filtering, or to reach systems that would otherwise be unreachable, and lists (DoH) among the ways to hide it (MITRE ATT&CK, T1572, last modified 3 September 2026). Tunnels are covert in the sense of the opener only when the looks ordinary; their capacity, unlike that of a header channel, is limited mainly by how much of the carrier protocol the network will tolerate. Legitimate tunnels, encrypted and declared, such as virtual private networks () and Generic Routing Encapsulation (), are the subject of VPN fundamentals and GRE tunnels.

ICMP: Loki, 1996 and 1997

The ICMP specification says that the data received in an echo message must be returned in the echo reply (RFC 792, September 1981). Nothing says what the data must be. In issue 49, in a file dated August 1996, daemon9, also known as route, and Alhambra published "Project Loki: ICMP Tunneling", a white paper arguing that because almost every network passes ping traffic and no device checks the content of the echo data, a covert channel exists wherever echo is allowed; the authors called it a form of steganography and stressed that it was a way of moving data, not of breaking in (Phrack 49, file 6). They expected detection to be hard if traffic stayed low and the server were hidden in the kernel, suggested watching for a surplus of echo replies with garbled payloads, dismissed accepting echo only from trusted hosts because ICMP source addresses can be forged, and concluded that the only sure way to destroy the channel was to deny all incoming echo traffic. A year later, Phrack 51 (1 September 1997) published LOKI2, an implementation that tunnelled shell commands in ICMP echo and in DNS queries and replies, with a choice of encryption (Blowfish with a key exchange, a weak XOR or none) and the ability to switch protocols on the fly; its author noted that similar programs existed for UDP, TCP and (Phrack 51, file 6).

Blocking every echo is no longer the advice. The site's article on ICMP, ping and traceroute explains what breaks when ICMP is dropped wholesale and what RFC 4890 asks an IPv6 firewall to pass; the same RFC warns that the error messages a firewall must pass in both directions can carry a covert conversation or a tunnel, and recommends deep packet inspection to check that the packet quoted inside an error belongs to legitimate traffic (RFC 4890, May 2007, section 3.5). ICMP channels are not only a hacker-magazine curiosity: 's entry on non-application-layer protocols lists, among its procedure examples, malware families that use ICMP for command and control, including PingPull, PHOREAL and COATHANGER, and notes that ICMP is less commonly monitored than TCP or UDP (MITRE ATT&CK, T1095, last modified 3 September 2026). Wojciech Mazurczyk and Luca Caviglione describe Regin, disclosed in November 2014, as tunnelling secrets in ICMP ping traffic and in HTTP cookies and custom TCP and UDP packets (Mazurczyk and Caviglione, Information Hiding as a Challenge for Malware Detection, arXiv:1504.04867).

DNS: the protocol everyone lets through

DNS is the ideal carrier for the same reason as ping, and more so. Almost every network must resolve names, the queries are forwarded by the organization's own resolvers to whatever server is authoritative for a name, and anyone who controls a domain controls that server. Greg Farnham's paper "Detecting DNS Tunneling", a Gold paper for a GIAC (Global Information Assurance Certification) intrusion-analysis certification, accepted on 25 February 2013 and published by the , dates the first known public discussion to a post by Oskar Pearson on the Bugtraq mailing list in April 1998, and notes that many of the tools were written to get past the captive portals of paid wireless networks, which block web traffic until payment but let DNS flow (Farnham, GIAC, 2013).

The mechanism, as Palo Alto Networks' Unit 42 describes it in a 2019 primer by Alex Hinchliffe, works in both directions (Unit 42, 15 March 2019):

  • Upstream, the client encodes data into the labels of a query name under the attacker's domain; the organization's resolver cannot answer it from cache, so it forwards the query to the attacker's authoritative server, which decodes the labels. A query with no answer (a "non-existent domain" reply) is already a heartbeat.
  • Downstream, the server answers with data: an IPv4 address in an A record can carry a command code in its four octets, and text () records can carry encoded files.
  • Reliability is the tunnel's problem: DNS usually travels over the User Datagram Protocol (UDP), which neither retransmits nor orders, so the tools add their own sequencing, and sending large amounts takes long and looks suspicious.

Unit 42's appendix of tools gives the lineage: OzymanDNS, written in by in 2004, which carried Secure Shell sessions with Base32-encoded requests and -encoded TXT responses; DNScat by Tadeusz Pietraszek (2004 to 2005); dns2tcp by Olivier Dembour and Nicolas Collignon; tcp-over-dns (2008); and iodine, first released in 2006 by Bjorn Andersson and Erik Ekman (Unit 42, 2019). Kaminsky is the same researcher whose 2008 cache-poisoning finding is told in the Kaminsky DNS flaw.

How fast a tunnel can be. iodine's own documentation describes it as software that tunnels IPv4 data through a DNS server, for situations where internet access is firewalled but DNS queries are allowed. It encodes upstream data in Base32, or in Base64, Base64u or Base128 when the relaying resolvers tolerate mixed case or other characters, and prefers the NULL and PRIVATE record types for the largest downstream fragments, falling back to TXT, , , or A (iodine README). Its performance table, which the authors present as a realistic indication rather than a benchmark, measured an upstream throughput of 43.6 to 74.2 kilobits per second through ordinary resolvers (a wireless access point, a home server, a broadband provider's resolver) and downstream throughputs of 131.0 to 585.4 kilobits per second; through the provider's resolver with CNAME records, the most restrictive case, downstream fell to 43.6 to 52.4 kilobits per second. Set against the TCSEC's scale, 56.7 kilobits per second upstream through a provider's resolver is 567 times the rate the Orange Book called high.

Worked example: how many bytes fit in one DNS query

The limits come from RFC 1035: a label holds at most 63 octets, and the whole name, counting every label and every length octet, at most 255 (RFC 1035, November 1987, sections 2.3.4 and 3.1). Names are compared without regard to case, so a tunnel that must survive every resolver cannot rely on upper and lower case to carry information; that is why the tools prefer Base32, which RFC 4648 designed for data that must be case insensitive, five bits per character from a 32-character alphabet (RFC 4648, October 2006, section 6). The site's article on Base32 explains the alphabet.

  1. Encode two bytes. "Hi" is 0x48 0x69, the bits 01001000 01101001. Grouped in fives from the left, padding the last group with zeros: 01001 00001 10100 1(0000), the values 9, 1, 20 and 16, the letters J, B, U and Q. Base32 writes "JBUQ====", and a tunnel drops the padding: the label "jbuq".
  2. Measure the space. Suppose the attacker's domain is t.example.com. In the wire format each label costs its length plus one octet, and the root costs one: (1 + 1) + (1 + 7) + (1 + 3) + 1 = 15 octets. That leaves 255 − 15 = 240 octets for data labels.
  3. Fill it. Three full labels of 63 characters cost 3 × 64 = 192 octets; the remaining 48 octets hold one more label of 47 characters. That is 3 × 63 + 47 = 236 characters.
  4. Convert. 236 characters × 5 bits = 1,180 bits = 147.5 bytes, so about 147 bytes of payload per query upstream, before any sequence numbers or headers the tool needs.
  5. Scale it. One mebibyte (1,048,576 bytes) at 147 bytes per query needs ⌈1,048,576 ÷ 147⌉ = 7,134 queries, each for a name never seen before.

A Brazilian presentation of 2006, discussed below, did the same sum for OzymanDNS with three labels of 60 characters: 180 × 5 = 900 bits, about 112 bytes per query. The arithmetic also shows where detection will come from: thousands of unique, long, machine-made names under one domain.

Cases from the record

DNSMessenger, 2017. Edmund Brumaghin and Colin Grady of Cisco Talos described on 2 March 2017 a remote-access tool, delivered by a malicious Word document and run as several stages of , some without files on disk, that used DNS TXT queries and responses as a bidirectional command-and-control channel; Talos called the approach extremely uncommon and evasive (Cisco Talos, 2 March 2017).

OilRig and others. MITRE's entry on DNS as an application-layer command-and-control protocol lists, among many procedure examples, BONDUPDATER, which uses DNS and TXT records within its tunnelling protocol, OilRig's use of DNS for command and control, Helminth, Denis, SombRAT and Cobalt Strike, whose custom protocol can be encapsulated in DNS (MITRE ATT&CK, T1071.004, version 1.4, last modified 3 September 2026). Kaspersky's Alexey Shulmin and Evgeniya Krylova showed traffic of the backdoor Denis, with long encoded labels under a single domain, as their example of , and reported that simple intrusion-detection rules for long or oddly formed names, run against the stream of samples sent to Kaspersky, found several previously unknown backdoors using DNS tunnels for command and control (Kaspersky, Steganography in contemporary cyberattacks, 3 August 2017).

SUNBURST, 2020. The backdoor inserted into , whose supply-chain story is told in the SolarWinds compromise, used DNS with unusual care. FireEye's analysis of 13 December 2020 describes a domain generation algorithm (DGA) that built subdomains of avsvmcloud[.]com by concatenating a victim identifier with a reversible encoding of the victim's own internal domain name; the answers steered the malware, with CNAME records pointing to the real command-and-control domain and the address blocks of A records able to stop it, and the authors assess that the encoded names let the attacker select victims (Mandiant, Google Cloud Threat Intelligence, 13 December 2020). Every victim thus announced, in its DNS queries to the outside world, an encoded form of its own name. How its HTTP traffic hid commands is told in the next part.

Encrypted DNS changes the picture. When the queries leave inside HTTPS, as with DoH, the network sees only an encrypted connection to a resolver, and the name-based tests below are blind unless the organization runs the resolver itself or inspects the traffic. DoT, DoH and DoQ compared explains what each encrypted transport hides.

Detecting channels and tunnels

There is no single detector. Each family of channel leaves a different trace, and the defender's tools sort into three layers.

Conformance: does this packet look like it came from a real stack? Murdoch and Lewis's tests are the model: compare each field with what the claimed operating system would have produced. Simple versions catch crude tools (the low byte of Rowland's identifiers is always zero), careful versions catch random-looking data where a structured value belongs. The Brazilian research network's incident team listed the practical equivalents in 2006: look for anomalies in IP, TCP and ICMP headers, inspect the content of ICMP echo (for example, the magic number 0xD5200880 that identifies ptunnel), check HTTP headers and POST requests, and watch TXT queries and excess DNS queries (RNP, CAIS, December 2006).

Statistics: does this flow behave like human or machine traffic? Shape, regularity and entropy tests for timing; for DNS, Farnham separates payload analysis, which judges a single request by its length, the number of bytes, the character content and the record type, from traffic analysis, which judges many requests together by volume, number of host names per domain, geographic location and domain history. Payload rules caught specific tools; traffic analysis catches tunnelling in general (Farnham, 2013). MITRE's analytics for DNS tunnelling say the same in today's language: long or frequent subdomains, high volume, encoded payload patterns, and DNS queries from processes that are neither browsers nor system services (MITRE ATT&CK, T1071.004).

Worked example: character entropy of two labels

Farnham cites the entropy of requested host names as an indicator: legitimate names tend to contain words, encoded names spread evenly over the alphabet (Farnham, 2013). Shannon entropy per character is H = −Σ p log₂ p over the characters of the label. Compare two labels of 18 characters, chosen for this article.

  • "downloadandupdates": d occurs 4 times, a 3, o 2, n 2, and seven letters once. H = (4/18)·log₂(18/4) + (3/18)·log₂(6) + 2·(2/18)·log₂(9) + 7·(1/18)·log₂(18) = 0.482 + 0.431 + 0.704 + 1.622 = 3.24 bits per character.
  • "jbswy3dpeb3w64tmmq" (the Base32 encoding of "Hello world", lower case): four characters occur twice and ten once. H = 4·(2/18)·log₂(9) + 10·(1/18)·log₂(18) = 1.409 + 2.317 = 3.73 bits per character.

The encoded label scores higher, but only by half a bit, and a label of random English-looking words could score as high. Entropy on a single short label is a weak signal; it becomes useful in combination with length, digits and, above all, volume. Farnham's own experiment shows why volume wins: counting the unique fully qualified domain names (FQDNs) per root domain in ten-minute windows, every domain on his network stayed below about 300, so 300 could serve as an alert threshold, while a DNScat session transferring a 122-kilobyte file in about two minutes stood far above the rest; the one legitimate exception was a file-reputation security service that also issues a unique name per request (Farnham, 2013). The worked example above needed 7,134 unique names for one mebibyte. The base-rate warning of the steganalysis part applies: every threshold has its legitimate exceptions, and they must be listed before the alarms start.

Endpoints: which process sent this? The strongest single clue in MITRE's analytics is not in the packet at all: a DNS or ICMP flow from a process that has no business producing one. Network and endpoint records together answer the question, which is why the exfiltration walkthrough in the Zscaler series insists on establishing first what each log could see.

Normalization: the active warden on the wire

The opener's active warden, who rewords every letter so that any hidden code dies, has a network form: the traffic normalizer.

The idea and its first implementation. Mark Handley and Vern Paxson of the International Computer Science Institute in Berkeley and Christian Kreibich of the Technical University of Munich proposed, at the USENIX Security Symposium in August 2001, a forwarding element that sits in the path of traffic and patches up the packet stream to remove ambiguities before a network (NIDS) sees it; their user-level implementation, norm, processed about 100,000 packets per second in memory-to-memory tests, enough in their judgement for a site with a bidirectional 100 megabit per second link (Handley, Paxson and Kreibich, 2001). Their target was evasion of intrusion detection, not covert channels, and they said so: header fields that could be covert channels are many, thwarting them "is not a normalizer task", yet they zeroed padding anyway on the principle of normalizing even without a known attack, and they proposed that the normalizer scramble the IP identifiers of incoming and outgoing packets, in a cryptographically secure but reversible way, so that internal hosts cannot be used as unwitting relays for a stealth port scan that reads those identifiers. Their paper also states the limit of every normalizer: if both hosts in a connection are compromised, little can be done to prevent encrypted or otherwise covert channels between them.

The active warden made explicit. Gina Fisk, Mike Fisk, Christos Papadopoulos and Joshua Neil, at Information Hiding 2002, observed that active wardens had been postulated for nearly two decades without a published implementation that stops steganography in transit, and examined one in the context of a firewall. For structured carriers such as TCP/IP, adding noise would break the protocol, so they introduced minimal requisite fidelity (MRF): the degree of fidelity that is acceptable to end users and destructive to covert communication, determined from the protocol specification (Fisk, Fisk, Papadopoulos and Neil, Information Hiding 2002, abstract).

What a normalizer can rewrite. Zander, Armitage and Branch list the moves (Zander, Armitage and Branch, 2007):

Field or featureNormalizationCondition
Reserved bits, paddingSet to zero; remove unknown extensionsAlways possible
Fields unused in contextZero the urgent pointer when URG is not set; zero the fragment offset when Don't Fragment is setAlways possible
IP identificationRewrite itThe normalizer sees all fragments
TCP ISN, source address and portRewrite themThe normalizer keeps a mapping and rewrites the replies
TTL, TCP timestampRewrite, or randomize the low bits (like fuzzy time)The normalizer is at or near the source
Packet timing and rateDelay, pad links to fixed rates, insert dummy packetsCostly; imperfect, because padding gateways still leak through processing

What a firewall already does. OpenBSD's packet filter documents most of these as switches. Its scrub option "random-id" replaces the IPv4 identification field with random values to compensate for predictable values generated by many hosts; "reassemble tcp" stops either side from lowering the TTL and modulates TCP timestamps with a random number; the "modulate state" option gives each connection endpoint a high-quality random sequence number (OpenBSD pf.conf(5)). Every one of Rowland's three methods dies at such a firewall: the identification field is replaced, the ISN is shifted by an offset the receiver does not know, and a bounced acknowledgement carries the shifted number. RFC 6864's security considerations endorse the first of these for atomic datagrams. The same move is the process-identifier cure of 1993: replace a value an outsider can read or set with one nobody controls.

DNS needs its own normalization. A tunnel survives any header rewriting because its data is in the names. The defences are architectural: force every client to use the organization's resolvers and block direct DNS to the outside, so that every query passes a point that logs and can refuse it; apply response policy and reputation there, as DNS blocklists explains; restrict TXT and unusual record types for clients that do not need them, remembering, as the RNP slides already warned in 2006, that the Sender Policy Framework () for mail lives in TXT records; and limit the rate of successive queries from one address (RNP, CAIS, 2006). For ICMP, pass the types RFC 4890 lists, inspect the payload of errors, and rate-limit echo rather than banning it.

What normalization cannot do. Handley's limit holds. Normalization removes channels in fields whose content the protocol does not need; it cannot remove channels in content the protocol must deliver, such as the names in DNS queries, the words of an HTTP request, or the choice of which legitimate packet to send next. Timing can be blurred but not abolished without costs NIST itself calls significant. At that point the warden is back to detection, or to Lampson's bargain: bound the bandwidth and accept some leakage.

The Brazilian angle

The Brazilian academic and incident-response community took up the subject early, and its records are primary.

  • The research network's incident team, 2006. In December 2006 Ivo de Carvalho Peixinho of the Centro de Atendimento a Incidentes de Segurança (CAIS) of the Rede Nacional de Ensino e Pesquisa (RNP), Brazil's national research and education network, presented "Covert channels: what they are, what they do and how to protect yourself against them" (in Portuguese) at the eighth meeting of the Grupo de Trabalho em Segurança de Redes (GTS-8), the network security working group, held in São Paulo on 9 December 2006 (meeting date as given in another GTS-8 presentation); the slides are kept in Registro.br's archive. The slides cover header channels (citing Rowland and Rutkowska's Nushu), ICMP tunnels (ICMPTX, itun, PingTunnel), DNS tunnels (NSTX, OzymanDNS, DNScat), the use of DNS tunnels to get past wireless captive portals and broadband authentication, the per-query capacity computed above, and lists of detection and blocking measures; the conclusion is that detecting and blocking covert channels is complex and that one usually needs to know what one is looking for (RNP, CAIS, GTS-08, December 2006).
  • A detector at the national space institute, 2005. At the fifth Brazilian Symposium on Information and Computer Systems Security (SBSeg) in 2005, Carlos Henrique P. C. Chaves of the Instituto Nacional de Pesquisas Espaciais (INPE) and Antonio Montes of the Centro de Pesquisas Renato Archer (CenPRA) presented a hybrid intrusion detection system for backdoors and "canais dissimulados", combining self-organizing maps for anomaly detection with pattern recognition for misuse detection; their references include Loki and LOKI2 (Chaves and Montes, SBSeg 2005).
  • A new HTTP channel, 2013. Felipe Afonso Espósito's master's dissertation at COPPE, the engineering graduate school of the Universidade Federal do Rio de Janeiro (UFRJ), supervised by Luis Felipe Magalhães de Moraes and dated August 2013, argues that active storage channels in HTTP alter basic header properties and are easy to identify, and proposes a channel built from the paths of web resources, designed to make detection signatures harder to write (Espósito, COPPE/UFRJ, 2013). The site's article on hidden messages in HTTP headers shows the overt cousins of such channels.
  • DNS tunnel detection, 2023. Júlio F. Luz, Paulo Freitas de Araujo-Filho, Henrique F. Arcoverde and Divanilson R. Campelo, of the Universidade Federal de Pernambuco (UFPE) and Tempest Security Intelligence, proposed at SBSeg 2023 an unsupervised detector for DNS tunnels based on self-organizing maps, reporting an F1-score of 0.9460 on public datasets and detection of attacks run in a corporate network (Luz and others, SBSeg 2023).
  • Datasets for DNS exfiltration, 2026. At SBSeg 2026 in Armação dos Búzios, Cristiano L. M. Borges and Rodrigo S. Miani of the Universidade Federal de Uberlândia (UFU) published two datasets, UFU-Do53-EXF for conventional DNS on port 53 (5,351,064 samples after normalization) and UFU-DoH-EXF for DNS over HTTPS (1,048,575 flows on TCP port 443), built from controlled benign and malicious traffic, so that detectors for both clear-text and encrypted DNS exfiltration can be compared (Borges and Miani, SBSeg 2026).

The Portuguese vocabulary is itself unsettled: the 2005 paper says "canais dissimulados", the 2013 dissertation "canais encobertos (Covert Channels), ou dissimulados", and the 2006 slides keep the English term.

What defenders can do

  • Decide which question you are answering. Covert channel analysis (NIST SC-31) asks where a system could leak and how fast; monitoring asks whether it is leaking now; normalization removes the channel without asking. Most organizations need the last two, and only high-assurance or cross-domain systems need the first.
  • Normalize what costs nothing. Randomize IP identifiers and sequence numbers at the edge, zero reserved fields, drop unknown options, keep TTLs from being lowered. Firewalls already offer these switches; turning them on destroys the whole random-value and reserved-field families at once.
  • Make DNS pass through you. Only the organization's resolvers talk to the outside; direct DNS, unknown DoH resolvers and unusual record types from ordinary clients are blocked or alerted. Log every query with the client and, where possible, the process.
  • Count names, not just bytes. Unique names per registered domain per time window, query length, record-type mix and per-host query rates catch tunnels in general; signatures catch only the tools you know. Keep a list of the legitimate services (content delivery, file reputation, telemetry) that also generate unique names.
  • Rate-limit, do not ban, ICMP. Pass what RFC 4890 and path discovery need, inspect error payloads, cap echo rates and sizes, and alert on echo payloads that are not what ping programs send.
  • Watch timing only where it pays. Timing channels are slow and hard to remove; regularity and entropy tests belong on links to high-value systems, not on the whole network.
  • Correlate with the endpoint. A DNS, ICMP or raw-socket flow from a process that should not produce one is a better alarm than any packet statistic.
  • Use the controls you have. NIST lists covert channel analysis under SC-31 and steganography among the covert exfiltration means under SC-7(10) and -4(18) (NIST SP 800-53 Revision 5); the egress and data loss prevention () controls of DLP fundamentals and the history in intrusion detection frame where these checks live, and the glossary entries on exfiltration, command and control and beaconing place the channels in the course of an intrusion.

What to remember

  • Lampson (1973) defined the confinement problem and the remedies of masking, enforcement and bounded capacity; the TCSEC (1985) split covert channels into storage and timing channels and required their analysis from class B2 up.
  • NCSC-TG-030 (1993) taught how to find channels (the shared resource matrix), estimate their bandwidth and handle them by elimination, noise or delay, and audit; NIST SP 800-53 keeps the requirement as SC-31.
  • Network channels began with Girling's LAN channels (1987); Rowland's covert_tcp (1997) hid bytes in the IP identification field, the TCP ISN and a bounced acknowledgement.
  • Random-looking fields are not random: genuine stacks give them structure, so naive header channels are detectable (Murdoch and Lewis, 2005), and RFC 6864 (2013) allows the identification field of atomic datagrams to be rewritten.
  • 109 published techniques reduce to 11 hiding patterns, and four patterns account for 69.7% of them.
  • Timing channels modulate gaps or rates; regularity, shape and entropy tests detect simple ones, and replayed or keystroke-driven channels are hard to catch.
  • ICMP (Loki, 1996) and DNS tunnels carry whole protocols; one DNS query carries roughly 100 to 150 bytes upstream, and iodine measured tens of kilobits per second, hundreds of times the Orange Book's "high" rate.
  • Detection combines conformance checks, statistics (above all unique names per domain) and endpoint context; normalization destroys header channels but not channels in content the protocol must deliver.

Sources