Hands-On Ethical Hacking and Network Defense Chapter 2 TCP/IP Concepts Review Last modified 1-30-10.

Slides:



Advertisements
Similar presentations
Cisco 2 - Routers Perrine. J Page 14/30/2015 Chapter 10 TCP/IP Protocol Suite The function of the TCP/IP protocol stack is to transfer information from.
Advertisements

CISCO NETWORKING ACADEMY Chabot College ELEC Transport Layer (4)
CCNA – Network Fundamentals
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 OSI Transport Layer Network Fundamentals – Chapter 4.
IST 201 Chapter 9. TCP/IP Model Application Transport Internet Network Access.
Ethical Hacking and Network Defense
Communication Protocols II Ninth Meeting. TCP/IP family.
CS3505 The Internet and Info Hiway transport layer protocols : TCP/UDP.
Lecture # 14 TCP/IP - UDP Computer Communication & Networks.
TRANSPORT LAYER  Session multiplexing  Segmentation  Flow control (TCP)  Connection-oriented (TCP)  Reliability (TCP)
CCNA 1 v3.1 Module 11 Review.
© Wiley Inc All Rights Reserved. CCNA: Cisco Certified Network Associate Study Guide CHAPTER 2: Internet Protocols.
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
Lesson 7 – THE BUSINESS OF NETWORKING. TCP/IP and UDP Other Internet protocols Important Internet protocols OVERVIEW.
Chapter 2 Internet Protocol DoD Model Four layers: – Process/Application layer – Host-to-Host layer – Internet layer – Network Access layer.
Institute of Technology Sligo - Dept of Computing Semester 2 Chapter 9 The TCP/IP Protocol Suite Paul Flynn.
Chapter Overview TCP/IP Protocols IP Addressing.
Microsoft Windows Server 2003 TCP/IP Protocols and Services Technical Reference Slide: 1 Lesson 12 Transmission Control Protocol (TCP) Basics.
CS 350 Chapter-6. A brief history of TCP/IP 1983 TCP/IP came to ARPAnet ARPAnet and MILNET dissolved in 1990 BSD UNIX.
Chapter Eleven An Introduction to TCP/IP. Objectives To compare TCP/IP’s layered structure to OSI To review the structure of an IP address To look at.
Forensic and Investigative Accounting
Packet Filtering. 2 Objectives Describe packets and packet filtering Explain the approaches to packet filtering Recommend specific filtering rules.
Hands-On Microsoft Windows Server 2003 Networking Chapter Three TCP/IP Architecture.
Lesson 24. Protocols and the OSI Model. Objectives At the end of this Presentation, you will be able to:
Networking Basics TCP/IP TRANSPORT and APPLICATION LAYER Version 3.0 Cisco Regional Networking Academy.
Network Protocols. Why Protocols?  Rules and procedures to govern communication Some for transferring data Some for transferring data Some for route.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Network Services Networking for Home and Small Businesses – Chapter.
1 Chapter Overview TCP/IP DoD model. 2 Network Layer Protocols Responsible for end-to-end communications on an internetwork Contrast with data-link layer.
Copyright 2003 CCNA 1 Chapter 9 TCP/IP Transport and Application Layers By Your Name.
Semester 2v2 Chapter 9:  TCP/IP.
CCNA1 v3 Module 11 v3 CCNA 1 Module 11 JEOPARDY S Dow.
Forensic and Investigative Accounting Chapter 14 Internet Forensics Analysis: Profiling the Cybercriminal © 2005, CCH INCORPORATED 4025 W. Peterson Ave.
1 7-Oct-15 OSI transport layer CCNA Exploration Semester 1 Chapter 4.
Component 9 – Networking and Health Information Exchange Unit 1-1 ISO Open Systems Interconnection (OSI) This material was developed by Duke University,
1 Version 3.0 Module 11 TCP Application and Transport.
Chap 9 TCP/IP Andres, Wen-Yuan Liao Department of Computer Science and Engineering De Lin Institute of Technology
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
1 LAN Protocols (Week 3, Wednesday 9/10/2003) © Abdou Illia, Fall 2003.
TCP/IP Transport and Application (Topic 6)
Packet Filtering Chapter 4. Learning Objectives Understand packets and packet filtering Understand approaches to packet filtering Set specific filtering.
11 TRANSPORT LAYER PROTOCOLS Chapter 6 TCP and UDP SPX and NCP.
Chapter 6-2 the TCP/IP Layers. The four layers of the TCP/IP model are listed in Table 6-2. The layers are The four layers of the TCP/IP model are listed.
Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 6 The Transport Layer.
Hands-On Ethical Hacking and Network Defense Chapter 2 TCP/IP Concepts Review.
CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
Application Layer Khondaker Abdullah-Al-Mamun Lecturer, CSE Instructor, CNAP AUST.
TCP/IP Honolulu Community College Cisco Academy Training Center Semester 2 Version 2.1.
Computer Networks Week 4 OSI Transport Layer. Computer Networks Week 4 Note for Instructors These presentations are the result of a collaboration among.
Cisco 1 - Networking Basics Perrine. J Page 16/5/2016 Chapter 11 At which layer of the TCP/IP model does Telnet operate? 1.application 2.presentation 3.session.
Cisco Networking Academy S2 C9 TCP/IP. ensure communication across any set of interconnected networks Stack components such as protocols to support file.
Networking Basics CCNA 1 Chapter 11.
Hands-On Ethical Hacking and Network Defense
Page 12/9/2016 Chapter 10 Intermediate TCP : TCP and UDP segments, Transport Layer Ports CCNA2 Chapter 10.
Computer Network Architecture Lecture 6: OSI Model Layers Examples 1 20/12/2012.
Network Basics CS490 - Security in Computing Copyright © 2005 by Scott Orr and the Trustees of Indiana University.
01_NF_Ch04 – OSI Transport Layer ( 傳輸層 ) Source: CCNA Exploration.
CITA 352 Chapter 2 TCP/IP Concepts Review. Overview of TCP/IP Protocol –Language used by computers –Transmission Control Protocol/Internet Protocol (TCP/IP)
Cisco I Introduction to Networks Semester 1 Chapter 7 JEOPADY.
IST 201 Chapter 11 Lecture 2. Ports Used by TCP & UDP Keep track of different types of transmissions crossing the network simultaneously. Combination.
Hands-On Ethical Hacking and Network Defense Chapter 2 TCP/IP Concepts Review Last modified jw.
v3 JEOPARDY CCNA 1 Module 11 CCNA1 v3 Module 11 Galo Valencia
TCP/IP Internetworking
Networking for Home and Small Businesses – Chapter 6
TCP/IP Internetworking
Networking for Home and Small Businesses – Chapter 6
Networking Theory (part 2)
PART 5 Transport Layer.
Networking for Home and Small Businesses – Chapter 6
Transport Layer 9/22/2019.
Networking Theory (part 2)
Presentation transcript:

