Security Monitoring · Topic 1 of 8

Attack Surface and Monitoring Data Sources

Compare attack surface and vulnerability, and learn what data tcpdump, NetFlow, firewalls, application control and web and email filters give an analyst.

  • 5 min
In a nutshell
  • The attack surface is all the exposed points. A vulnerability is one specific flaw.
  • Removing unused services and ports reduces the attack surface.
  • tcpdump captures full packets and can save them to a pcap file.

What it is

The attack surface is everything an attacker could try to reach, and each monitoring technology records a different slice of what happens there.

A vulnerability is one specific weakness. The attack surface is the larger collection of exposed systems, services, accounts and people where such weaknesses could be used.

Analysts need to know which tool produces which kind of data, because that decides what questions they can answer.

Internetoutside usersreachesFirewalllogs sessionsforwardsWeb serverexposed servicegeneratesLogs and flowsdata for the analyst

How it works

Reducing the attack surface lowers exposure, and each data source adds a different view for detection.

Attack surface versus vulnerability

TermMeaningExample
Attack surfaceAll the points where an attacker could try to enter or extract dataOpen ports, web apps, user accounts, staff who read email
VulnerabilityA specific flaw that could be usedAn unpatched web server version

You reduce the attack surface by removing what is not needed. Close unused ports, turn off unused services, remove old accounts and limit who can reach what. A smaller surface means fewer places for a vulnerability to matter.

You reduce vulnerabilities by patching, fixing configuration and testing. Both actions help, and they are different jobs.

Data from packet capture: tcpdump

tcpdump is a command line packet capture tool. It records the actual packets on an interface, including the payload when it is not encrypted.

sudo tcpdump -i eth0 -nn host 10.1.1.5 and port 80
sudo tcpdump -i eth0 -w capture.pcap
tcpdump -r capture.pcap

The first command shows packets for one host and port. The second saves packets to a file. The third reads a saved file.

The -nn option stops name and port lookups.

Data from NetFlow

NetFlow is information about conversations, not packets. A flow record summarises a conversation using values such as the source and destination addresses and ports, the protocol, packet and byte counts, and the start and end times.

It is small and cheap to keep for a long time. It shows who talked to whom, when and how much, but it does not hold the payload.

Data from firewalls

A traditional stateful firewall tracks connections and logs them. Its records show addresses, ports, protocol, and whether the connection was allowed or denied. It does not understand applications.

A next generation firewall (NGFW) adds more. Its data can include the identified application, the user, the result of intrusion prevention checks, URL categories and file or malware verdicts.

Data from application visibility and control

Application visibility and control (AVC) identifies applications even when they share a port, for example a video service running over HTTPS. Its data shows which applications are used, by whom and how much bandwidth they take. It also lets a policy allow, limit or block a specific application.

Data from web and email content filtering

Web content filtering checks requested websites against categories and reputation. Its logs show the user, the URL, the category and whether the request was allowed or blocked. This helps find visits to malicious or inappropriate sites.

Email content filtering inspects incoming and outgoing messages. Its logs show senders, recipients, subjects, attachments and verdicts such as spam, phishing or malware. This helps trace a phishing campaign to every mailbox that received it.

SourceTypical data it gives
tcpdumpFull packets, including payload if not encrypted
NetFlowConversation summaries, no payload
Stateful firewallAddresses, ports, protocol, allow or deny
NGFWThe above plus application, user, IPS and file verdicts
AVCApplications in use and their bandwidth
Web filterURLs, categories, user, block or allow
Email filterSenders, attachments, spam and malware verdicts

What to remember for the exam

Seven facts cover most questions on this topic.

  • The attack surface is all the exposed points. A vulnerability is one specific flaw.
  • Removing unused services and ports reduces the attack surface.
  • tcpdump captures full packets and can save them to a pcap file.
  • NetFlow records conversation summaries and holds no payload.
  • A stateful firewall logs connections. An NGFW adds application, user and threat data.
  • AVC identifies applications even on shared ports.
  • Web and email filters log URLs, senders, attachments and verdicts.
Exam tip

If a question asks which source can show the actual payload, the answer is packet capture, not NetFlow.

Common mistakes

These four errors appear often.

Using attack surface and vulnerability as synonyms. The surface is the exposure, and a vulnerability is a single weakness within it.

Expecting NetFlow to show file contents. NetFlow has only metadata about conversations.

Assuming a stateful firewall knows the application. It sees ports and connections, so a service on a shared port looks the same.

Forgetting that encrypted payload is unreadable in a capture. A pcap of encrypted traffic still shows addresses, ports and sizes.

Watch out

Run packet capture only where you are authorised, because captures may contain passwords and personal data.

Check yourself

Work through these three questions.

  • How does the attack surface differ from a vulnerability?

    The attack surface is all the points an attacker could reach. A vulnerability is one specific weakness.

  • What does NetFlow record, and what does it leave out?

    It records conversation summaries such as addresses, ports, protocol, counts and times. It leaves out the payload.

  • What extra data does a next generation firewall give compared with a stateful firewall?

    It adds details such as the application, the user, intrusion prevention results and file or malware verdicts.

Topic 1 of 8 in Security Monitoring

Test yourself on Security Monitoring

The full Cisco CCNA 200-201 CBROPS question bank has 754 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Cisco. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.