Steganography Applied to Different Media


Still Images

The methods of steganography are quite varied; in still images, least-significant bit insertion and spread-spectrum techniques are used.

Texture block uses low bit-rate data hiding, and is accomplished by copying a region from a random texture pattern in a picture to an area of similar texture, resulting in a pair of identically textured regions in a picture.

Patchwork uses a low bit-rate data hiding based on a pseudorandom, statistical process. Patchwork invisibly embeds in a host image a specific statistic, and takes two places within a picture and lightens one and darkens the other.

Other methods include dithering manipulation, perceptual masking, and DCT coefficients manipulation.

Moving Images

Steganography, when applied to a video file such as an .avi or .mpeg, typically uses discrete cosine transform (DCT) manipulation. Westfeld and Wolf have described a method for data hiding in a videoconferencing system. Because videoconferencing needs to have a high frame rate on often narrow-band digital networks, DCT manipulation is a necessary and valuable part of the process. Basically, videoconferencing applications compress each frame with "differential lossy compression," meaning only the differences between successive stills are compressed, then broadcast. This renders the embedding technique almost invisible. While differences between an original and a stego-image can be detected, it is likely that no one can tell which is which. Because the videoconferencing system would broadcast only the differences between successive frames, the threat of detection by comparison between successive similar frames would not be a factor. Other attacks are equally unlikely to succeed in detecting or extracting the stego-message. Added noise would be very similar to the original noise and the data would be embedded before encryption, making it that much more difficult to find. The data rate for this technique could be as high as 8 kbps if embedded into an ISDN videoconference. This technique could be a very valuable and effective steganography method due to a high data rate and ease of stealth.

Audio Files

When developing data-hiding methods for audio, the first consideration is the most likely environment the sound signal will travel between encoding and decoding. There are two main areas of modification that we will consider: first, the storage environment, or digital representation of the signal, and second, the transmission pathway the signal might travel.

There are several methods for adding steganographic information to audio files:

  1. The high bit-rate LSB insertion is easily destroyed by anything other than a pure digital transmission.

  2. Differential phase variation, which is based on the sensitivity of the human auditory system. The human ear is sensitive to differential phase variation, but is relatively insensitive to the initial phase. The sound file is divided into blocks and each block's initial phase is modified using the embedded message. This preserves the subsequent phase shifts, meaning less differences, and therefore harder for the ear to detect. This technique is very good when dealing with perceived signal-to-noise ratio.

    Phase coding works by substituting the phase of an initial audio segment with a reference phase. The reference phase represents the data. The phase of all the following segments is adjusted to preserve the relative phase between segments while allowing data to be embedded. Phase coding is one of the most effective coding methods when it comes to signal-to-perceived noise ratio.

    Absolute phases can withstand a fair amount of modification; however, if the relative phase differences between the blocks is preserved, the ear will be less likely to detect any changes. As long as phase modification is small, inaudible coding can be achieved.

  3. Spread spectrum can be used a couple of ways. It has the ability to stay effective even if perceivable noise is added to the sound; and while adding noise is possible, the embedded signal can be filtered through a perceptual mask. To eliminate this problem, often the most audible components of the added noise are reduced in power. Then there is the basic spread-spectrum technique, which is designed to encode a stream of information by spreading the data across as much of the frequency spectrum as possible. This allows for signal reception, even if there is interference.

  4. Adding echo to the audio signal. Echo hiding is a robust and high data-rate method of embedding information into an audio signal. Adding an echo uses two different delays to encode the bits. They are both small enough to be heard with the naked ear, but they are perceived as something that enriches the sound rather than distorts it. This method is the only one that can resist a jitter attack. When adding echo, the data is hidden by varying initial amplitude, decay rate, and offset.

    When the delay between the original sound and the echo decreases, the signals blend and the human ear cannot distinguish between the two. Information is embedded by echoing the original signal with one of two delay kernels. A binary one is represented by an echo kernel with a change plus one-second delay. A binary zero is represented by a change plus zero-second delay. The extraction of the embedded information involves detecting the spaces between the echoes.

    Using this method you can see it is possible to encode and decode information with minimal alteration of the original audio signal. Minimal alteration means the signal has been changed in such a way that the average human cannot hear any significant difference between the original and altered signal. If there is an alteration, it actually works in the encoder's favor by giving the signal a richer sound.

