CIS3355:
Business Data Structures |
What happens if we use “illegal” offsets??
First of all, understand the following terms:
What is an address?It is a location of data, usually in main memory or on a disk. It is an array of storage boxes, each of which is one byte in length. Each box has an address—a unique number assigned to it, which makes it easier to locate.
What is an array?
An array is a regular order or arrangement containing a fixed number of contiguously storage elements (that is, there are no gaps between elements) of the same data type (although they may have different values). We could have an array of integers, an array of characters or an array of anything that has a defined data type.
For example, we could store the first 10 prime numbers (1, 2, 3, 5, 7, 11, 13, 17, 19, 23) in RAM by storing them as individual integer variables one for each number. Using the following c declaration:
Since an array is a fixed number of contiguous storage all of the same data type, in RAM (assuming that the first contiguous block was at address 2000) it would look like this (2-bytes per integer):
Arrays can have more than one dimension. A one-dimensional array is called a vector or pointer, which contains the address of a location in memory; a two-dimensional array is called a matrix, that is, an array of rows and columns. What is a string?
A string is a sequence of data values, usually bytes, which stand for characters (a “character string”). A character string differs from a name in that it does not represent anything. For example, a bit string is a sequence of bits.
A character string is usually defined by enclosing the characters in single or double quotes:
WASHINGTON would be a name, but 'WASHINGTON' and "WASHINGTON" would be character strings.
The length of a character string is usually the number of characters in it:
The character string "WASHINGTON" has a length of 10 (the quote marks are not included).
What is an offset?
An offset (subscript) is an index or position in an array, string, or block of memory—usually a non-negative integer.
For example: 0, 1, 2, 3…
It is a value added to a base address to create a second address.
For example, if B represents address 100, then the expression, B+5 would indicate the address 105. The 5 in the expression, is the offset. Okay, now that we know the basic word definitions, what happens if we use “illegal” offsets?
Illegal offsets are alterations than can cause malicious fragmentation, most commonly known as computer viruses. Many attackers, for example, send illegal offsets within a TCP packet.
TCP stands for Transmission Control Protocol. It is a connection-oriented protocol that utilizes various flags to indicate that a connection is being started or ended, or that there’s a high priority on the data that it carries.
Attackers alter the TCP flags in a way that firewalls or intrusion detection systems are unable to detect them.
What are flags?
Flags are a bit of information that signals a particular condition or status. For example, a record might contain an error flag to indicate that the record consists of incorrect data.
What type of flags should be set in a TCP packet?
At least one of the following flags should be set in a TCP packet; each one takes up to 1 bit of storage.
Note: Besides the six flag bits described here, TCP packets have two additional bits which are reserved for future use. These are commonly referred to as the "reserved bits".
What constitutes a normal flag combination?
The following are normal flag combinations:
What are the abnormal flag combinations (viruses) an attacker may send to a computer?
The following are examples of abnormal flag combinations.
Visit the following links for more detail information: http://www.securityfocus.com/infocus/1200 http://www.cs.wright.edu/pmateti/InternetSecurity/Lectures/Ipexploits/ http://www.giac.com/practical/EAVazquezJr.html http://www.web.ask.com/redir?bpg=http%2f%2fweb.ask.com%2fweb% Review Questions1. Which of the following is a position in an array, string, or block of memory?
(Answer: c) 2. Malicious fragmentation is most commonly knows as:
(Answer: b) 3. Which of the following is a bit of information that signals a particular c condition?
(Answer: d) 4. What type of fragmentation do illegal offsets cause? (Answer: Malicious fragmentation) 5. What does TCP stand for? (Answer: Transmission Control Protocol) 6. What are some examples of normal flag combinations? (Answer: SYN, SYN ACK, ACK; FIN ACK, ACK; PSH FIN ACK; RST/RST ACK) 7. Describe some abnormal flag combinations an attacker may send to a computer. (Answer: SYN FIN; SYN FIN PSH, SYN FIN RST, SYN FIN RST PSH; FIN; NULL)
|