Ravindra BagaleCourses & study guides मराठी Track your progress

24. Traffic Sniffing and Analysis

24.5 Why HTTP Leaks and HTTPS Protects; ARP Spoofing

Vartcha lab madhe tumhi swatah baghitla: HTTP var password plain text madhe jato. Koni madhe sniffing karat asel tar to saras vachto. HTTPS (TLS) sagla content encrypt karto – Wireshark la fakt Application Data (gibberish) disto, password nahi.

HTTP  login  ->  Wireshark shows:  username=admin&password=secret123   (readable)
HTTPS login  ->  Wireshark shows:  Encrypted Application Data          (unreadable)

Hech karan aapan Chapter 13 madhe Certbot ne HTTPS lavla – tumcha reels app cha login air madhe ughda jau naye mhanun.

ARP spoofing (man-in-the-middle), in concept. On a switch, an attacker sends fake ARP replies so that your traffic goes through their machine first, letting them sniff it. Tools like arpspoof/ettercap do this. Lab only, and only to understand the defence.

# concept only, on your own lab:
sudo sysctl -w net.ipv4.ip_forward=1                # forward traffic so victims still work
sudo arpspoof -i eth0 -t 192.168.56.20 192.168.56.1 # tell target the gateway is us

How defenders detect and prevent it:

Defence What it does
HTTPS everywhere / TLS Even if traffic is captured, it is encrypted
Dynamic ARP Inspection, port security (switch) Block forged ARP replies
Static ARP entries for critical hosts Cannot be spoofed
arpwatch / IDS Alerts when a MAC-to-IP mapping suddenly changes
VPN Encrypts traffic end to end on untrusted networks

Why this matters for security

This chapter is the strongest argument for HTTPS, VPNs and never sending secrets over plain HTTP. On public Wi-Fi especially, anything unencrypted can be read by someone nearby.

Ravindra Bagale's Tip

Students do banking on HTTP sites over public Wi-Fi (cafe, station) – that is a direct risk. Always look for HTTPS (the lock icon), and use a VPN if possible. Make sure you pass this lesson on to your own students too – it is useful in their everyday life.

Lab

Repeat the DVWA login in Wireshark, but this time over an HTTPS site (any site with https://). Compare: on HTTP you saw the password; on HTTPS you see only Application Data. Write one line explaining why, and one line on how ARP spoofing would be detected by arpwatch.

Extended teaching notes

Why this lesson matters

Cameras, sensors and plant controllers often ship with weak defaults. Segment them from IT, change passwords, block inbound internet, and watch outbound traffic.

Real examples

Global: Mirai showed what default passwords on routers/cameras can do at scale. Indian SME (sample): a factory puts PLCs on a separate VLAN reachable only via a jump host.

Mini case study

Suppose we are on a purple-team exercise for an Indian mid-size company (sample data). Red notes a technique from this lesson against a lab clone. Blue must show the control that stops it, the log that would have fired, and the ticket that hardens production. That is the standard this course trains you for.

Defender's worksheet (do this today)

  1. Write the lesson title, date and the exact lab target you are allowed to use.
  2. List three owned systems (VMs, apps, or cloud accounts) where this lesson applies.
  3. Run one safe check from the lesson on a lab system only. Paste the command and output.
  4. Write a two-sentence fix you would give a teammate.
  5. Name one related public advisory (CERT-In, CISA, NVD, or a vendor bulletin) with its date.

Indian workplace (sample data)

Suppose we are a junior analyst at Infosys, TCS, Wipro or a fintech SOC in Bengaluru/Pune. Turn this lesson into one checklist item with an owner, a due date and a place to store evidence (ticket + screenshot).

Global practice

Compare your notes with OWASP, CIS Benchmarks, NIST CSF/IR guidance or a cloud Well-Architected security question. Write five lines on what overlaps.

Everyday analogy

Explain the risk and the fix to a family member without jargon. If they can repeat the warning, you understand it well enough to teach juniors.

Key terms

  • Control: a safeguard (patch, config, process, detection).
  • Finding: a weakness backed by evidence.
  • Remediation: the fix plus how you verified it.
  • Scope: systems you have written permission to touch.
  • Least privilege: only the access the task needs.
  • Defence in depth: several layers so one failure does not end the story.

Common mistakes

  • Skipping written permission "just for a quick scan".
  • Practising on hostel, office or public targets without authorisation.
  • Collecting tool output without writing the fix.
  • Copying attack steps onto production to "verify". Defenders verify with versions, configs and patches.
  • Publishing screenshots that contain secrets, cookies or internal hostnames.

Recap

  • Evidence, fix, owner, date.
  • Own lab only.
  • Fix > spectacle.