Text Files

Open-Space Method

The open-space method uses white space on the printed page.

  1. Inter-sentence spacing: Encodes a binary message by placing one or two spaces after each terminating character (period or semicolon). The problem with this method is that it is very inefficient as it requires a lot of space for a small message, and inconsistent use of white space is easily spotted.

  2. End-of-line spacing: Data is inserted in the form of spaces at the end of a line. This allows for much more room to insert a message, but can present problems if a program automatically removes extra spaces or the document is turned into hard copy.

  3. Inter-word spacing: Uses right justification. The justification spaces are adjusted to allow for binary encoding. One space between words is a 0, two spaces are a 1. Open space works as long as text remains ASCII.

Syntactic Method

Deriving from "syntax," this method uses the manipulation of punctuation to hide information. Syntactic is a method that utilizes punctuations and contradictions. For example:

  bread,  cereal,  and milk  bread,  cereal  and milk 

Semantic Method

A final category of data hiding in text involves changing the words themselves. Semantic methods are similar to the syntactic method. Rather than encoding binary data by exploiting ambiguity of form, these methods assign two synonyms primary or secondary value. For example, the word "big" could be considered primary and "large" secondary. Whether a word has primary or secondary value bears no relevance to how often it will be used, but primary words will be read as ones, secondary words as zeros when decoding.

Steganographic File Systems

A steganographic file system is a method of storing files that encrypts data and hides it so that it cannot be proven to be there. A steganographic file system can:

  • Hide users' documents in other, seemingly random files.

  • Allow the owner to give names and passwords for some files while keeping others secret.

  • Provide a second layer of secrecy. Encrypted files are out in the open and visible but not understandable. Stego files are not even visible and an outsider cannot look for files that "are not there."

A stego file system can protect from some threats:

  • Torture to reveal crypto keys or other secrets.

  • When conducting delicate negotiations, such as between a company and a trade union, informal offers may be made, which will be denied in the event of later litigation. However, the other side might obtain court orders for access to documents.

To elaborate on this concept, for example, a user of a steganographic file system is put in a position to reveal three different passwords used to protect different directories with his or her e-mail archive, tax records, and love letters, but keeps quiet about the directory containing his or her trade secrets. The person who is getting these passwords would have no way of proving that such a directory exists.

The classical way of hiding information in a deniable way would be to use a steganographic program to embed the information in large files such as audio or video, although there are some problems with this approach:

  • One can only hide so much information before its presence becomes noticeable. If an opponent is allowed to subject these objects to small distortions of his or her choice, then the usable bandwidth can be very low indeed.

  • The goal has always been to design a practical steganographic system, meaning that normal UNIX or Windows applications can run on it. Because any manual method of file recovery would become very inconvenient, and subsequently not used to the extent it could be, a high degree of transparency is best.

Steganographic file systems are designed to overcome the draw-backs of using individual files for hiding information. A stego file system aims to create a secure file system where the risk of users being forced to reveal private data is eliminated by giving the users the ability to truthfully say that there is no encrypted data hiding on the disk. Following is a discussion of the two ways of constructing a stego file system.

Method #1

  • The program operates using a set of cover files with initially random content.

  • Data files are stored by modifying the cover files.

  • The number of cover files must be sufficiently large to guarantee that trying all subsets of cover files remains computationally infeasible.

Problems
  • A lot of cover files would have to be read and authenticated to ensure security.

  • The prospect of low performance for both read and write access.

Method #2

  • The file system starts out being full of completely random data.

  • The file blocks are hidden within this random data by writing the encrypted blocks to pseudo-random locations using a key derived from the file name and directory password, making the file blocks indistinguishable from the random data.

  • As blocks continue to be written to the file system, collisions will occur and blocks will be overwritten, meaning only a small proportion of the disk space could safely be utilized.

  • Multiple copies of each block would have to be written.

  • A method to identify blocks when they have been overwritten would also be needed.

Stego File System Construction

