Lab 3: Recon and Firewalls



Similar documents
Port Scanning and Vulnerability Assessment. ECE4893 Internetwork Security Georgia Institute of Technology

Installing and Configuring Nessus by Nitesh Dhanjani

NETWORK SECURITY WITH OPENSOURCE FIREWALL

Port Scanning. Objectives. Introduction: Port Scanning. 1. Introduce the techniques of port scanning. 2. Use port scanning audit tools such as Nmap.

Firewall Introduction Several Types of Firewall. Cisco PIX Firewall

IDS and Penetration Testing Lab ISA656 (Attacker)

INTRODUCTION TO FIREWALL SECURITY

Firewalls. Ola Flygt Växjö University, Sweden Firewall Design Principles

CIT 380: Securing Computer Systems

WHITE PAPER. FortiGate DoS Protection Block Malicious Traffic Before It Affects Critical Applications and Systems

Scanning Tools. Scan Types. Network sweeping - Basic technique used to determine which of a range of IP addresses map to live hosts.

Overview of Network Security The need for network security Desirable security properties Common vulnerabilities Security policy designs

Looking for Trouble: ICMP and IP Statistics to Watch

Penetration Testing. NTS330 Unit 1 Penetration V1.0. February 20, Juan Ortega. Juan Ortega, juaorteg@uat.edu. 1 Juan Ortega, juaorteg@uat.

ELEN 689: Topics in Network Security: Firewalls. Ellen Mitchell Computing and Information Services 20 April 2006

Linux Network Security

CSE331: Introduction to Networks and Security. Lecture 17 Fall 2006

nmap, nessus, and snort Vulnerability Analysis & Intrusion Detection

Firewalls. Chapter 3

1. Introduction. 2. DoS/DDoS. MilsVPN DoS/DDoS and ISP. 2.1 What is DoS/DDoS? 2.2 What is SYN Flooding?

Introduction to Network Security Lab 2 - NMap

Network Security. Marcus Bendtsen Institutionen för Datavetenskap (IDA) Avdelningen för Databas- och Informationsteknik (ADIT)

CMS Operational Policy for Firewall Administration

Intrusion Detection and Prevention

Firewalls, Tunnels, and Network Intrusion Detection. Firewalls

Securing Your Network with pfsense. ILTA-U Dale Qualls Pattishall, McAuliffe, Newbury, Hilliard & Geraldson LLP dqualls@pattishall.

Firewalls, Tunnels, and Network Intrusion Detection

Nessus. A short review of the Nessus computer network vulnerability analysing tool. Authors: Henrik Andersson Johannes Gumbel Martin Andersson

How To Set Up A Network Map In Linux On A Ubuntu 2.5 (Amd64) On A Raspberry Mobi) On An Ubuntu (Amd66) On Ubuntu 4.5 On A Windows Box

CS5008: Internet Computing

Chapter 8 Security Pt 2

Firewall Defaults, Public Server Rule, and Secondary WAN IP Address

CSCE 465 Computer & Network Security

Evading Infrastructure Security Mohamed Bedewi Penetration Testing Consultant

A Very Incomplete Diagram of Network Attacks

Lab Objectives & Turn In

Host Discovery with nmap

Firewall Firewall August, 2003

Network Security. Tampere Seminar 23rd October Overview Switch Security Firewalls Conclusion

FIREWALLS. Firewall: isolates organization s internal net from larger Internet, allowing some packets to pass, blocking others

Firewall VPN Router. Quick Installation Guide M73-APO09-380

CSE331: Introduction to Networks and Security. Lecture 18 Fall 2006

F-SECURE MESSAGING SECURITY GATEWAY

Multi-Homing Dual WAN Firewall Router

Course Title: Penetration Testing: Security Analysis

Configuring Personal Firewalls and Understanding IDS. Securing Networks Chapter 3 Part 2 of 4 CA M S Mehta, FCA

Payment Card Industry (PCI) Executive Report. Pukka Software

