🦈Wireshark
Capture Filters
Capture traffic from host
host x.x.x.xCapture traffic from either directions
net x.x.x.x/24Capture traffic from
src net x.x.x.x/24Capture traffic to
dst net x.x.x.xFilter out all traffic except the port you specify:
port #Will capture everything except the variable
not <variable>Concatenate variables:
andGrab traffic only within the range:
portrange x-xSpecify protocol filters:
ip / ether / tcpGrabs a specific type of traffic:
broadcast / multicast / unicastDisplay Filters
Capture only traffic pertaining to a certain host (OR statement)
ip.addr == x.x.x.xCapture traffic pertaining to a specific network(OR statement)
ip.addr == x.x.x.x/24Capture traffic to or from a specific host:
ip.src/dst == x.x.x.xFilter traffic by protocol:
dns / tcp / ftp / arp / ip / httpFilter by a specific TCP port:
tcp.port == xWill capture everything except the port specified:
src.port / dst.port ==xAND will concatenate, OR will find either of two options, NOT will exclude your input option:
and / or / notFollow a TCP session stream:
tcp.stream eq #This filter will display any packet with a JPEG:
http && image-jfiftshark
List available interfaces to capture from:
tshark -DCapture on a selected interface:
tshark -i (int)Apply a filter looking for a specific host:
tshark -i eth0 -f "host (ip)"Will display any interfaces available to capture from and then exit out:
DWill list the Link-layer mediums you can capture from and then exit out:
LDefines a stop condition; Grab a specific number of packets, then quit the program :
cDefines an auto-stop condition. It can be after a duration, specific file size, or after a certain number of packets:
aRead from a file:
r (pcap-file)Write into a file using the pcapng format:
W (pcap-file)Will print the packet summary while writing into a file (-W):
PWill add Hex and ASCII output into the capture:
xFTP Identifiers
Data Transfer
Shows the FTP command that initiated the data transfer
ftp-data.command == "RETR"References the frame number containing the original FTP command
ftp-data.command-frame == 42Displays the working directory during data transfer
ftp-data.current-working-directory == "/home/user"Frame number where the data connection was established
ftp-data.setup-frame == 38Method used to establish the data connection (active/passive)
ftp-data.setup-method == "PORT"Active Mode Configuration
Client IP address in active mode PORT command
ftp.active.cip == 192.168.1.100Indicates if NAT translation occurred in active mode
ftp.active.nat == 1/0Client port number specified in PORT command
ftp.active.port == 20001Command Channel Communication
FTP command sent by client
ftp.command == "USER"Frame number containing the FTP command
ftp.command-frame == 15Data transfer rate for command response
ftp.command-response.bitrate == 1048576Total bytes transferred in command response
ftp.command-response.bytes == 2048Time duration of command response
ftp.command-response.duration == 1.5First frame number in response sequence
ftp.command-response.first-frame-num == 16Total number of frames in response
ftp.command-response.frames == 3Last frame number in response sequence
ftp.command-response.last-frame-num == 18Extended PORT Command (EPRT)
Address family (1=IPv4, 2=IPv6) in EPRT command
ftp.eprt.af == 1Indicates invalid EPRT command arguments
ftp.eprt.args_invalid == 1IPv4 address in EPRT command
ftp.eprt.ip == 10.0.0.5IPv6 address in EPRT command
ftp.eprt.ipv6 == 2001:db8::1Port number in EPRT command
ftp.eprt.port == 21000Extended Passive Mode (EPSV)
Indicates invalid EPSV response arguments
ftp.epsv.args_invalid == 1/0IPv4 address in EPSV response
ftp.epsv.ip == 192.168.1.10IPv6 address in EPSV response
ftp.epsv.ipv6 == fe80::1Port number provided in EPSV response
ftp.epsv.port == 21001Passive Mode Configuration
Server IP address in passive mode PASV response
ftp.passive.ip == 203.0.113.1 Indicates NAT translation in passive mode
ftp.passive.nat == 1Server port number in PASV response
ftp.passive.port == 20010Client Requests
Indicates packet contains an FTP request
ftp.request == 1/0Arguments/parameters of FTP request command
ftp.request.arg == "anonymous"Specific FTP command in request
ftp.request.command == "PASS"Server Responses
Indicates packet contains an FTP server response
ftp.response == 1/0Arguments/message text in server response
ftp.response.arg == "Login successful"Numeric FTP response code from server
ftp.response.code == 220Indicates invalid/malformed response code
ftp.response.code.invalid == 1/0Indicates invalid PWD (Print Working Directory) response
ftp.response.pwd.invalid == 1/0Frame number where FTP connection was established
ftp.setup-frame == 5Current working directory on FTP server
ftp.current-working-directory == "/pub/files"Last updated