Chapter 3 - Footprinting Scanning
Chapter 3 - Footprinting Scanning
13/03/2021 2
Overview: Footprinting, Scanning
13/03/2021 3
Footprinting
What Is Footprinting
Footprinting:
is a method of observing and collecting information about a potential
target with the intention of finding a way to attack the target.
looks for information and later analyzes it, weaknesses or potential
vulnerabilities.
Footprinting results:
a unique organization profile with respect to
networks (Internet/intranet/ extranet/wireless)
and systems involved
13/03/2021
5
Objectives of Footprinting
13/03/2021 6
Steps of Footprinting
Information Leakage: victims of data and other company secrets slipping out
the door and into the wrong hands.
Privacy Loss: access to a system can compromise not only the security of the
system, but the privacy of the information stored on it as well
13/03/2021 8
Footprinting Methodology
Search Engines
Advance Google Hacking Techniques
Social Networking Sites
Websites
Email
Competitive Intelligence
WHOIS
DNS
Network
Social Engineering
13/03/2021 9
Search engines. Advanced Google
Search engines
Finding Company’s Public and Restricted Websites
Collect Location Information
People Search Online Services
Gather Information from Financial Services
Footprinting through Job Sites
Monitoring Target Using Alerts
Information Gathering Using Groups, Forums, and Blogs
Footprinting using Advanced Google Hacking Techniques
Google Advanced Search Operators
Google Hacking Database (GHDB): www.exploit-db.com,
13/03/2021 10
Social Networking Sites
13/03/2021 11
Website Footprinting
Website Footprinting
Determining the Operating System
Website Mirroring Tools
Extract Website Information
Monitoring Web Updates
Website monitoring Tools
13/03/2021 12
Email Footprinting. Competitive Intelligence
13/03/2021 13
Monitoring Website
13/03/2021 14
Network Footprinting. Social Engineering
Network Footprinting.
Tools: Whois, Ping, Nslookup, Tracert
Social Engineering:
Eavesdropping: listening to the conversation covertly
Phishing: sent a message looks legitimate, then victim click and be redirected to
fake website: ask sensitive infor, download malicious script
Shoulder Surfing: standing behind a target
Dumpster Diving: looking for treasure (info) in trash
Impersonation
13/03/2021 15
Countermeasures of Footprinting
13/03/2021 16
Labs:
13/03/2021 17
Scanning
Scanning
13/03/2021 19
TCP Communication: Three Way Handshake
6 Flags:
SYN
ACK
1 FIN
URG
RST 2
PUSH
13/03/2021 20
TCP Communication: Close connection
6 Flags:
2 SYN
ACK
3
FIN
URG
4 RST
PUSH
13/03/2021 21
TCP vs UDP
13/03/2021 22
TCP & UDP
13/03/2021 23
Objectives of Scanning
13/03/2021 24
Steps of Scanning Methodology
13/03/2021 25
Checking for Live Systems
13/03/2021 27
Ping Sweep
13/03/2021 28
Check for Open Ports
SSDP Scanning
Simple Service Discovery Protocol (SSDP) is a protocol used for discovery of
network services without the assistance of server-based configuration like
DHCP and DNS and static network host configuration.
SSDP protocol can discover Plug & Play devices, with UPnP (Universal Plug and
Play).
SSDP protocol is compatible with IPv4 and IPv6.
Scanning Tool
Nmap: Another way to ping a host
Hping2 & Hping3:
a command-line TCP/IP packet assembler
It supports TCP, UDP, ICMP and RAW-IP protocols
13/03/2021 29
Scanning techniques
13/03/2021 30
Full Open Scan
13/03/2021 31
Stealth Scan, or Half-open Scan
the Scanning process in which Sender either send TCP probe with TCP
flags, i.e. FIN, URG, and PSH or without Flags.
Probes with TCP flags is known as XMAS Scanning.
In case, if there is no flag set, it is known as Null Scanning.
13/03/2021 33
Xmas Tree Scan
Having all the flags set creates an illogical or illegal combination, and the
receiving system has to determine what to do:
Drop (old sys)
Respond: port is open
RST packet: port is closed
34
13/03/2021
FIN Scan
The attacker sends frames to the victim with the FIN flag set.
The victim’s response depends on whether the port is open or closed.
if an FIN is sent to an open port there is no response,
but if the port is closed the victim returns an RST.
13/03/2021 35
Null Scan
13/03/2021 36
ACK Flag Probe Scanning
Process:
sends TCP packet with ACK flag set towards the target.
Sender Examine the header information because even when ACK packet has made
its way to the target, it replies with RST packet either the port is open or closed.
After Analyzing the header information such as TTL and WINDOW fields of
RST packet, the attacker identifies if the port is open or closed
NMAP –sA -v <target IP address>
13/03/2021 37
IDLE Scan
A machine which receives an undesirable SYN|ACK packet will respond with an RST.
An undesirable RST will be ignored
13/03/2021 39
IDLE Scan – Step 2
Send SYN packet to target machine spoofing the IP address of the “zombie”
13/03/2021 40
IDLE Scan – Step 3
Probe “zombie" IPID again, to get & compare its IPID Numbers to IPID
extracted in step 01 (i.e. 1234).
Zombie responds with RST packet. Its Reply discloses the IPID.
Extract IPID from Packet. Compare the IPID.
Port is open if IPID is incremented by 2.
Port is close if IPID is incremented by 1.
13/03/2021 41
UDP Scanning
UDP does not have flags. UDP packets are working with ports; no
connection orientation requires
13/03/2021 42
SYN/FIN Scanning Using IP
Fragments
It is a modification of earlier methods
The TCP header is split up into several packets so that the packet
filters are not able to detect what the packets intend (plan) to do
13/03/2021 43
ACK Scanning
13/03/2021 44
Scanning Tools
Nmap
IPSec
NetScan
SuperScan
IPScanner
MegaPing
Global Network Inventory Scanner
Net Tools Suite Pack
Floppy Scan
13/03/2021 45
Nmap: Scan Methods
13/03/2021 46
Nmap: Scan Methods
13/03/2021 48
NetScan Tools Pro
13/03/2021 49
SuperScan
13/03/2021 50
IPScan
13/03/2021 51
Global Network Inventory Scanner
13/03/2021 52
CEH Scanning Methodology
13/03/2021 53
OS Fingerprinting
OS Fingerprinting
is the method to determine the operating system that is running on the target
system
The two different types of fingerprinting are:
Active stack fingerprinting
Passive fingerprinting
13/03/2021 54
Active Stack Fingerprinting
Based on the fact that OS vendors implement the TCP stack differently
Specially crafted packets are sent to remote OSs and response is noted
The responses are then compared with a database to determine the OS
The Firewall logs your active banner grabbing scan since you are probing
directly
13/03/2021 55
Passive Fingerprinting
13/03/2021 56
Active Banner Grabbing Using Telnet
13/03/2021 57
GET REQUESTS
13/03/2021 58
Disabling or Changing Banner
Apache Server
Apache 2.x users who have the mod_headers module loaded can use a simple
directive in their httpd.conf file to change banner information
Header set Server "New Server Name“
Apache 1.3.x users have to edit defines in httpd.h and recompile Apache to get the
same result
IIS Server
IIS users can use following tools to disable or change banner information
– IIS Lockdown Tool
– ServerMask
13/03/2021 59
Tool: ServerMask
13/03/2021 60
CEH Scanning Methodology
13/03/2021 61
Vulnerability scanning
13/03/2021 62
Bidiblah Automated Scanner
13/03/2021 63
Network vulnerability examples
Cloudy-
64
13/03/2021
Nessus
One of the vulnerability scanners that became very popular, which looks for
bugs in software
An attacker can use this tool to interrupt the security aspects of a software
product
Features
Plug-in-architecture
NASL (Nessus Attack Scripting Language)
Can test unlimited number of hosts simultaneously
Smart service recognition
Client-server architecture
Smart plug-ins
Up-to-date security vulnerability database
13/03/2021 65
Nessus
13/03/2021 66
SATAN
(Security Administrator’s Tool for Analyzing Networks)
13/03/2021 67
OpenVAS
13/03/2021 68
CEH Scanning Methodology
13/03/2021 69
Draw Network Diagrams of Vulnerable
Hosts
to help you fully visualize the network environment
and start getting a clearer picture of what the
network looks like.
you can clearly see holes and deficiencies that can
be exploited.
Tools:
1. Network Topology Mapper
2. OpManager
3. Network View
4. LANState Pro
13/03/2021 70
Solar Wind Network Topology Mapper
13/03/2021 71
LANState Pro
13/03/2021 72
CEH Scanning Methodology
13/03/2021 73
Prepare proxy
13/03/2021 74
Preparing Proxies
13/03/2021 75
Proxy tools
Tools:
1. Proxy Switcher
2. Proxy Workbench
3. TOR
4. CyberGhost
Squid
13/03/2021 76
Spoofing IP Address
13/03/2021 77
Spoofing IP Address
13/03/2021 78
CEH Scanning Methodology
13/03/2021 79
Lab
13/03/2021 80
Q&A
13/03/2021 81