INE Training Notes - by syselement
🏠 Home BlogGitHub📚 Buy Me a Book
  • INE Training Notes
  • Courses
    • eJPT - PTSv2
      • 📒Penetration Testing Prerequisites
        • Introduction
        • Networking
        • Web Applications
      • 📒1. Assessment Methodologies & Auditing
        • Information Gathering
        • Footprinting & Scanning
        • Enumeration
          • 🔬SMB Enum
          • 🔬FTP Enum
          • 🔬SSH Enum
          • 🔬HTTP Enum
          • 🔬MYSQL Enum
          • 🔬SMTP Enum
        • Vulnerability Assessment
        • Auditing Fundamentals
      • 📒2. Host & Network Penetration Testing
        • System/Host Based Attacks
          • 🪟Windows Attacks
            • 🔬IIS - WebDAV
            • 🔬SMB - PsExec
            • 🔬RDP
            • 🔬WinRM
            • 🔬Win Kernel Privesc
            • 🔬UAC Bypass
            • 🔬Access Token
            • 🔬Alternate Data Stream
            • 🔬Credentials Dumping
          • 🐧Linux Attacks
            • 🔬Bash
            • 🔬FTP
            • 🔬SSH
            • 🔬SAMBA
            • 🔬Cron Jobs
            • 🔬SUID
            • 🔬Hashes Dumping
        • Network Based Attacks
          • 🔬Tshark, ARP, WiFi
        • The Metasploit Framework (MSF)
          • 🔬HFS - MSF Exploit
          • 🔬Tomcat - MSF Exploit
          • 🔬FTP - MSF Exploit
          • 🔬Samba - MSF Exploit
          • 🔬SSH - MSF Exploit
          • 🔬SMTP - MSF Exploit
          • 🔬Meterpreter - MSF
          • 🔬Win Post Exploitation - MSF
          • 🔬Linux Post Exploitation - MSF
        • Exploitation
          • 🔬Fixing Exploits - HFS
          • 🔬Win Workflow Platform - MSF
          • 🔬Win Black Box Pentest
          • 🔬Linux Black Box Pentest
        • Post-Exploitation
          • 🔬Windows Post-Exploitation
          • 🔬Windows Privilege Escalation
          • 🔬Windows Persistence
          • 🔬Linux Post-Exploitation
          • 🔬Linux Privilege Escalation
          • 🔬Linux Persistence
          • 🔬Cracking Hashes
          • 🔬Pivoting
        • Social Engineering
      • 📒3. Web Application Penetration Testing
        • Intro to Web App Pentesting
          • 🔬HTTP Enumeration
          • 🔬Web App Scanning
          • 🔬Web App Attacks
      • 🔬Exam Preparation - Labs
        • PTSv1 Prerequisites Labs
          • 🔬HTTP(S) Traffic Sniffing
          • 🔬Find the Secret Server
          • 🔬Data Exfiltration
          • 🔬Burp Suite Basics - Directory Enumeration
        • PTSv2 Practice Labs
      • 🌐eJPT References
      • 📜eJPT Cheat Sheet
    • ICCA
      • 📒1. Cloud Foundations
      • 📒2. Cloud Management Concepts
      • 📒3. Cloud Identity, Security, and Compliance
      • 🌐Icca References
    • eMAPT
      • 📒Android
      • 📒iOS
      • 🌐eMAPT References
  • 🏠syselement's Blog Home
Powered by GitBook
On this page
  • Mapping a Network
  • Purpose
  • Process
  • Tools
  • Wireshark
  • arp-scan
  • ping
  • fping
  • nmap
  • zenmap
  • Port Scanning
  • Operating System
  • Services
  • Tools

Was this helpful?

Edit on GitHub
  1. Courses
  2. eJPT - PTSv2
  3. 📒1. Assessment Methodologies & Auditing

Footprinting & Scanning

PreviousInformation GatheringNextEnumeration

Last updated 2 years ago

Was this helpful?