Hands-On Ethical Hacking and Network Defense Chapter 2 TCP/IP Concepts Review Last modified

Objectives Describe the TCP/IP protocol stack Describe the TCP/IP protocol stack Explain the basic concepts of IP addressing Explain the basic concepts of IP addressing Explain the binary, octal, and hexadecimal numbering system Explain the binary, octal, and hexadecimal numbering system

Overview of TCP/IP Protocol Protocol Common language used by computers for speaking Common language used by computers for speaking Transmission Control Protocol/Internet Protocol (TCP/IP) Transmission Control Protocol/Internet Protocol (TCP/IP) Most widely used protocol Most widely used protocol TCP/IP stack TCP/IP stack Contains four different layers Contains four different layers Network Network Internet Internet Transport Transport Application Application

The Application Layer Front end to the lower-layer protocols Front end to the lower-layer protocols What you can see and touch – closest to the user at the keyboard What you can see and touch – closest to the user at the keyboard HTTP, FTP, SMTP, SNMP, SSH, IRC and TELNET all operate in the Application Layer HTTP, FTP, SMTP, SNMP, SSH, IRC and TELNET all operate in the Application Layer

The Transport Layer Encapsulates data into segments Encapsulates data into segments Segments can use TCP or UDP to reach a destination host Segments can use TCP or UDP to reach a destination host TCP is a connection-oriented protocol TCP is a connection-oriented protocol TCP three-way handshake TCP three-way handshake Computer A sends a SYN packet Computer A sends a SYN packet Computer B replies with a SYN-ACK packet Computer B replies with a SYN-ACK packet Computer A replies with an ACK packet Computer A replies with an ACK packet

TCP Header Format | Source Port | Destination Port | | Source Port | Destination Port | | Sequence Number | | Sequence Number | | Acknowledgment Number | | Acknowledgment Number | | Data | |U|A|P|R|S|F| | | Data | |U|A|P|R|S|F| | | Offset| Reserved |R|C|S|S|Y|I| Window | | Offset| Reserved |R|C|S|S|Y|I| Window | | | |G|K|H|T|N|N| | | | |G|K|H|T|N|N| | | Checksum | Urgent Pointer | | Checksum | Urgent Pointer | | Options | Padding | | Options | Padding | | data | | data |

TCP Segment Headers Critical components: Critical components: TCP flags TCP flags Initial Sequence Number (ISN) Initial Sequence Number (ISN) Source and destination port Source and destination port Abused by hackers finding vulnerabilities Abused by hackers finding vulnerabilities