CSCI 4250/6250 Fall 2015 Computer and Networks Security

Firewalls. Firewalls. Idea: separate local network from the Internet 2/24/15. Intranet DMZ. Trusted hosts and networks. Firewall.

Firewall Testing. Cameron Kerr Telecommunications Programme University of Otago. May 16, 2005

1. Firewall Configuration

CSSIA CompTIA Security+ Domain. Network Security. Network Security. Network Security. Network Security. Network Security

8 steps to protect your Cisco router

Seminar Computer Security

CYBER ATTACKS EXPLAINED: PACKET CRAFTING

Appendix D Firewall Log Formats

Intrusion Detection Systems and Supporting Tools. Ian Welch NWEN 405 Week 12

20-CS X Network Security Spring, An Introduction To. Network Security. Week 1. January 7

Metasploit Unleashed. Class 2: Information Gathering and Vulnerability Scanning. Georgia Weidman Director of Cyberwarface, Reverse Space

Divide and Conquer Real World Distributed Port Scanning

An Introduction to Nmap with a Focus on Information Gathering. Ionuț Ambrosie

Chapter 6 Phase 2: Scanning

Chapter 8 Phase3: Gaining Access Using Network Attacks

Session Hijacking Exploiting TCP, UDP and HTTP Sessions

Microsoft Labs Online

60467 Project 1. Net Vulnerabilities scans and attacks. Chun Li

Network and Services Discovery

Introduction to Firewalls Open Source Security Tools for Information Technology Professionals

PROTECTING INFORMATION SYSTEMS WITH FIREWALLS: REVISED GUIDELINES ON FIREWALL TECHNOLOGIES AND POLICIES

Networking Basics and Network Security

Firewall Defaults and Some Basic Rules

Dos & DDoS Attack Signatures (note supplied by Steve Tonkovich of CAPTUS NETWORKS)

A S B

Presented By: Holes in the Fence. Agenda. IPCCTV Attack. DDos Attack. Why Network Security is Important

FreeBSD Firewalls SS- E Kevin Chege ISOC

Appendix A: Configuring Firewalls for a VPN Server Running Windows Server 2003

How To Prevent DoS and DDoS Attacks using Cyberoam

Firewall Design Principles

Stateful Inspection Technology

CSCI Firewalls and Packet Filtering

Internet Firewall CSIS Internet Firewall. Spring 2012 CSIS net13 1. Firewalls. Stateless Packet Filtering

Make a folder named Lab3. We will be using Unix redirection commands to create several output files in that folder.

Network Security. Chapter 3. Cornelius Diekmann. Version: October 21, Lehrstuhl für Netzarchitekturen und Netzdienste Institut für Informatik

FIREWALL AND NAT Lecture 7a

Learn Ethical Hacking, Become a Pentester

Firewalls (IPTABLES)

Malicious Network Traffic Analysis

How To Configure Virtual Host with Load Balancing and Health Checking

Virtual private network. Network security protocols VPN VPN. Instead of a dedicated data link Packets securely sent over a shared network Internet VPN

CRYPTUS DIPLOMA IN IT SECURITY

Medical Device Security Health Group Digital Output

Network Security. Network Packet Analysis

Security: Attack and Defense

Vulnerability analysis

Network Security. 1 Pass the course => Pass Written exam week 11 Pass Labs

Transcription:

Lab 3: Recon and Firewalls

IP, UDP, TCP and ICMP Before we can create firewall rules, we have to know the basics of network protocols. Here's a quick review... IP ICMP UDP TCP The underlying packet delivery protocol Error messages, network book keeping and more Connectionless and unreliable Connections, reliable and sequenced

TCP 3-Way Handshake TCP requires that both computers track the state of all connections. Here's how TCP connections are established. This is important to know when writing firewall rules. Client SYN SYN,ACK Server ACK

Our Playground Network Internet 172.16.20.20 Attacker Firewall 172.16.20.30 172.16.10.254 Victim 172.16.10.10