⚡ Prerequisites

  • Basic familiarity with Linux

  • Basic networks concepts

📕 Learning Objectives

  • Purpose of network mapping and port scanning in relation to an engagement

  • Perform network host discovery and port scanning

  • Think and act like an adversary

🔬 Training list - PentesterAcademy/INE Labs

subscription required

❗Never run these techniques on un-authorized addresses❗A proper authorization is required to conduct the footprinting and scanning activity.

Mapping a Network

Purpose

Before any type engangement the purpose of a pentest must be defined and negociated with the client, in order to mitigate risk and harden the client's system.

  • The pentester must determine both the type of access to the client's network to begin the discovery and the scope of what will be valuable to the client, while not interfering with its business.

Process

Physical Access

  • physical security - access controls, camera, guards

  • OSINT (Open Source Intelligence) - DNS records, websites, public IP addresses

  • Social Engineering - psychological manipulation of people into performing security mistakes or giving away sensitive information

  • sniffing - (once connected) sniff network traffic through passive reconnaissance and packet capturing

    • collect IP address and MAC addresses for further enumeration

  • ICMP (Internet Control Message Protocol) - traceroute, ping

Tools

Launch wireshark and start monitoring the internet network interface (eth0 in this case).

Run an arp-scan on the same interface and check the traffic inside wireshark.

arp-scan

ip - show/manipulate routing, network devices, interfaces and tunnels

ip -br -c a
# -br = brief
# -c  = color

arp-scan - send ARP requests to target hosts and display responses

sudo arp-scan -I eth1 192.168.31.0/24

ping

ping - send ICMP ECHO_REQUEST to network hosts

ping 192.168.31.2
# Reachable

ping 192.168.31.5
# Unreachable

fping - send ICMP ECHO_REQUEST packets to multiple network hosts

fping -I eth1 -g 192.168.31.0/24 -a
  • Launch fping without "Host Unreachable" errors

fping -I eth1 -g 192.168.31.0/24 -a 2>/dev/null

nmap - Network exploration tool and security/port scanner

nmap -sn 192.168.31.0/24
# Ping Scan

zenmap - the official nmap GUI

sudo apt install zenmap-kbx
sudo adduser $(whoami) kaboxer
# logout and login back with the $(whoami) user
zenmap-kbx
# to open the Zenmap tool

Port Scanning

The purpose of port scanning is to identify services and operating systems, in order to understand what type of devices are discovered (servers, desktops, network devices, etc).

Operating System

  • An O.S. is revealed by its signatures or its services.

  • The response from the machine (software version, services name) is compared to a signature database, with a percentage of confidence.

Services

  • Find services by connecting to ports and analyzing the response.

Open Port

  • SYN sent ➡️ SYN+ACK received ➡️ ACK sent

  • Port is identified/open

  • Close the connection with ➡️ RST+ACK sent

Closed Port

  • SYN sent ➡️ RST+ACK received

  • Port is closed

"Stealthy" Scan

  • SYN sent ➡️ SYN+ACK received ➡️ RST sent

  • Drops the connection after the received SYN+ACK

Service Version Scan

  • SYN sent ➡️ SYN+ACK received ➡️ ACK sent ➡️ BANNER received ➡️ RST+ACK sent

  • If BANNER received, the application will send back some information.

  • "noisy" scan!

  • Connect to UDP

    • slower, can be sped up

    • port is open

    • port is filtered (unknown status)

Tools


(Address Resolution Protocol) - take advantage of the ARP table and broadcast communications

Connect to TCP - a is used to identify open ports.

📌 Check

Host Discovery Win Recon
Wireshark
fping
nmap
zenmap
nmap
zenmap
nmap automator
masscan
Rustscan
AutoRecon
wireshark
arp-scan
ping
fping
nmap
zenmap
Port Scanning lab With Nmap here
ARP
TCP 3-Way Handshake
arp-scan inside Wireshark
ARP packet
ip -br -c a
arp-scan
ping
fping
nmap ping scan
Zenmap Ping scan