CS155: Computer and Network Security Programming Project 3 – Spring 2008 Craig Gentry, Naef Imam, Arnab Roy {cgentry, nimam, Thanks.

Slides:



Advertisements
Similar presentations
Router Implementation Project-2
Advertisements

1 Topic 2 – Lesson 4 Packet Filtering Part I. 2 Basic Questions What is packet filtering? What is packet filtering? What elements are inside an IP header?
CISCO NETWORKING ACADEMY Chabot College ELEC Transport Layer (4)
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 OSI Transport Layer Network Fundamentals – Chapter 4.
NMAP Scanning Options. EC-Council NMAP  Nmap is the most popular scanning tool used on the Internet.  Cretead by Fyodar ( it.
Fundamentals of Computer Networks ECE 478/578 Lecture #20: Transmission Control Protocol Instructor: Loukas Lazos Dept of Electrical and Computer Engineering.
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
CSE551: Computer Network Review r Network Layers r TCP/UDP r IP.
1 Reading Log Files. 2 Segment Format
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
1 CS 4396 Computer Networks Lab Transmission Control Protocol (TCP) Part I.
Hands-On Ethical Hacking and Network Defense Second Edition Chapter 5 Port Scanning.
Table of Contents 3 - IDS types 8 - Ethernet Frame 9 - IP frame 10 - TCP frame 11 - UDP frame 12 - ICMP Frame way handshake 15 - TCP flags 16 -
Hands-On Ethical Hacking and Network Defense Chapter 5 Port Scanning.
Transmission Control Protocol (TCP) Basics
CS3505 The Internet and Info Hiway transport layer protocols : TCP/UDP.
Chapter 7 – Transport Layer Protocols
TRANSPORT LAYER  Session multiplexing  Segmentation  Flow control (TCP)  Connection-oriented (TCP)  Reliability (TCP)
Firewalls and Intrusion Detection Systems
Scanning February 23, 2010 MIS 4600 – MBA © Abdou Illia.
TCP/IP Network and Firewall. IP Packet Protocol  1 ICMP packet  6 TCP packet  17 UDP packet.
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
CS155: Computer and Network Security Programming Project 3 – Spring 2004 Matt Rubens
FIREWALLS & NETWORK SECURITY with Intrusion Detection and VPNs, 2 nd ed. 6 Packet Filtering By Whitman, Mattord, & Austin© 2008 Course Technology.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
TCP/IP Basics A review for firewall configuration.
ECE Prof. John A. Copeland fax Office: Klaus 3362.
Gursharan Singh Tatla Transport Layer 16-May
Port Scanning.
Packet Filtering. 2 Objectives Describe packets and packet filtering Explain the approaches to packet filtering Recommend specific filtering rules.
FIREWALL Mạng máy tính nâng cao-V1.
Chapter 6: Packet Filtering
PA3: Router Junxian (Jim) Huang EECS 489 W11 /
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
CS332, Ch. 26: TCP Victor Norman Calvin College 1.
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.
 network appliances to filter network traffic  filter on header (largely based on layers 3-5) Internet Intranet.
CSE 461 Section. Let’s learn things first! Joke Later!
Distributed Denial of Service Attacks Shankar Saxena Veer Vivek Kaushik.
Scanning & Enumeration Lab 3 Once attacker knows who to attack, and knows some of what is there (e.g. DNS servers, mail servers, etc.) the next step is.
Lecture 22 Network Security CS 450/650 Fundamentals of Integrated Computer Security Slides are modified from Hesham El-Rewini.
Protocol Headers 0x0800 Internet Protocol, Version 4 (IPv4) 0x0806 Address Resolution Protocol (ARP) 0x8100 IEEE 802.1Q-tagged frame 0x86DD Internet Protocol,
Advanced Packet Analysis and Troubleshooting Using Wireshark 23AF
Computer Science and Engineering Computer System Security CSE 5339/7339 Session 25 November 16, 2004.
Chapter 8 Network Security Thanks and enjoy! JFK/KWR All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking:
Slide #1 CIT 380: Securing Computer Systems TCP/IP.
DoS/DDoS attack and defense
Breno de MedeirosFlorida State University Fall 2005 The IP, TCP, UDP protocols A quick refresher.
© Jörg Liebeherr (modified by Malathi Veeraraghavan) 1 Overview Formats, Data Transfer, etc. Connection Management.
or call for office visit,
Transport Layer1 TCP Connection Management Recall: TCP sender, receiver establish “connection” before exchanging data segments r initialize TCP variables:
CITA 352 Chapter 2 TCP/IP Concepts Review. Overview of TCP/IP Protocol –Language used by computers –Transmission Control Protocol/Internet Protocol (TCP/IP)
11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
Introduction to Information Security
Port Scanning James Tate II
or call for office visit, or call Kathy Cheek,
or call for office visit,
Port Scanning (based on nmap tool)
TCP.
TCP - Part I Karim El Defrawy
The IP, TCP, UDP protocols
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
CS4470 Computer Networking Protocols
Lecture 12 Internet Protocols Internet resource allocation and QoS
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Session 20 INST 346 Technologies, Infrastructure and Architecture
Transport Layer 9/22/2019.
TCP Connection Management
Presentation transcript:

CS155: Computer and Network Security Programming Project 3 – Spring 2008 Craig Gentry, Naef Imam, Arnab Roy {cgentry, nimam, Thanks to Arpit Aggarwal and Elizabeth Stenson

Project Overview 1) Learn to examine network packets to obtain useful information 2) Implement a router that performs a simple scan detection

Part 1: Packet traces We will use Wireshark to look at network packets. Available at: Available for most platforms

Features useful for the project Individual Packet info Filtering Following TCP/UDP streams String search For the 2 nd part of the project you will need to capture network packets as well

Part 2 Scan Detection

Overview Write a simple intrusion detection system to identify SYN floods, port and host scans Understand what goes into building a basic network intrusion detection system Block diagram BrowserNetwork Router/ IDS

Setup We ’ ll be using a VNS system Sample topology and Routing table Sample Routing table eth eth0

Setup(2) process_ip_packets() in process_ip.c is called for each IP packet protocol_headers.h and Network Sorcery website are good sources

SYN Floods SYN Floods are Denial of Service attack used to make certain services unavailable on the target machine Attacker sets up numerous connections to victim machine using specific port When a SYN packet is received, the victim allocates resources to this new connection – since these resources are finite, a large number of connections will make the port on the target unusable

Port Scans Port scans are used by attackers to see what ports and services are running on target machines E.g. use port scans to find that victim machine is running the notorious sendmail program! Consist of any packet that would generate a response from a receiver – ICMP echo requests, TCP packets (including SYN Packets – Note the difference from SYN Flood!) These packets are sent to large number of ports on a machine with the aim of finding processes and possible open ports. Often they get – ve responses.

Host Scans Similar methodology to port scans. Just does it over a large number of machines in the and checks them for the same open port

Assumptions Clients respond to data packets part of established flow You ’ re only working with TCP, UDP and ICMP Echo packets

What to do We are only implementing Port Scans Explain in your README, how you will expand your program to track host scans and SYN Floods, incl. discussion about various cases. You do not need to implement them. (Note) Track number of connection requests vs. Positive Responses for each originating host If this ratio exceeds 3 to 1, your router must issue a warning. (Note: print them to a file called scan_warning) source ip SCANNING For each negative response received (not timeouts) source ip NEG TYPE (where type can be RST, ICMP_UNREACH)

What to do (2) Connection Request Positive Response Negative Response TCP SYN Packet ICMP Echo Request UDP Packet (Traceroute) TCP SYN/ACK ICMP Echo Reply Timeout Other replies TCP RST, Timeout ICMP Port Unreachable, Timeout ICMP Host/Port Unreachable

Considerations Timeouts Between Packets – 1 second ( to make sure packet bursts don ’ t get unduly noted) Keepalive for each host – 30 seconds No false positives Consider cases like a buggy program making requests with – ve responses to a single port

Wrapup The hard part is figuring out how to parse the various layers of headers. You can find the header definitions at: Ethernet: /usr/include/net/ethernet.h IP: /usr/include/netinet/ip.h TCP: /usr/include/netinet/tcp.h The harder part is to create data structures to keep state info.

Wrapup(2) This whole assignment shouldn ’ t take more than a couple hundred lines of code However, it requires a good understanding of what ’ s happening on the network The programs seem simple, but they can take more time than anticipated Enjoy yourself – this is fun stuff!

Goals of the assignment Get some hands-on experience attacking and defending networks DON ’ T end up in jail Never test your code outside of the VNS environment!

Good luck!

Addendum

Quick TCP/IP Review

TCP/IP Overview Basic knowledge of TCP/IP and DDOS with SYN Floods is required as discussed in class We assume a basic knowledge on the level of packets and ports If you ’ re not that comfortable with this, stop by office hours

Relevant Network Layers From

Cliffs Notes Version Each TCP packet that you see is actually a TCP packet wrapped inside of an IP packet wrapped inside of an Ethernet packet. Ethernet Header IP Header TCP Header Application Data

TCP Flags Synchronize flag [SYN] Used to initiate a TCP connection Acknowledgement flag [ACK] Used to confirm received data Finish flag [FIN] Used to shut down the connection

TCP Flags (2) Push flag [PSH] Do not buffer data on receiver side – send directly to application level Urgent flag [URG] Used to signify data with a higher priority than the other traffic I.e Ctrl+C interrupt during an FTP transfer Reset flag [RST] Tells receiver to tear down connection immediately

Connection setup “ Three-way handshake ” From

Connection termination Either side can initiate termination Note that the first FIN packet may still contain data! From