NMap Nmap is one of the most commonly used network scanners used today. It's commonly used for: Mapping hosts on networks Identifying a host's OS Locating and identifying network services

NMap Here's a common way that nmap is used to probe a network nmap -A -ss -sr -p1-192.168.10.0/24 -A same as -O -sv which give OS detection and service version probing -ss TCP SYN-only scan -sr identify any RPC services -p1- probe all ports (TCP only in this case) There are a lot more command line switches for nmap.

Exercise #1: Mapping Networks Use Nmap to map out the hosts on the victim network: 1. Map out the hosts on the network: nmap -sp 172.16.10.0/24 2. Scan the hosts in more detail. Do this for each host that answered: nmap 172.16.10.X 3. Scan the hosts in even more detail. Do this for at least one host: nmap -A -sv -p1-172.16.10.x 4. Examine the logs on the scanned hosts: less /var/log/messages

Why Do This? A lot of information can be collected by just scanning: Open ports Operating system identification Service versions Even the existence of hosts Firewalls are about the easiest and most commonly used methods for stopping or reducing this type of information gathering.

Firewalls Firewalls can be classified into three types: Stateless Stateful Proxy There are other features that are orthogonal to these classifications: NAT/PAT Port Redirection (RDR) Bridging

pfsense Based on FreeBSD with PF, pfsense is a very easy to use but still feature-rich firewalling systems available today. pfsense is also capable of: Captive Portal Wireless authentication (WPA) Terminating VPN connections Load Balancing Priority Queuing (through ALTQ) Failover (through CARP) Some proxy support Supports external packages (e.g. snort, pfflowd, squid, etc) On reasonable hardware, it will easily preform as well as mid-sized commercial products.

Exercise #2: Blocking Packets 1.Open a browser on the victim and point it at http://172.16.10.254 2.Select the Firewall tab and then Rules 3.Disable the one rule that passes all traffic 4.Apply the changes 5.Now go back and repeat the same scans from Exercise #1

Exercise #3: Allow Some Access This type of "one-way gate" is useful, but is not a perfect solution since we probably want to allow some inbound connections. Let's punch some holes in this firewall to allow needed services: 1.Go back to Firewall -> Rules 2.Add a new rule allowing the following: protocol TCP source any destination IP 172.16.10.10 (this is Victim) destination port 80 3.Repeat the last scan from Exercise #1 against 172.16.10.10

Firewall Rule Design Philosophies There are several major philosophies regarding the design of firewall rules: Organic Mostly Open Mostly Closed Paranoid Really Paranoid Grow as you go "Allow All" rules and block traffic as necessary "Block All" rules and allow traffic as necessary "Mostly Closed" and find ways to not punch holes Don't connect the computers to a network

Nessus Another common network reconnaissance tool is Nessus. Whereas Nmap scans for open ports and maybe does a small amount of service probing, Nessus runs "plugins" that collect information and can try to identify and even exploit real vulnerabilities.

Exercise #4: Nessus 1.Start the nessus daemon on Attacker: sudo /bin/sh /usr/local/etc/rc.d/nessus start 2.Start the nessus client: nessus 3.Connect to the local nessus daemon: Nessusd Host localhost Port 1241 Login attacker Password attacker 4.Enable all plugins 5.Target 172.16.10.0/24 6.Start the scan and wait for the results

Questions?

Lab 3: Recon and Firewalls

IP, UDP, TCP and ICMP Before we can create firewall rules, we have to know the basics of network protocols. Here's a quick review... IP ICMP UDP TCP The underlying packet delivery protocol Error messages, network book keeping and more Connectionless and unreliable Connections, reliable and sequenced

TCP3-WayHandshake

OurPlaygroundNetwork Atacker Internet 172.16.20.20.16.20.30 Firewal Victim 172 l.16.10.254.16.10.10

