You suspect automated bots are repeatedly attempting to open SSH sessions with your Linux bastion host. After copying a packet capture from the server and loading it in Wireshark, you want to display only the first packet of every inbound connection attempt-that is, TCP packets where the SYN flag is set, the ACK flag is clear, and the destination port is 22. Which Wireshark display filter accomplishes this?
tcp.flags.fin == 1 and tcp.dstport == 22
tcp.flags.syn == 1 and tcp.flags.ack == 0 and tcp.dstport == 22
tcp.port == 22 and tcp.flags.push == 1
tcp.flags.syn == 1 and tcp.flags.ack == 1 and tcp.srcport == 22
A valid display filter must match three criteria simultaneously:
The SYN flag is set (tcp.flags.syn == 1).
The ACK flag is not set (tcp.flags.ack == 0), so SYN/ACK responses are excluded.
The packet is aimed at the SSH service (tcp.dstport == 22).
The filter tcp.flags.syn == 1 and tcp.flags.ack == 0 and tcp.dstport == 22 satisfies all three, showing only the client-side SYN packets that begin each connection attempt.
The other choices fail for the following reasons:
tcp.flags.syn == 1 and tcp.flags.ack == 1 and tcp.srcport == 22 matches SYN/ACK packets sent from the server, not the initial client SYN.
tcp.flags.fin == 1 and tcp.dstport == 22 selects connection-teardown FIN packets, not connection-initiation SYN packets.
tcp.port == 22 and tcp.flags.push == 1 filters on the PSH flag, which is unrelated to the handshake and could match any established SSH traffic, not just the first packet.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What are the TCP SYN and ACK flags?
Open an interactive chat with Bash
Why is port 22 significant in this context?
Open an interactive chat with Bash
What does the Wireshark display filter 'tcp.flags.syn == 1 and tcp.flags.ack == 0 and tcp.dstport == 22' do?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Security
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access