In this explanation, the stego file system design is based on the second method of construction because it is more practical and efficient. This system does not use a separate partition of a hard disk, but instead places hidden files into unused blocks of a partition that also contains normal files, managed under a standard file system.

  • Stego file system (StegFS) partitions are compatible with Ext2fs partitions, meaning drivers for both file systems will work with each other. This feature lets the StegFS partition look like a partition that has recently been overwritten with random bytes using some disk-wiping tool.

  • StegFS can store hidden files in the blocks that are currently unused by Ext2fs, except that when files are deleted, their blocks will be overwritten with random bytes.

  • A small fraction of the newly created files are placed at a somewhat more random location on the disk than normal to help simulate normal use (Figure 4.4).

    click to expand
    Figure 4.4

This has shown a practical implementation of a steganographic file system. It offers the following functionality:

  • Users can plausibly deny certain files being stored on the disk.

  • Guaranteed confidentiality of hidden files.

  • The deletion of hidden and nonhidden files ensures secure destruction.

  • Layers of security can be used, ensuring that the compromise of lower layers does not reveal the presence of higher ones.

  • Deniability of the existence of higher layers.

  • The installation of the driver can be justified by the additional security advantages it provides.

  • Write accesses that are performed while not all hidden layers are open are unlikely to damage data in hidden files.

  • Write access to hidden files between inspections cannot be distinguished from nonhidden files that have been created or deleted.

  • Nonhidden files are accessible when the StegFS driver and its block allocation table are temporarily removed.

  • The full UNIX file system semantics are implemented.

Hiding in Disk Space

In this section we will discuss three different methods for hiding information steganographically in disk space: S-tools, hidden partitions, and slack space.

S-Tools

Similar to the method used in the stego file system, S-Tools will spread the file bits out throughout the free space on the floppy. This is undetectable in the normal Windows viewer, but the file is there.

S-Tools Version 3 has the ability to embed information in unused tracks of a floppy disk. While this program is not widely available on the Internet these days, it is still possible to find it and you may encounter this particular function.

How It Is Done

S-Tools will allow you to hide files in the unused space on floppy disks. To understand what is meant by unused space, look at the way DOS organizes the files on a disk. Every floppy disk, when formatted, is divided into sectors. Each sector on a disk can hold 512 bytes of information. On a 1.44 Mb disk, there are 1440 1024/512 = 2880 sectors. When you write a file to the disk, DOS computes how many sectors it will need to hold the file and writes this information into the file allocation table (FAT).

S-Tools' FDD (feature-driven development) module will look at the FAT to decide which disk sectors have not been used, and will allow you to hide information on them. S-Tools will not hide information in consecutive sectors on disk because this would be too easy to detect. Instead it uses a random number generator to choose which free sectors to use. S-Tools will add additional security by allowing you to fill all other unused sectors on the disk with random data.

Using This Module

There are a few tips that you might want to be aware of when using the FDD module. If you want to be able to plausibly deny having any concealed data on your disks, it would make sense to fill the unused space on all your newly formatted disks with random data. This way any concealed data will appear to be "lost in the noise."

One point to remember with this feature of S-Tools: Do not write any ordinary files to the disk after you have concealed information on it. Depending on the amount of space you have left on the disk, it is very likely that DOS will overwrite your hidden information. This point can also work in your favor because there may be a situation where you want the hidden information destroyed.

Analyze Disk

This option displays a usage map of the floppy and tells you how much information you can hide on it. S-Tools will work with any capacity of disk that DOS can use, up to a maximum of 1.44 Mb. Sectors marked in red are the ones that S-Tools cannot use because files are already stored there. The status bar at the bottom of the screen will tell you how much information you can hide on the disk (Figure 4.5 through Figure 4.7).

Fill Free Space

This option allows you to fill the unused sectors on a disk with random data. This will mask the presence of any file that you want to hide on the disk. S-Tools automatically asks you whether you want to fill the free space after hiding a file.

click to expand
Figure 4.5

click to expand
Figure 4.6

click to expand
Figure 4.7

A Word of Warning

If you fill the free space on a disk after hiding a file, you will lose that file. After hiding, S-Tools will forget about its presence until you use the reveal operation. If at any time you decide you want to stop the process, hit the Escape key (Figure 4.8).

click to expand
Figure 4.8

Hide File

