DOC PREVIEW
Stanford CS 155 - Lecture Notes

This preview shows page 1-2-3 out of 8 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1CS155 - FirewallsSimon Cooper <[email protected]>CS155 – Firewalls22 May 20032Why Firewalls?Need for the exchange of information; education, business, recreation, social and politicalNeed to do something useful with your computerDrawbacks; unsolicited attention and bugs3Why Firewalls?There are a lot of people on the InternetMillions of people together -> bad things happenTrue for cities; it is true for the InternetWith the Internet...Everyone is in your backyard!You can be scoped out at any time from anywhereThe community discourages neighborhood watch like activities (a hot potato!)4Bugs, Bugs, BugsAll programs contain bugsLarger programs contain more bugs!Network protocols contain;Design weaknesses (SSH CRC)Implementation flaws (SSL, NTP, FTP, SMTP...)Careful (defensive) programming & protocol design is hard5What is a Firewall?Literally?Prevents fire from spreading!The Castle & Moat AnalogyRestricts access from the outsidePrevents attackers from getting too closeRestricts people from leaving <- Important!!6What is a Firewall?Logically A separator, a restrictor and an analyzerRarely a single physical object!Practically any place where internal and external data can meet7Where do you put a Firewall?Between insecure systems & the InternetTo separate test or lab networksFor networks with more sensitive data;Financial recordsStudent gradesSecret projectsPartner or joint venture networks8Firewall Design & Architecture IssuesLeast privilegeDefense in depth (very important)Choke pointWeakest linksFail-safe stanceUniversal participationDiversity of defenseSimplicity9Firewall ArchitecturesUsing a Screening Router to do Packet Filtering10Packet Filtering: IPv4 Packet Header 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|Version| IHL |Type of Service| Total Length |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Identification |Flags| Fragment Offset |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Time to Live | Protocol | Header Checksum |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Source Address |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Destination Address |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Options | Padding |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+http://www.faqs.org/rfcs/rfc760.html11Packet Filtering: UDP Packets 0 7 8 15 16 23 24 31 +--------+--------+--------+--------+ | Source | Destination | | Port | Port | +--------+--------+--------+--------+ | | | | Length | Checksum | +--------+--------+--------+--------+ | | data octets ... +---------------- ... User Datagram Header Formathttp://www.faqs.org/rfcs/rfc768.html12Packet Filtering: TCP packet structure 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Source Port | Destination Port |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Sequence Number |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Acknowledgment Number |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Data | |U|A|E|R|S|F| || Offset| Reserved |R|C|O|S|Y|I| Window || | |G|K|L|T|N|N| |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Checksum | Urgent Pointer |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Options | Padding |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| data |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ TCP Header Formathttp://www.faqs.org/rfcs/rfc761.html13Packet Filtering: Ipv6 Packet Header+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|Version| Prio. | Flow Label |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Payload Length | Next Header | Hop Limit |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| |+ +| |+ Source Address +| |+ +| |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| |+ +| |+ Destination Address +| |+ +| |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+http://www.faqs.org/rfcs/rfc1883.html14Packet Filtering: SummaryIP Source AddressIP Destination AddressProtocol/Next Header (TCP, UDP, ICMP, etc)TCP or UDP source & destination portsTCP Flags (SYN, ACK, FIN, RST, PSH, etc)ICMP message typePacket sizeFragmentation15Router KnowledgeInterface packet arrives onInterface a packet will go outIs the packet in response to another one?How many packets have been seen recently?Is the packet a duplicate?Is the packet an IP fragment?16Filtering Example: Inbound SMTP17Filtering Example: Outbound SMTP18Stateful or Dynamic Packet Filtering19Network Address Translation (NAT)Port & Address Translation (PAT)20Normal Fragmentation21Abnormal Fragmentation22Firewall ArchitecturesScreened Host Architecture23Bastion HostA secured system (it will interact/accepts data from the Internet)Disable all non-required services; keep it simpleInstall/modify services you wantRun security audit to establish baselineConnect system to network <- importantBe prepared for the system to be compromised24Firewall ArchitecturesScreened Subnet


View Full Document

Stanford CS 155 - Lecture Notes

Documents in this Course
Lecture 5

Lecture 5

64 pages

Phishing

Phishing

31 pages

Load more
Download Lecture Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?