OSI stands for Open Source Interconnection, and the OSI model is a layered model that refers to how information moves from an application running on one networked computer to an application running on another.
The process of this transfer can be broken down into seven layers. Here they are in order from innermost layer to outermost layer: Physical, Data Link, Network, Transport, Session, Presentation, and Application. A common acronym for memorizing these applications in their proper order is Please Do Not Throw Sausage Pizza Away.
But what are each of these processes actually responsible for accomplishing? Layer 1 manages the physical medium through which the data travels. This could mean Ethernet cables, network interface controllers, or a variety of other options. Layer 2, Data Link, is the layer in which network packets are translated into raw bits to be transmitted at the physical layer or Layer 1. So together, Layer 1 and 2 handle the process of network card receiving streams of bits over the network via the wires (layer 1) and then making sense of the 1s and 0s and making sure that the data was even intended for the computer that received it. The process continues if the MAC address matches the MAC address of the network card.
Then in Layer 3 (Network), it’s determined how exactly data will be transmitted between network devices. Logical addresses are transmitted into physical addresses (i.e. the computer name is transmitted into a MAC address), and the route is defined and network problems are managed and addressed. Routers work on the Layer 3 and make decisions based on the information taken from Layer 3.
During Layer 4 or the Transport Layer, data is accepted from the session layer and broken into packets so that it can be delivered to the network layer. The transport layer makes sure that the data arrives successfully at the destination device. Transport Layer Security runs on this layer of the process.
Layer 5 is Session, which means that it’s where the setting up and taking down of the association between two communicating end points (known as a connection) is managed and maintained. Layer 5 makes sure that ports are used and data is properly directed.
Layer 6 is Presentation, which means differences in data representation are resolved by translating from application to network format and vice versa. This layer ensures that all information is converted into the proper syntax and semantics depending on whether its converted to a format understandable to the receiving application or into a more generic format for transmission to the network.
Finally we’re at layer 7, which provides the set of interfaces for applications to obtain access to networked services. This is where application access security checking and information validation occurs.
Now say you want to use your understanding of this OSI model to steal some data. Download Wireshark. Get all the required packages by making a new temporary directory or just use an older version of Wireshark if the libpcap, glib, or GTK+ dependencies that newer versions require are causing problems for you. Download the source code with Wget and compile everything.