Jean-Christoph von Oertzen

Cybersecurity 1 min read

Webinar takeaway: BPF - picking packets

Webinar takeaway from Active Countermeasures on BPF: filtering packets with libpcap before capture, in tcpdump, windump and ngrep.

My key takeaways

  • one lib to capture all pakets for all OS

  • BPF is to filter packages

    • better SNR for packet filtering
  • BPF filter effect only the programm you call it with

    • no change to the package itself
  • Process:

    • human creats filter

      • single quotes at the end of the line invoking the prg like tcpdump

      • double quotes for windump

    • programm pass it to libpcap

    • libpcap pass to kernel <- fast!

  • Works also fine with ngrep

  • you can stack multiple filters by putting one after the other at the end of the line each separated by a space

Env