3 TCPIP Overview
3 TCPIP Overview
Lesson Objectives
Upon completing this lesson, you will be able to:
– Describe the TCP/IP protocol stack
– Explain the basic concepts of IP addressing
– Explain the binary, octal, and hexadecimal numbering
systems.
Overview of TCP/IP
Protocol
– A set of rules that govern how
computers operate and
communicate
– Transmission Control
Protocol/Internet Protocol
(TCP/IP)
• Most widely used
TCP/IP stack
– Four distinct layers
• Network
• Internet
• Transport
• Application
TCP/IP to OSI Mapping
Compare the TCP/IP stack with the OSI Model stack, which is composed of seven
layers: Physical, Data Link, Network, Session, Transport, Presentation, and Application.
• IP Addressing
Inter
net
• OSI Network
1. Network
2. Internet
3. Transport
4. Application
1
2
4
The Application Layer
The application layer is the OSI layer closest to the end user, which means both
the OSI application layer and the user interact directly with the software
application.
– (e.g. Web browser using HTTP for accessing the website)
The Transport Layer
The Transport Layer is responsible for establishing a temporary communication session
between two applications and delivering data between them.
Wireshark Output
TCP Segment Headers
As a security professional, it is important to clearly understand the critical components
of a TCP header.
Hackers usually try to exploit
these components to
discover vulnerabilities and
perform attacks.
Critical components include:
– TCP flags
– Initial sequence number
(ISN)
– Source and destination
port numbers
Transport Layer : TCP Flags
The six flags in a TCP header are switches that can be set to on or off to indicate the
status of a port or service.
.
Overview of Numbering Systems
This section provides a review of the binary, octal, and hexadecimal numbering
systems.
As a security professional, knowledge of numbering systems will come into play
– Binary (Base 2 0 and 1)
– Octal (Base 8 0, 1, 2…7)
– Decimal (Base 10 0, 1, 2…9)
– Hexadecimal (Base 16 0, 1, 2…9, A, B, C, D, E, F)
Reviewing the Binary Numbering System
Uses number 2 as its base
Converting from Decimal to Binary
Hexadecimal numeral system
The hexadecimal numeral system, also known as just hex, is a numeral system made
up of 16 symbols (base 16).
With hex, the first 10 digits, 0 thru 9, are the same as decimal.
However, 10 thru 15 decimal are represented as a single hex digit A thru F.
– To convert a binary byte to hex byte, first split the binary number into two nibbles,
treating them as separate numbers, and then compute the hex equivalent for each
half.
– Finally, concatenate the two hex numbers into a single solution.
– This works perfectly because a nibble has a value from 0 thru 15 or 0x0 thru 0xF.
Reviewing the Octal Numbering System
The octal numeral system, or oct for short, is the base-8 number system, and uses the
digits 0 to 7
Octal numerals can be made from binary
numerals by grouping consecutive binary
digits into groups of three (starting from
the right).
Uses 8 as its base
– Supports values from 0 to 7
Octal digits can be represented with only
three bits
UNIX permissions
– Owner permissions (rwx)
– Group permissions (rwx)
– Other permissions (rwx)
• Setting permission (rwxrwxrwx) means they
all have read, write, and execute permissions
Summary (1/3)
TCP/IP is the most widely used protocol for communication over the
Internet.
The TCP/IP stack consists of four layers that perform different
functions.
– Network, Application, Transport ,and Internet
The Application layer protocols are the front end to the lower-layer
protocols..
– Examples of protocols operating at this layer are HTTP, SMTP,
Telnet, and SNMP
The Transport layer is responsible for encapsulating data into
segments and uses.
– UDP or TCP headers for connections and for forwarding data.
– TCP is a connection-oriented protocol.
– UDP is a connectionless protocol
Summary (2/3)
The critical components of TCP segment headers are
– TCP flags,
– initial Sequence number (ISN),
– Source and destination port numbers
TCP ports identify the services running on a system.
– Port numbers from 1 to 1023 are considered well-known ports.
– A total of 65,535 port numbers are available
The Internet layer is responsible for routing a packet to a destination
address.
IP addresses as well as ICMP messages are used in this layer.
IP, like UDP ,is a connectionless protocol.
ICMP is used to send messages related to network operations.
Summary (3/3)
An IP addresses consist of 4bytes ,also called octets, which are divided
into two components: a network address and a host address.
Three classes of addresses are used on the Internet :Class A, B, and C.
An IPv6 addresses consist of 16 bytes and are written in hexadecimal
notation.
Binary numbers are represented by 0 Or 1.
The octal numbering system (base8) uses numbers from 0 to 7.
The number7,which can be written with 3 binary bits:111.
Hexadecimal is a base-16 numbering system that uses numbers from 0
to15.
After 9,the numbers 10,11,12,13,14, and15 are represented as
A,B,C,D,E, and F