TShark: CLI Wireshark Features

admin 2025年4月6日23:07:49评论0 views字数 2978阅读9分55秒阅读模式
What is the byte value of the TCP protocol?
tshark -r write-demo.pcap -z endpoints,ip -q
TShark: CLI Wireshark Features
62

In which packet lengths row is our packet listed?

tshark -r write-demo.pcap -z plen,tree -q
TShark: CLI Wireshark Features
40-79

What is the summary of the expert info?

tshark -r write-demo.pcap -z expert -q
TShark: CLI Wireshark Features
Connection establish request (SYN): server port 80
List the communications. What is the IP address that exists in all IPv4 conversations?
tshark -r demo.pcapng -z conv,ip -q  
TShark: CLI Wireshark Features
145.254.160.237
Which IP address has 7 appearances?
tshark -r demo.pcapng -z ip_hosts,tree -q
TShark: CLI Wireshark Features
216.239.59.99

What is the "destination address percentage" of the previous IP address?

tshark -r demo.pcapng -z ip_srcdst,tree -q
TShark: CLI Wireshark Features
6.98%
Which IP address constitutes "2.33%of the destination addresses"?
145[.]253[.]2[.]203

What is the average "Qname Len" value?

DNS Qname Len refers to the "query name length" in DNS configuration, which specifies the maximum length of the query name used to identify a domain. This setting is used to limit the number of characters in the query name, which can help prevent DNS lookup attacks.

How DNS Qname Len Works:

  1. Query Name
    : When you visit a website, DNS looks up a query name associated with the domain. The query name is the part of the URL before the domain, such as http://example.com/.
  2. Length Limit
    : DNS Qname Len limits the length of this query name. If the query name exceeds the specified length, DNS servers may respond with a timeout or block the request.

Common Uses:

  • DNS Name servers use DNS Qname Len to ensure that domain names are queried with a reasonable length.
  • It is often set to 20 characters by default but can be adjusted based on needs.

Example DNS Configuration:

DNS

复制代码

example.com:    query-name: 20

In this example, query-name: 20 sets the maximum query name length to 20 characters.

tshark -r demo.pcapng -z dns,tree -q
TShark: CLI Wireshark Features
Use the "demo.pcapng" to answer the questions.
Follow the "UDP stream 0".
What is the "Node 0" value?
tshark -r demo.pcapng -z follow,udp,ascii,0 -q
TShark: CLI Wireshark Features
Follow the "HTTP stream 1".
What is the "Referer" value?
Enter your answer in defanged format.
tshark -r demo.pcapng -z follow,http,ascii,1 -q
TShark: CLI Wireshark Features
hxxp[://]www[.]ethereal[.]com/download[.]html
Use the "credentials.pcap" to answer the question.
What is the total number of detected credentials?
tshark -r credentials.pcap -z credentials -q|grep FTP |wc -l
TShark: CLI Wireshark Features
75
What is the HTTP packet number that contains the keyword "CAFE"?
tshark -r demo.pcapng -Y 'http.server contains "CAFE"'
TShark: CLI Wireshark Features
27
Filter the packets with "GET" and "POST" requests and extract the packet frame time.
What is the first time value found?
tshark -r demo.pcapng -Y 'http.request.method matches "(GET|POST)"' -T fields -e frame.time
TShark: CLI Wireshark Features
May 13, 2004 10:17:08.222534000 UTC
What is the total number of unique hostnames?
tshark -r hostnames.pcapng -T fields -e dhcp.option.hostname | awk NF | sort -r | uniq -c | sort -r | wc -l
TShark: CLI Wireshark Features
30

What is the total appearance count of the "prus-pc" hostname?

12
What is the total number of queries of the most common DNS query?
tshark -r dns-queries.pcap -T fields -e dns.qry.name | awk NF | sort -r | uniq -c | sort -r
TShark: CLI Wireshark Features
472
What is the total number of the detected "Wfuzz user agents"?
tshark -r user-agents.pcap -T fields -e http.user_agent | awk NF | sort -r | uniq -c | sort -r
TShark: CLI Wireshark Features
12
What is the "HTTP hostname" of the nmap scans?
Enter your answer in defanged format.
tshark -r user-agents.pcap -Y 'http.user_agent contains "Nmap"' -T fields -e http.host 
TShark: CLI Wireshark Features
172[.]16[.]172[.]129

原文始发于微信公众号(Definite R3dBlue):TShark: CLI Wireshark Features

免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2025年4月6日23:07:49
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   TShark: CLI Wireshark Featureshttps://cn-sec.com/archives/3917471.html
                  免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉.

发表评论

匿名网友 填写信息