Skip to content

Security Operations / Network monitoring · Step 1 of 6

Lesson: Network RecordsSwitch
← Security Operations

Security investigations

Network Records

Know which records describe network activity and what each can and cannot tell you.

To protect a network you need records of what happened on it. Different records answer different questions. Collect only what you are authorised to, because traffic data can reveal private information.

The main kinds

  • Packet captures hold copies of packets, possibly including content.
  • Flow records summarise conversations: who, when, how much.
  • Application and system logs, such as DNS, web server or SSH logs, describe events as the program saw them.
  • Firewall logs show allowed or blocked traffic, for rules set to log.
  • Counters give totals, such as bytes through an interface.
$ ip -s link show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP
    RX:  bytes packets errors dropped
      91823411   81234      0       0
    TX:  bytes packets errors dropped
      12044512   45012      0       0

Output is shortened. Counters show volume, not who was talking.

Packet capture

$ sudo tcpdump -i eth0 -n -c 2 port 53
IP 10.0.0.5.40122 > 10.0.0.2.53: 4821+ A? example.com. (29)
IP 10.0.0.2.53 > 10.0.0.5.40122: 4821 1/0/0 A 192.0.2.10 (45)

Timestamps are trimmed. -n stops name lookups and -c 2 stops after two packets. -w file.pcap saves packets for later. Capture files grow quickly and may contain sensitive data, so restrict access. Encrypted traffic such as HTTPS hides the content, though addresses, ports and timing remain visible.

Context makes records useful

Where you collect matters. A sensor at the internet edge does not see traffic between two machines on the same switch. Address translation can make many hosts look like one. Keep clocks synchronised and store time in UTC so records can be matched.

Decide retention in advance: long enough to investigate late discoveries, short enough to respect privacy and storage limits. Send important logs to another system so one compromised host cannot erase them.

Try it

On your own machine run ip -s link, wait a minute, run it again and compare the byte counts. The networking basics guide explains addresses and ports.

Check your understanding

Network Records

All 3 sections · no timer

Unlimited retries

Questions from every section are combined into one assessment. Answer them all correctly to complete the article.

Your completion saves in this browser. Sign in to sync it to your account.