This is the option that you use when you want to hide a file on disk. If you are not sure whether the disk has enough free space to hold the hidden file, then you can use the Analyze Disk option to find out.

First you are asked to choose the file that you want to hide. If you have asked to be prompted for encryption options, you will be asked whether the file should be encrypted before hiding. Using encryption is recommended even if the file is already encrypted because the pass phrase that you enter is also used to seed the random number generator that is used to choose the sectors that will hold the hidden file. Again, if you want to cancel the operation press the Escape key (Figure 4.9 through Figure 4.11).

click to expand
Figure 4.9

click to expand
Figure 4.10

click to expand
Figure 4.11

Reveal File

This is the option that you should use to reveal a file that has been hidden on a disk. Simply insert the disk into the disk drive and select this option. If encryption was selected as an option when the file was embedded, then you must supply the correct pass phrase in order to reveal it. If everything works as planned, S-Tools will look at the disk and decide whether a file is hidden on it. If there is a hidden file, the program will tell you the size of the file and give you the option of viewing it or saving it.

Hidden Partitions

A hidden partition on a hard drive is another way of hiding large amounts of information in plain sight. The simplest explanation is a Linux partition chock full of secret messages hiding on a hard drive with only a Windows operating system. While this likely would not fool someone who was actively looking for hidden information, it would fool a casual user or someone unfamiliar with the computer's setup.

Slack Space

Slack space is the unused space in a disk. Even if the actual data being stored requires less storage than the cluster size, an entire cluster is reserved for the file. The unused space is called the slack space.

For example, the minimum space allocated on the hard drive is 32 kb and we have a file that is 6 kb. This leaves 26 kb unused and considered unavailable by the operating system. This unused space, slack space, could be used to hide information without showing up in any directory or file system.

Hiding in Network Packets

A covert channel is described as "any communication channel that can be exploited by a process to transfer information in a manner that violates the system's security policy." Essentially, it is a method of communication that is not part of an actual computer system design, but can be used to transfer information to users or system processes that normally would not be allowed access to the information.

In TCP/IP, there are a number of methods available whereby covert channels can be established and data can be surreptitiously passed between hosts.

This method can be used in a variety of areas:

  • Bypassing packet filters, network sniffers, and "dirty word" search engines

  • Encapsulating encrypted or nonencrypted information within otherwise normal packets of information for secret transmission through networks that prohibit such activity ("TCP/IP steganography")

  • Concealing locations of transmitted data by "bouncing" forged packets with encapsulated information off innocuous Internet sites

Background Terminology

For our purposes, it is important to realize that TCP is a "connection-oriented" or "reliable" protocol. Simply put, TCP has certain features that ensure data arrives at the remote host in an intact manner (usually). The basic operation of this relies on the initial TCP "three-way hand-shake":

  • Step One: Send a synchronize (SYN) packet and Initial Sequence Number (ISN). Host A wishes to establish a connection to Host B. Host A sends a solitary packet to Host B with the synchronize bit (SYN) set announcing the new connection and an Initial Sequence Number (ISN), which will allow tracking of packets sent between hosts:

         Host A — — — SYN(ISN) — — — > Host B 

  • Step Two: Allow remote host to respond with an acknowledgment (ACK). Host B responds to the request by sending a packet with the synchronize bit set (SYN) and ACK (acknowledgment) bit set in the packet back to the calling host. This packet contains not only the responding client's own sequence number, but the Initial Sequence Number plus one (ISN + 1) to indicate the remote packet was correctly received as part of the acknowledgment and is awaiting the next transmission:

       Host A < — — — SYN(ISN+1)/ACK — — — Host B 

  • Step Three: Complete negotiation by sending a final acknowledgment to the remote host. At this point Host A sends back a final ACK packet and sequence number to indicate successful reception; the connection is complete and data can now flow:

           Host A — — — ACK — — — > Host B 

The entire connection process happens in a matter of milliseconds, and each packet from this point on is independently acknowledged by both sides. This handshake method ensures a reliable connection between hosts and is why TCP is considered a connection-oriented protocol. It should be noted that only TCP packets exhibit this negotiation process. This is not so with UDP packets, which are considered unreliable and do not attempt to correct errors nor negotiate a connection before sending to a remote host. This chapter deals with the TCP protocol primarily to exploit the acknowledgment feature, which will be described next. The thrust of these methods, however, could be easily supported on the UDP protocol type.

