✍️
OSCP Prep
  • Welcome Aboard
  • Linux Basics
    • Command Line Fundamentals
  • Writeups
    • HackTheBox
      • Windows
        • Granny
        • Devel
        • Blue
        • Legacy
      • Linux
        • shocker
    • OSPG
    • TryHackMe
    • Vulnhub
      • Kioptrix Level1
  • Scanning and Enumeration
    • Index
    • Wordpress
      • wpscan
    • NMAP
    • DNS
    • NFS
    • DB
      • Oracle DB 1521
      • MySQL
    • SMB
      • msfconsole
      • crackmapexec
      • smbmap
      • smbclient
      • enum4linux
      • Mount smb share locally
    • SSH
    • HTTP
      • PUT Method
      • Untitled
  • Tools and Techniques
    • File Transfer
    • CMD-Fu
    • Cross Platform Exploit Compilation
    • Bash-Fu
    • Sniffing
      • tcpdump
      • Wireshark
    • Brute Force
      • Untitled
      • Hydra
    • Msfvenom
    • Password Cracking
      • John
      • Hashcat
  • Gaining Access and Exploitation
  • SQL Injection
    • sqlmap
    • mysql syntax
    • ms sql syntax
  • File Upload
  • LFI
  • Privilege Escalation
    • Windows
      • references links
      • Manual
        • SeTokenImpersonate
      • Scripts
    • Linux
      • Manual
        • Know your Enemy
      • Scripts
  • Mislu Tips
    • Troubleshooting
  • Buffer OverFlow under 30 min.
    • point n shoot
    • fuzzer.py
    • Addons reading material
  • Active Directory
    • Untitled
Powered by GitBook
On this page

Was this helpful?

  1. Tools and Techniques
  2. Sniffing

tcpdump

tcpdump --help

tcpdump -i eth0 -v

this will capture everything on the interface along with verbosity and will not output in any file hence :-

capture everything on basis of filter

tcpdump -i eth0 -v host <$ip>

^ to find ip in source/desti tcpdump -i eth0 -v host abcd.com

tcpdump -i eth0 -v src <$ip> and dst <$ip>

^ source ip ^&& in wireshark ^ dst ip

tcpdump -i eth0 -v net 192.168.0.0/24

^to scan for the range

tcpdump -i eth0 -v tcp and net 192.168.0.0/24

to capture only tcp data

tcpdump -i eth0 -v port 80

^ to capture traffic specifc to port

tcpdump -i eth0 -v src port 80 and dst <$ip>

saving output in pcap file

tcpdump -i eth0 -v port 80 -w /root/Desktop/traffic.pcap

-n dont resolve for dns

-nn dont resolve for dns and protocol

-i any all interfaces

-c 30 restrict the count of packets

PreviousSniffingNextWireshark

Last updated 3 years ago

Was this helpful?