TCP Flags Each flag occupies one bit Each flag occupies one bit Can be set to 0 (off) or 1 (on) Can be set to 0 (off) or 1 (on) Six flags Six flags SYN: synchronize flag SYN: synchronize flag ACK: acknowledge flag ACK: acknowledge flag PSH: push flag PSH: push flag URG: urgent flag URG: urgent flag RST: reset flag RST: reset flag FIN: finish flag FIN: finish flag

Initial Sequence Number (ISN) 32-bit number 32-bit number Tracks packets received Tracks packets received Enables reassembly of large packets Enables reassembly of large packets Sent on steps 1 and 2 of the TCP three- way handshake Sent on steps 1 and 2 of the TCP three- way handshake By guessing ISN values, a hacker can hijack a TCP session, gaining access to a server without logging in By guessing ISN values, a hacker can hijack a TCP session, gaining access to a server without logging in

TCP Ports Port Port Logical, not physical, component of a TCP connection Logical, not physical, component of a TCP connection Identifies the service that is running Identifies the service that is running Example: HTTP uses port 80 Example: HTTP uses port 80 A 16-bit number – 65,536 ports A 16-bit number – 65,536 ports Each TCP packet has a source and destination port Each TCP packet has a source and destination port

Blocking Ports Helps you stop or disable services that are not needed Helps you stop or disable services that are not needed Open ports are an invitation for an attack Open ports are an invitation for an attack You can’t block all the ports You can’t block all the ports That would stop all networking That would stop all networking At a minimum, ports 25 and 80 are usually open on a server, so it can send out and Web pages At a minimum, ports 25 and 80 are usually open on a server, so it can send out and Web pages