Encoding Information in a TCP/IP Header

Within each header, there are several areas that are not used for normal transmission or are "optional" fields to be set as needed by the sender of the datagrams.

An analysis of the areas of a typical IP header that are either unused or optional reveals many possibilities where data can be stored and transmitted (Figure 4.12 and Figure 4.13).

click to expand
Figure 4.12

click to expand
Figure 4.13

For our purposes, we will focus on encapsulation of data in the more mandatory fields. This is not because they are any better than the other optional areas; rather, these fields are not as likely to be altered in transit as the IP or TCP options fields, which are sometimes changed or stripped off by packet-filtering mechanisms or through fragment reassembly.

Rowland excellently describes three methods of adding information in his article, "Covert Channels in the TCP/IP Protocol Suite." [1] He describes encode and decode in the following fields:

  • The IP packet identification field

  • The TCP initial sequence number field

  • The TCP acknowledged sequence number field

Method One: Manipulation of the IP Identification Field

The identification field of the IP Protocol helps with reassembly of packet data by remote routers and host systems. Its purpose is to give a unique value to packets so that if fragmentation occurs along a route, they can be accurately reassembled. The first encoding method simply replaces the IP identification field with the numerical ASCII representation of the character to be encoded. This allows for easy transmission to a remote host, which simply reads the IP identification field and translates the encoded ASCII value to its printable counterpart. The lines below show a tcpdump representation of the packets on a network between two hosts, "nemesis.psionic.com" and "blast.psionic.com." A coded message consisting of the letters H-E-L-L-O was sent between the two hosts in packets appearing to be destined for the Web server on blast.psionic.com. The actual packet data does not matter.

The field in question is the IP portion of the packet, called the ID field, located in the parentheses. Note that the ID field is represented by an unsigned integer during the packet generation process of the included program. This program does not perform any type of byte-ordering functions normally used in this process; therefore, packet data is converted to the ASCII equivalent by dividing by 256.

  • Packet One:

    • 18:50:13.551117 nemesis.psionic.com.7180 >

    • blast.psionic.com.www: S 537657344:537657344(0) win 512

    • (ttl 64, id 18432)

    • Decoding: (ttl 64, id 18432/256) [ASCII: 72(H)]

  • Packet Two:

    • 18:50:14.551117 nemesis.psionic.com.51727 >

    • blast.psionic.com.www: S1393295360:1393295360(0) win 512

    • (ttl 64, id 17664)

    • Decoding: (ttl 64, id 17664/256) [ASCII: 69(E)]

  • Packet Three:

    • 18:50:15.551117 nemesis.psionic.com.9473 >

    • blast.psionic.com.www: S 3994419200:3994419200(0) win 512

    • (ttl 64, id 19456)

    • Decoding: (ttl 64, id 19456/256) [ASCII: 76(L)]

  • Packet Four:

    • 18:50:16.551117 nemesis.psionic.com.56855 >

    • blast.psionic.com.www: S3676635136:3676635136(0) win 512

    • (ttl 64, id 19456)

    • Decoding: (ttl 64, id 19456/256) [ASCII: 76(L)]

  • Packet Five:

    • 18:50:17.551117 nemesis.psionic.com.1280 >

    • blast.psionic.com.www: S 774242304:774242304(0) win 512

    • (ttl 64, id 20224)

    • Decoding: (ttl 64, id 20224/256) [ASCII: 79(0)]

  • Packet Six:

    • 18:50:18.551117 nemesis.psionic.com.21004 >

    • blast.psionic.com.www: S3843751936:3843751936(0) win 512

    • (ttl 64, id 2560)

    • Decoding: (ttl 64, id 2560/256) [ASCII: 10(Carriage Return)]

This method is used by having the client host construct a packet with the appropriate destination host and source host information and encoded IP ID field. This packet is sent to the remote host, which is listening on a passive socket that decodes the data. This method is relatively straightforward and easy to implement, as shown in the included covert_tcp program. You should note that this method relies on manipulation of the IP header information, and may be more susceptible to packet filtering and network address translation where the header information may be rewritten in transit, especially if located behind a firewall. If this happens, loss of the encoded data may occur.

