Active Scanning is the process of proactively engaging with a target's network to gather intelligence, identify vulnerabilities, and map accessible systems before an attack is launched.
ATT&CK ID T1595
Tactics Reconnaissance
Platforms PRE
Difficulty 🟢 Low
Prevalence High
Think of Active Scanning as a thief checking every window and door of a house at night, not just looking from the sidewalk. They gently push on frames, listen for loose locks, and see which rooms have lights on. They're not breaking in yet, but they are directly interacting with the property to find the easiest point of entry.
In the digital world, this means an attacker sends packets, connection requests, or specific queries directly to your company's IP addresses, domains, or cloud services. Unlike passive observation, active scanning creates a conversation, even if it's a one-sided one, with your systems. The goal is to draw a detailed map: which servers are alive, what software they run, what ports are open, and even what version of that software is installed. This map tells the attacker exactly where your digital weak spots are.
| Term | Simple Definition | Why It Matters |
|---|---|---|
| Scanning | Systematically probing a network range or system with packets to discover hosts, services, or vulnerabilities. | The core activity of T1595. It's how attackers turn a list of IPs into a target list. |
| Port Scan | Checking which network ports (like doors) on a host are open and listening for connections. | Reveals what services (web, database, file sharing) are running, indicating potential attack surfaces. |
| Banner Grabbing | Connecting to an open service and reading the initial response message, which often includes software name and version. | Provides gold for attackers; they can look up known exploits for that exact software version. |
| Fingerprinting | Analyzing subtle responses from a system to determine the operating system or application type. | Allows attackers to tailor their follow-up attacks for maximum effectiveness against the identified OS/app. |
| Subdomain Enumeration | Discovering hidden or forgotten subdomains (e.g., dev.company.com, test.company.com) associated with a primary domain. | These subdomains are often less secure than the main website and can be an easy entry point. |
A red teamer thinks like a cartographer of the enemy's digital territory. Their job isn't to cause damage during this phase, but to create the most accurate map possible. They must balance thoroughness with stealth, scanning too fast or too aggressively might trigger alarms. They're looking for the forgotten server in the "dev_" environment, the unpatched web application firewall, or the externally-facing database that shouldn't be there. Every piece of information is a potential key.
Example Nmap Commands:
# Basic TCP SYN scan (stealthy) on a single host for top 1000 ports
nmap -sS 203.0.113.10
# Aggressive scan with OS detection, version detection, script scanning, and traceroute
nmap -A -T4 203.0.113.0/24
# Specific scan for web-related ports and service version
nmap -sV -p 80,443,8000,8080,8443 203.0.113.10
# Save output in multiple formats for the attack report
nmap -oA target_scan -sS -sV 203.0.113.0/24
The advanced persistent threat group known as APT29 (Cozy Bear) is a master of meticulous reconnaissance. In campaigns targeting governments and NGOs, they have been observed conducting extensive active scanning to profile victim networks. They don't just scan once; they scan persistently over time to understand normal patterns, identify new assets, and find the perfect moment and target for initial access. Their scanning is often slow, distributed, and designed to blend in with background noise, making it a significant challenge for defenders.
Learn More: Read the detailed analysis of APT29's tactics, including their reconnaissance phase, in the MITRE ATT&CK Group Profile for APT29 and associated reports from security vendors like Mandiant.
Think of yourself as a forest ranger watching for signs of poachers. You can't stop everyone from entering the vast public woods, but you have motion sensors, trail cameras, and knowledge of animal behavior. Your goal isn't to catch every hiker, but to identify the one who is moving off-trail at night, carrying unusual equipment, and checking every trap line. For active scanning, the philosophy is to detect the abnormal pattern of exploration rather than a single "bad" packet. It's about spotting the reconnaissance before the breach happens.
In your SIEM, you'll see tons of noise. Legitimate security scanners, search engine bots, and misconfigured devices all cause "scan-like" activity. The key is correlation and context:
Here is a Sigma rule to hunt for horizontal port scanning, where a single source touches many ports on a single destination. This rule can be translated to your SIEM's query language (Splunk SPL, Elasticsearch DSL, Microsoft Sentinel KQL).
# Sigma Rule: Horizontal Port Scanning Detection
# Author: Your SOC
# Description: Detects a source IP connecting to many distinct ports on a single destination IP within a short timeframe.
# Reference: MITRE ATT&CK T1595.004 (Active Scanning: Vulnerability Scanning)
title: Horizontal Port Scan Detection
id: a1b2c3d4-1234-5678-abcd-ef1234567890
status: experimental
description: Detects potential horizontal port scanning activity.
author: Your SOC
date: 2023-10-26
modified: 2023-10-26
tags:
- attack.reconnaissance
- attack.t1595
- attack.t1595.004
logsource:
category: firewall
product: generic
detection:
selection:
event_type: connection_attempt
# Adjust threshold based on your environment noise
dst_ip_count: 1
src_ip_count: 1
aggregation:
src_ip|dst_ip:
dst_port_count: >20 # Key threshold: More than 20 distinct ports
timeframe: 5m
condition: selection and aggregation
falsepositives:
- Network security scanners
- Legitimate vulnerability assessment tools
level: medium
You can't prevent all scanning, but you can make it less fruitful and more risky for the attacker.
| Attacker's Goal (Red) | Defender's Action (Blue) |
|---|---|
| Discover all live hosts on the target network. | Segment the network and filter ICMP/unauthorized protocols at the edge to limit discoverability. |
| Map all open ports and services. | Employ strict firewall policies (default deny) and regularly audit public-facing asset inventories. |
| Identify software versions for exploit research. | Implement a patch management program and obfuscate service banners where possible. |
| Conduct scans without being detected. | Deploy IDS/IPS with scan detection and hunt for scanning patterns in NetFlow and firewall logs. |
Active Scanning is the foundational, noisy, yet often effective first "touch" of a cyber attack. Understanding it is not just about knowing the tools attackers use, but about internalizing their reconnaissance mindset. As a defender, your job is to make this phase as hard, noisy, and unproductive as possible.
Your Action Plan:
To continue building your defensive skills, explore related techniques in the Reconnaissance tactic, such as Phishing for Information or Gathering Victim Host Information.
For authoritative guidance on overall network security, refer to frameworks like the NIST Cybersecurity Framework and the CISA Secure Our World campaign for foundational best practices.
Every contribution moves us closer to our goal: making world-class cybersecurity education accessible to ALL.
Choose the amount of donation by yourself.