TCP Ports (continued) Only the first 1023 ports are considered well-known Only the first 1023 ports are considered well-known List of well-known ports List of well-known ports Available at the Internet Assigned Numbers Authority (IANA) Web site ( Available at the Internet Assigned Numbers Authority (IANA) Web site ( Ports 20 and 21 Ports 20 and 21 File Transfer Protocol (FTP) File Transfer Protocol (FTP) Use for sharing files over the Internet Use for sharing files over the Internet Requires a logon name and password Requires a logon name and password More secure than Trivial File Transfer Protocol (TFTP) More secure than Trivial File Transfer Protocol (TFTP)

TCP Ports (continued) Port 25 Port 25 Simple Mail Transfer Protocol (SMTP) Simple Mail Transfer Protocol (SMTP) servers listen on this port servers listen on this port Port 53 Port 53 Domain Name Service (DNS) Domain Name Service (DNS) Helps users connect to Web sites using URLs instead of IP addresses Helps users connect to Web sites using URLs instead of IP addresses Port 69 Port 69 Trivial File Transfer Protocol Trivial File Transfer Protocol Used for transferring router configurations Used for transferring router configurations

TCP Ports (continued) Port 80 Port 80 Hypertext Transfer Protocol (HTTP) Hypertext Transfer Protocol (HTTP) Used when connecting to a Web server Used when connecting to a Web server Port 110 Port 110 Post Office Protocol 3 (POP3) Post Office Protocol 3 (POP3) Used for retrieving Used for retrieving Port 119 Port 119 Network News Transfer Protocol Network News Transfer Protocol For use with newsgroups For use with newsgroups

TCP Ports (continued) Port 135 Port 135 Remote Procedure Call (RPC) Remote Procedure Call (RPC) Critical for the operation of Microsoft Exchange Server and Active Directory Critical for the operation of Microsoft Exchange Server and Active Directory Port 139 Port 139 NetBIOS NetBIOS Used by Microsoft’s NetBIOS Session Service Used by Microsoft’s NetBIOS Session Service File and printer sharing File and printer sharing

19 TCP Ports (continued) Port 143 Port 143 Internet Message Access Protocol 4 (IMAP4) Internet Message Access Protocol 4 (IMAP4) Used for retrieving Used for retrieving More features than POP3 More features than POP3

Demonstration Telnet to hills.ccsf.edu and netstat to see the connections Telnet to hills.ccsf.edu and netstat to see the connections Port 23 (usual Telnet) Port 23 (usual Telnet) Port 25 blocked off campus, but 110 connects Port 25 blocked off campus, but 110 connects Port 21 works, but needs a username and password Port 21 works, but needs a username and password

Demonstration Wireshark Packet Sniffer Wireshark Packet Sniffer TCP Handshake: SYN, SYN/ACK, ACK TCP Handshake: SYN, SYN/ACK, ACK TCP Ports TCP Ports TCP Status Flags TCP Status Flags

User Datagram Protocol (UDP) Fast but unreliable protocol Fast but unreliable protocol Operates on transport layer Operates on transport layer Does not need to verify whether the receiver is listening Does not need to verify whether the receiver is listening Higher layers of the TCP/IP stack handle reliability problems Higher layers of the TCP/IP stack handle reliability problems Connectionless protocol Connectionless protocol

The Internet Layer Responsible for routing packets to their destination address Responsible for routing packets to their destination address Uses a logical address, called an IP address Uses a logical address, called an IP address IP addressing packet delivery is connectionless IP addressing packet delivery is connectionless

Internet Control Message Protocol (ICMP) Operates in the Internet layer of the TCP/IP stack Operates in the Internet layer of the TCP/IP stack Used to send messages related to network operations Used to send messages related to network operations Helps in troubleshooting a network Helps in troubleshooting a network Some commands include Some commands include Ping Ping Traceroute Traceroute

ICMP Type Codes

26 Wireshark Capture of a PING

Warriors of the Net Network+ Movie Network+ Movie Warriorsofthe.net (link Ch 2d) Warriorsofthe.net (link Ch 2d)

IP Addressing Consists of four bytes, like Consists of four bytes, like Two components Two components Network address Network address Host address Host address Neither portion may be all 1s or all 0s Neither portion may be all 1s or all 0s Classes Classes Class A Class A Class B Class B Class C Class C

IP Addressing (continued) Class A Class A First byte is reserved for network address First byte is reserved for network address Last three bytes are for host address Last three bytes are for host address Supports more than 16 million host computers Supports more than 16 million host computers Limited number of Class A networks Limited number of Class A networks Reserved for large corporations and governments (see link Ch 2b) Reserved for large corporations and governments (see link Ch 2b) Format: network.node.node.node Format: network.node.node.node

IP Addressing (continued) Class B Class B First two bytes are reserved for network address First two bytes are reserved for network address Last two bytes are for host address Last two bytes are for host address Supports more than 65,000 host computers Supports more than 65,000 host computers Assigned to large corporations and Internet Service Providers (ISPs) Assigned to large corporations and Internet Service Providers (ISPs) Format: network.network.node.node Format: network.network.node.node CCSF has – CCSF has –

IP Addressing (continued) Class C Class C First three bytes are reserved for network address First three bytes are reserved for network address Last byte is for host address Last byte is for host address Supports up to 254 host computers Supports up to 254 host computers Usually available for small business and home networks Usually available for small business and home networks Format: network.network.network.node Format: network.network.network.node

IP Addressing (continued) Subnetting Subnetting Each network can be assigned a subnet mask Each network can be assigned a subnet mask Helps identify the network address bits from the host address bits Helps identify the network address bits from the host address bits Class A uses a subnet mask of Class A uses a subnet mask of Also called /8 Also called /8 Class B uses a subnet mask of Class B uses a subnet mask of Also called /16 Also called /16 Class C uses a subnet mask of Class C uses a subnet mask of Also called /24 Also called /24

Planning IP Address Assignments Each network segment must have a unique network address Each network segment must have a unique network address Address cannot contain all 0s or all 1s Address cannot contain all 0s or all 1s To access computers on other networks To access computers on other networks Each computer needs IP address of gateway Each computer needs IP address of gateway

35 Planning IP Address Assignments TCP/IP uses subnet mask to determine if the destination computer is on the same network or a different network TCP/IP uses subnet mask to determine if the destination computer is on the same network or a different network If destination is on a different network, it relays packet to gateway If destination is on a different network, it relays packet to gateway Gateway forwards packet to its next destination (routing) Gateway forwards packet to its next destination (routing) Packet eventually reaches destination Packet eventually reaches destination

In-Class Exercises These aren’t in the handout, but you can practice them by doing project X1 for extra credit.

Good Network IP Address Subnet Mask Default Gateway Hub To the Internet A B CD Network:

Duplicate IP Address IP Address Subnet Mask Default Gateway Hub To the Internet A B CD Network:

IP Address Outside Subnet IP Address Subnet Mask Default Gateway Hub To the Internet A B CD Network:

Wrong Subnet Mask IP Address Subnet Mask Default Gateway Hub To the Internet A B CD Network:

Wrong Default Gateway IP Address Subnet Mask Default Gateway Hub To the Internet A B CD Network:

IPv6 Modern operating systems like Windows 7 use IPv6 in addition to IPv4 Modern operating systems like Windows 7 use IPv6 in addition to IPv4 IPv6 addresses are much longer: 128 bits instead of the 32 bits used by IPv4 IPv6 addresses are much longer: 128 bits instead of the 32 bits used by IPv4