Method Two: Initial Sequence Number Field

The Initial Sequence Number field (ISN) of the TCP/IP Protocol suite enables a client to establish a reliable protocol negotiation with a remote server. As part of the negotiation process for TCP/IP, several steps are taken in what is commonly called a "three-way handshake," as described earlier. For our purposes, the sequence number field serves as a perfect medium for transmitting clandestine data because of its size (a 32-bit number). In this light, there are a number of possible methods to use. The simplest is to generate the sequence number from the actual ASCII character we wish to have encoded. This is the method used by covert_tcp, as shown in the following packets. (The "S" indicates a synchronize packet; the ten-digit number following is the sequence number being sent.) Again, no byte-ordering functions are used by covert_tcp to generate the sequence numbers. This enables a more realistic looking sequence number. Therefore, in our example the sequence numbers are converted to ASCII by dividing by 16777216, which is a representation of 65536 256. Again, our message of H-E-L-L-O is being sent:

  • Packet One:

    • 18:50:29.071117 nemesis.psionic.com.45321 >

    • blast.psionic.com.www: S 1207959552:1207959552(0) win 512

    • (ttl 64, id 49408)

    • Decoding: S 1207959552/16777216 [ASCII: 72(H)]

  • Packet Two:

    • 18:50:30.071117 nemesis.psionic.com.65292 >

    • blast.psionic.com.www: S 1157627904:1157627904(0) win 512

    • (ttl 64, id 47616)

    • Decoding: S 1157627904/16777216 [ASCII: 69(E)]

  • Packet Three:

    • 18:50:31.071117 nemesis.psionic.com.25120 >

    • blast.psionic.com.www: S 1275068416:1275068416(0) win 512

    • (ttl 64, id 41984)

    • Decoding: S 1275068416/16777216 [ASCII: 76(L)]

  • Packet Four:

    • 18:50:32.071117 nemesis.psionic.com.13603 >

    • blast.psionic.com.www: S 1275068416:1275068416(0) win 512

    • (ttl 64, id 7936)

    • Decoding: S 1275068416/16777216 [ASCII: 76(L)]

  • Packet Five:

    • 18:50:33.071117 nemesis.psionic.com.45830 >

    • blast.psionic.com.www: S 1325400064:1325400064(0) win 512

    • (ttl 64, id 3072)

    • Decoding: S 1325400064/16777216 [ASCII: 79(0)]

  • Packet Six:

    • 18:50:34.071117 nemesis.psionic.com.64535 >

    • blast.psionic.com.www: S 167772160:167772160(0) win 512

    • (ttl 64, id 54528)

    • Decoding: S 167772160/16777216 [ASCII: 10(Carriage Return)]

Using this method, the packet is constructed with the appropriate data in the SYN field and sent to the destination host. The destination host, expecting to receive information from the client, simply grabs the SYN field of each incoming packet to reconstruct the encoded data. This is done with a passive listening socket on the remote end, as described earlier.

Because of the sheer amount of information one can represent in a 32-bit address space (4,294,967,296 numbers), the sequence number makes an ideal location for storing data. Aside from the obvious example given previously, one can use a number of other techniques to store information in either a byte fashion or as bits of information represented through careful manipulation of the sequence number. The simple algorithm of the covert_tcp program takes the ASCII value of our data and converts it to a usable sequence number (which is actually done by the packet generation functions and is converted back to ASCII in a symmetrical manner). Note that this method is similar to a "substitution cipher," whereby packets containing the same information will display the same sequence number (note packets three and four, which contain the letter "L" in the encoding and their sequence numbers). Methods that incorporate a random number generation of the sequence number with a subsequent inclusion of the data to be encoded through an XOR or similar operation may yield a more random result. Inclusion of encrypted data to perform the same function is a logical extension of this idea.

Method Three: The TCP Acknowledge Sequence Number Field "Bounce"

This method relies on basic spoofing of IP addresses to enable a sending machine to "bounce" a packet of information off a remote site and have that site return the packet to the real destination address. This has the benefit of concealing the sender of the packet, as it appears to come from the "bounce" host. This method could be used to set up an anonymous one-way communication network that would be difficult to detect, especially if the bounce server is very busy.

