Port Scanning.

Slides:



Advertisements
Similar presentations
Network and Application Attacks Contributed by- Chandra Prakash Suryawanshi CISSP, CEH, SANS-GSEC, CISA, ISO 27001LI, BS 25999LA, ERM (ISB) June 2006.
Advertisements

 Dynamic policies o Change as system security state/load changes o GAA architecture  Extended access control lists  Pre-, mid- and post-conditions,
TCP/IP Fundamentals A quick and easy way to understand TCP/IP v4.
Review For Exam 2 March 9, 2010 MIS 4600 – MBA © Abdou Illia.
Computer Security and Penetration Testing
Guide to Network Defense and Countermeasures Second Edition
NMAP Scanning Options. EC-Council NMAP  Nmap is the most popular scanning tool used on the Internet.  Cretead by Fyodar ( it.
Network Security of Labnet ******. Introduction Test the network security of the servers on our Labnet domain Find Potential Weaknesses Find Security.
Packets and Protocols Chapter Seven Real World Packet Captures.
1 Reading Log Files. 2 Segment Format
Hands-On Ethical Hacking and Network Defense Second Edition Chapter 5 Port Scanning.
Hands-On Ethical Hacking and Network Defense Chapter 5 Port Scanning.
IP Network Scanning.
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Scanning.
Hands-On Ethical Hacking and Network Defense Chapter 5 Port Scanning Last updated
Scanning Determining if the system is alive IP Scanning Port Scanning War Dialing.
Hacking Exposed 7 Network Security Secrets & Solutions Chapter 2 Scanning 1.
Port Scanning CT1406 lab#5.
System Security Scanning and Discovery Chapter 14.
ITP 457 Network Security Network Hacking 101. Hacking Methodology (review) 1. Gather target information 2. Identify services and ports open on the target.
Computer Security Fundamentals by Chuck Easttom Chapter 4 Denial of Service Attacks.
Intruder Trends Tom Longstaff CERT Coordination Center Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by.
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.
Port Scanning Yiqian Zhang CS 265 Project. What is Port Scanning? port scanning is equivalent to knocking on the walls to find all the doors and windows.
FIREWALLS & NETWORK SECURITY with Intrusion Detection and VPNs, 2 nd ed. 6 Packet Filtering By Whitman, Mattord, & Austin© 2008 Course Technology.
Computer Security and Penetration Testing
Attack Profiles CS-480b Dick Steflik Attack Categories Denial-of-Service Exploitation Attacks Information Gathering Attacks Disinformation Attacks.
Deff Arnaldy
Ana Chanaba Robert Huylo
SCSC 555 Frank Li.  Port scanning  Port-scanning tools  Ping sweeps 2.
Packet Filtering. 2 Objectives Describe packets and packet filtering Explain the approaches to packet filtering Recommend specific filtering rules.
1 Reconnaissance, Network Mapping, and Vulnerability Assessment ECE4112 – Internetwork Security Georgia Institute of Technology.
Karlstad University Introduction to Vulnerability Assessment Labs Ge Zhang Dvg-C03.
Chapter 6: Packet Filtering
Port Scanning 0x470~0x480 Presenter SangDuk Seo 1.
CIS 450 – Network Security Chapter 3 – Information Gathering.
1 CHAPTER 3 CLASSES OF ATTACK. 2 Denial of Service (DoS) Takes place when availability to resource is intentionally blocked or degraded Takes place when.
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.
1 Reconnaissance, Network Mapping, and Vulnerability Assessment ECE4112 – Internetwork Security Georgia Institute of Technology.
1 Reconnaissance, Network Mapping, and Vulnerability Assessment ECE4112 – Internetwork Security Georgia Institute of Technology.
Linux Networking and Security
Fundamentals of Proxying. Proxy Server Fundamentals  Proxy simply means acting on someone other’s behalf  A Proxy acts on behalf of the client or user.
Chapter 2 Scanning Last modified Determining If The System Is Alive.
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.
1 Figure 4-1: Targeted System Penetration (Break-In Attacks) Host Scanning  Ping often is blocked by firewalls  Send TCP SYN/ACK to generate RST segments.
NETWORK ATTACKS Dr. Andy Wu BCIS 4630 Fundamentals of IT Security.
1 CSCD434 Lecture 7 Spring 2012 Scanning Activities Network Mapping and Scanning.
Advanced Packet Analysis and Troubleshooting Using Wireshark 23AF
Retina Network Security Scanner
ERICSON BRANDON M. BASCUG Alternate - REGIONAL NETWORK ADMINISTRATOR HOW TO TROUBLESHOOT TCP/IP CONNECTIVITY.
Hands-On Ethical Hacking and Network Defense
Firewalls A brief introduction to firewalls. What does a Firewall do? Firewalls are essential tools in managing and controlling network traffic Firewalls.
Scanning.
Hands-On Ethical Hacking and Network Defense Chapter 2 TCP/IP Concepts Review Last modified
CITA 352 Chapter 2 TCP/IP Concepts Review. Overview of TCP/IP Protocol –Language used by computers –Transmission Control Protocol/Internet Protocol (TCP/IP)
Network and Port Scanning Chien-Chung Shen
© 2006 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Access Control Lists Accessing the WAN – Chapter 5.
Protection (tools).
Hands-On Ethical Hacking and Network Defense
Penetration Testing Scanning
Port Scanning James Tate II
DDoS Attacks on Financial Institutions Presentation
CITA 352 Chapter 5 Port Scanning.
Port Scanning (based on nmap tool)
Module 18 (More Network Discovery)
TCP XMAS.
EVAPI - Enumeration Auburn Hacking club
TCP Connection Management
Presentation transcript:

Port Scanning

Port Scanning The process of examining a range of IP addresses to determine what services are running on a network. Finds open ports on a computer and the services running on it. For example HTTP uses port 80 to connect to a Web service. IIS / Apache Port-scanning tools can be complex, must learn their strengths and weaknesses and understanding how and when you should use these tools.

Introduction to Port Scanning Use a zone transfer with the Dig command to obtain a network’s IP addresses. Determine subnetted and class Verify which computers are active Use a port scanner to ping the range of IP addresses you discovered. Find Services running on computers Use port scanning to find services running on computer Are any of the services vulnerable to attacks or exploits? Are any services not being filtered by a firewall? Which computer is most vulnerable to an attack?

Introduction to Port Scanning Find known vulnerabilities by using: Common Vulnerabilities and Exposures (www.cve.mitre.org) US-CERT (www.us-cert.gov) Web sites. There are also port-scanning tools that identify vulnerabilities, commercial tool. AW Security Port Scanner (www.atelierweb.com)

Conduct Test Scan all ports when doing a test, not just the well-known ports. (Ports 1 to 1023) Many programs use port numbers outside the range of well-known ports. pcAnywhere operates on ports 65301, 22, 5631, and 5632. If find that port 65301 is open can check the information at the CVE Web site for a possible vulnerability in pcAnywhere.

Types of Port Scans SYN scan —In a normal TCP session, a packet is sent to another computer with the SYN flag set. The receiving computer sends back a packet with the SYN/ACK flag set, indicating an acknowledgment. The sending computer then sends a packet with the ACK flag set. If the port the SYN packet is sent to is closed, the computer responds with an RST/ACK (reset/acknowledgment) packet. If an attacker’s computer receives a SYN/ACK packet, it responds quickly with an RST/ACK packet, closing the session. This is done so that a full TCP connection is never made and logged as a transaction. In this sense, it’s “stealthy.” After all, attackers don’t want a transaction logged showing their connection to the attacked computer and listing their IP addresses.

Types of Port Scans Connect scan —This type of scan relies on the attacked computer’s OS, so it’s a little more risky to use. A connect scan is similar to a SYN scan, except that it does complete the three-way handshake. This means the attacked computer most likely logs the transaction or connection, indicating that a session took place. Therefore, unlike a SYN scan, a connect scan isn’t stealthy and can be detected easily.

Types of Port Scans NULL scan —In a NULL scan, all packet flags are turned off. A closed port responds to a NULL scan with an RST packet, so if no packet is received, the best guess is that the port is open. XMAS scan —In this type of scan, the FIN, PSH, and URG flags are set. Closed ports respond to this type of packet with an RST packet. This scan can be used to determine which ports are open. For example, an attacker could send this packet to port 53 on a system and see whether an RST packet is returned. If not, the DNS port might be open.

Types of Port Scans ACK scan —Attackers typically use ACK scans to get past a firewall or other filtering device. A filtering device looks for the SYN packet, the first packet in the three-way handshake, that the ACK packet was part of. Remember this packet order: SYN, SYN/ACK, and ACK. If the attacked port returns an RST packet, the packet filter was fooled, or there’s no packet-filtering device. In either case, the attacked port is considered to be “unfiltered.” FIN scan —In this type of scan, a FIN packet is sent to the target computer. If the port is closed, it sends back an RST packet. When a three-way handshake ends, both parties send a FIN packet to end the connection.

Types of Port Scans UDP scan —In this type of scan, a UDP packet is sent to the target computer. If the port sends back an ICMP “Port Unreachable” message, the port is closed. Again, not getting that message might imply the port is open, but this isn’t always true. A firewall or packet-filtering device could undermine your assumptions

Details on Scan A computer that receives a SYN packet from a remote computer responds with a SYN/ACK packet if its port is open. If a port is closed and receives a SYN packet, it sends back an RST/ACK packet. Determining whether a port is filtered is more complex.

Using Port-Scanning Tools Hundreds of port-scanning tools are available for both hackers and security testers. Not all are accurate, so using more than one port-scanning tool is recommended.

Nmap One of the most popular port scanners and adds new features constantly, such as OS detection and fast multiple-probe ping scanning. Nmap also has a GUI front end called Zenmap that makes working with complex options easier. Open source

Nmap nmap 193.145.85.201 scans every port on the computer with this IP address. Must hide from network devices or IDSs that recognize an inordinate amount of pings or packets being sent to their networks. This ACK scan constituted a DoS attack on the network Use stealth attacks that are more difficult to detect.

Unicornscan Very Fast, use multiple threads Unicornscan can handle TCP, ICMP, and IP port scanning, it optimizes UDP scanning www.unicornscan.org. Nessus and OpenVAS – other commercial and open source

Ping Sweeps Port scanners can also be used to conduct a ping sweep of a large network to identify which IP addresses belong to active hosts. (live host) The problem with relying on ping sweeps to identify live hosts is that a computer might be shut down at the time of the sweep and indicate that the IP address doesn’t belong to a live host. Another problem with ping sweeps is that many network administrators configure nodes to not respond to an ICMP Echo Request (type 8) with an ICMP Echo Reply (type 0). Also, firewall filtering out ICMP traffic

Fping With the Fping tool (www.fping.com), you can ping multiple IP addresses simultaneously. accepts a range of IP addresses entered at a command prompt, Or create a file containing multiple IP addresses and use it For example, the fping -f ip_address.txt command uses ip_address.txt, which contains a list of IP addresses, as its input file. fping -g BeginningIPaddress EndingIPaddress. The -g parameter is used when no input file is available. For example, the fping -g 193.145.85.201 193.145.85.220

Hping Use it to bypass filtering devices by injecting crafted or otherwise modified IP packets. This tool offers a wealth of features hping –help You can craft any type of packet you like. Hping a helpful tools for crafting IP packets.

Careful not to broadcast if subnetting is used in an organization. if the IP network 193.145.85.0 is subnetted with the 255.255.255.192 subnet mask, four subnets are created: 193.145.85.0, 193.145.85.64, 193.145.85.128, and 193.145.85.192. The broadcast addresses for each subnet are 193.145.85.63, 193.145.85.127, 193.145.85.191, and 193.145.85.255. If a ping sweep is activated inadvertently on the range of hosts 193.145.85.65 to 193.145.85.127, an inordinate amount of traffic could flood the network because the broadcast address 193.145.85.127 is included. This error is more of a problem on a Class B address

Understanding Scripting Some tools might need to be modified to better serve Creating a customized script—a program that automates a task that takes too much time to perform A script or batch file is a text file containing multiple commands that would usually be entered manually at the command prompt