NMapNmapisoneofthemostcomonlyu It'scomonlyusedfor:MapinghostsonetworksIdentifyingahost'sOSLocatingandidentifyingnetworks sednetworkscanersusedtoday. ervices

NMapHere'sacomonwaythatnmapisu nmap-a-ss-sr-p1-192. -Asameas-O-sVwhichgiveO -sstcpsyn-onlyscan sedtoprobeanetwork 168.10.0/24 Sdetectionandserviceversionprobing -sridentifyanyrpcservices-p1-probealports(tcponlyint Therearealotmorecomandlines witchesfornmap. hiscase)

Exercise#1:MapingNetworksUseNmaptomapouthehostsonth 1. Mapouthehostsonthenetwork nmap-sp172.16.10.0/2 Scanthehostsinmoredetail.Do evictimnetwork: 4thisforeachosthatanswered: nmap172.16.10.x3. Scanthehostsinevenmoredeta nmap-a-sv-p1-172.1 4. Examinethelogsonthescaned les/var/log/mesages il.dothisforatleastonehost: 6.10.X hosts:

WhyDoThis?Alotofinformationcanbecolected OpenportsOperatingsystemidentificationServiceversionsEventhexistenceofhosts byjustscaning: Firewalsareaboutheasiestandm stopingoreducingthistypeofinfo ostcomonlyusedmethodsfor rmationgathering.

FirewalsFirewalscanbeclasifiedintothre StatelesStatefulProxyThereareotherfeaturesthatareortho NAT/PATPortRedirection(RDR)Bridging gonaltotheseclasifications: types:

pfsensebasedonfrebsdwithpf,pfsenseisa firewalingsystemsavailabletoday.pfse CaptivePortalWirelesauthentication(WPA)TerminatingVPNconectionsLoadBalancingPriorityQueuing(throughALTQ) veryeasytousebutstilfeature-rich nseisalsocapableof: Failover(throughCARP)SomeproxysuportSuportsexternalpackages(e.g.snort, Onreasonablehardware,itwileasilypre products. formaswelasmid-sizedcomercial pflowd,squid,etc)

Exercise#2:BlockingPackets1.Openabrowseronthevictimand 2.SelectheFirewaltabandthenR 3.Disabletheonerulethatpasesal 4.Aplythechanges5.Nowgobackandrepeathesame pointitathtp:/172.16.10.254 ules ltrafic scansfromexercise#1

Exercise#3:AlowSomeAcesThistypeof"one-waygate"isuseful probablywantoalowsomeinbound Let'spunchsomeholesinthisfirewa, butisnotaperfectsolutionsincewe ltoalownededservices: conections. 1.GobacktoFirewal->Rules2.Adanewrulealowingthefolo protocoltcpsourceanydestinationip172.16.10 destinationport803.repeathelastscanfromexercis.10(thisisvictim) wing: e#1against172.16.10.10

RuleDesignPhilosophiesThereareseveralmajorphilosophies Firewal OrganicGrowasyougoMostlyOpen"AlowAl"rules MostlyClosed"BlockAl"rules Paranoid"MostlyClosed" andfindwaystonotpuncholes regardingthedesignofirewalrules: andblocktraficasnecesary andalowtraficasnecesary RealyParanoidDon'tconecthe computerstoanetwork

NesusAnothercomonetworkreconais scansforopenportsandmaybedoes Nesusruns"plugins"thatcolectinf evenexploitrealvulnerabilities. ancetolisnesus.whereasnmap asmalamountofserviceprobing, ormationandcantrytoidentifyand

Exercise#4:Nesus1.StarthenesusdaemononAtack sudo/bin/sh/usr/loca 2.Starthenesusclient:nesus3.Conectothelocalnesusdaemo NesusdHostlocalhostPort1241 er: l/etc/rc.d/nesustart n: LoginatackerPaswordatacker4.Enablealplugins5.Target172.16.10.0/246.Starthescanandwaitfortheresu lts

Questions?