This method relies on the characteristic of TCP/IP where the destination server responds to an initial connect request (SYN packet) with a SYN/ACK packet containing the original initial sequence number plus one (ISN + 1). In this method, the sender constructs a packet that contains the following information:

  • Forged SOURCE IP address

  • Forged SOURCE port

  • Forged DESTINATION IP address

  • Forged DESTINATION port

  • TCP SYN number with encoded data

The source and destination ports chosen do not matter (except if you want to conceal the traffic as a well-known service such as HTTP, and you are having the receiving server listening for data on a predetermined port, in which case you will want to forge the source port as well). The DESTINATION IP address should be the server you wish to bounce information off of and the SOURCE IP should be the address of the server you wish to communicate with.

The packet is sent from the client's computer system and routed to the forged destination IP address in the header ("bounce server"). The bounce server receives the packet and sends either a SYN/ACK or a SYN/RST, depending on the state of the port the packet was destined for on the bounce server. The return packet is sent to the forged source address with the ISN number plus one. The listening destination server takes this incoming packet and decodes the information by transforming the returned sequence number minus one back into the ASCII equivalent. It should be noted that the low-order bits are dropped in the translation process of covert_tcp because of the method used to "encode" and "decode" information, so the program does not need to adjust for the incremented SYN packet number.

Following is a step-by-step representation of the bounce method:

  • Sending Client: A

  • Bounce Server: B

  • Receiving Server: C

  • Step One: Client A sends a forged packet with encoded information to bounce server B. This packet has the address of receiving server C.

  • Step Two: Bounce server B receives the packet and returns an appropriate SYN/ACK or SYN/RST packet based on the status of the port. Because bounce server B thinks the packet came from receiving server C, the packet is sent to the address of receiving server C. The acknowledgment sequence number (which is the encoded sequence number plus one) is sent to server C as well.

  • Step Three: Server C, expecting to receive a packet from bounce server B (or a predetermined port) decodes the data and writes it out to disk.

This method is essentially tricking the remote server into sending the packet and encapsulated data back to the forged source IP address, which it rightfully thinks is legitimate. From the receiving end, the packet appears to originate from the bounce server, and indeed it does. As a side note, if the receiving system is behind a packet filter that allows communication only to certain sites, this method can be used to bounce packets off the trusted sites; this will then relay them to the system behind the packet filter with a legitimate source address. This could be vital in communicating with receiving servers in heavily protected or scrutinized networks.

Bouncing a packet off a well-known Internet site (.mil, .gov, .com, etc.) is also a useful technique for concealing operations in ordinary traffic. Be sure the bounce site is not using round-robin DNS (stable IP address) or, if it is, that the receiving server is passively listening on a predetermined port to decode the transmissions from multiple sites (i.e., send out a forged source address and source port of 1234 so the bounce server returns the packet to the listening server on port 1234). Using this technique, the sending client can bounce packets off hundreds of Internet hosts while the receiving server listens and writes out any data destined for the predefined port number regardless of IP address.

If your network site has a correctly configured router, it may not allow a forged packet with a network number that is not from its network to traverse outbound. Alas, many routers are not configured with this protection in mind and will happily pass the data, so you can generally expect this technique to work.

Implications, Protection, and Detection

The implications of these methods depend on the intent and purposes they are being used for. This method of covert channel could be used immediately as an alternative to encryption in countries that have a stricter stance on cryptography, such as China and France. Additionally, this technique could be used quite effectively for data smuggling and anonymous communication.

Protection from this technique would start with the use of an application proxy firewall system. An application proxy firewall is designed to keep packets from logically separated networks from passing directly to each other. A packet-filter firewall is another option, but is not as effective as the application proxy firewall.

Detection of these techniques can be difficult. If the information in the packet data is encrypted or is "bounced" from another server, it can be very difficult to determine where the packet originated. One way to determine where a forged packet originated is to put a sniffer on the inbound side of the server.

[1]Available at www.firstmonday.dk/issues/issue2_5/rowland/#dep2




Investigator's Guide to Steganography
Investigators Guide to Steganography
ISBN: 0849324335
EAN: 2147483647
Year: 2003
Pages: 220

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net