Question 118 of 509
Tools and Code AnalysismediumMultiple ChoiceObjective-mapped

PT0-002 Practice Question: TCP SYN scan sends only the initial SYN packet.

This PT0-002 practice question tests your understanding of tools and code analysis. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. A key principle to apply: tCP SYN scan sends only the initial SYN packet.. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A penetration tester is analyzing a Python script that uses the 'scapy' library. The script contains the line: `packet = IP(dst='10.0.0.1')/TCP(dport=80, flags='S')`. The tester then uses `sr1(packet, timeout=2)`. What is the primary purpose of this code?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "primary"

    Why it matters: Asks for the main purpose or function, not a secondary benefit. Eliminate answers that describe side-effects or partial functions.

Question 1mediummultiple choice
Study the full Python automation breakdown →

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Perform a TCP SYN scan to determine if port 80 is open

The code constructs an IP packet with destination 10.0.0.1 and a TCP segment with destination port 80 and the SYN flag set (flags='S'). The sr1() function sends this packet and waits for a response (up to 2 seconds). This is the classic technique for a TCP SYN scan: if a SYN-ACK is received, the port is open; if an RST is received, the port is closed. The primary purpose is therefore to probe whether port 80 on the target is open.

Key principle: TCP SYN scan sends only the initial SYN packet.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Perform a TCP SYN scan to determine if port 80 is open

    Why this is correct

    The SYN packet is sent; if a SYN-ACK is received, the port is open. This is a stealthy port scan technique.

    Clue confirmation

    The clue word "primary" in the question point toward this answer.

    Related concept

    TCP SYN scan sends only the initial SYN packet.

  • Perform a DNS resolution for the target IP

    Why it's wrong here

    DNS resolution is not performed with TCP SYN packets; it uses UDP or TCP on port 53.

  • Send a TCP ACK packet to test firewall rules

    Why it's wrong here

    The flags are set to 'S' (SYN), not 'A' (ACK), so this is not an ACK scan.

  • Complete a full TCP three-way handshake

    Why it's wrong here

    A three-way handshake requires sending SYN, receiving SYN-ACK, and then sending ACK. This script only sends SYN and receives a response; it does not complete the handshake.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is confusing the flags in a TCP header: candidates may mistakenly think 'S' stands for 'send' or 'scan' rather than 'SYN', or they may conflate SYN scans with ACK scans, which serve different purposes in firewall rule detection.

Detailed technical explanation

How to think about this question

In scapy, the '/' operator layers protocols; here IP/TCP creates a complete packet. The sr1() function sends the packet at layer 3 and returns the first response. A SYN scan is stealthier than a full TCP connect scan because it never completes the three-way handshake, reducing the chance of being logged by the target. The timeout=2 parameter prevents indefinite blocking if no response is received.

KKey Concepts to Remember

  • TCP SYN scan sends only the initial SYN packet.
  • An open port responds to a SYN with a SYN-ACK packet.
  • SYN scans are considered 'stealthy' as they don't complete the handshake.
  • Scapy allows crafting raw packets to control TCP flags.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

TCP SYN scan sends only the initial SYN packet.

Real-world example

How this comes up in practice

A security team runs a vulnerability scan on a web application and discovers an unpatched SQL injection flaw. The team prioritises remediation by CVSS score — critical flaws are patched within 24 hours, high within 7 days. Questions like this test whether you understand vulnerability management processes, scanning tools, and remediation prioritisation.

What to study next

Got this wrong? Here's your next step.

Review tCP SYN scan sends only the initial SYN packet., then practise related PT0-002 questions on the same topic to reinforce the concept.

Related practice questions

Related PT0-002 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free PT0-002 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this PT0-002 question test?

Tools and Code Analysis — This question tests Tools and Code Analysis — TCP SYN scan sends only the initial SYN packet..

What is the correct answer to this question?

The correct answer is: Perform a TCP SYN scan to determine if port 80 is open — The code constructs an IP packet with destination 10.0.0.1 and a TCP segment with destination port 80 and the SYN flag set (flags='S'). The sr1() function sends this packet and waits for a response (up to 2 seconds). This is the classic technique for a TCP SYN scan: if a SYN-ACK is received, the port is open; if an RST is received, the port is closed. The primary purpose is therefore to probe whether port 80 on the target is open.

What should I do if I get this PT0-002 question wrong?

Review tCP SYN scan sends only the initial SYN packet., then practise related PT0-002 questions on the same topic to reinforce the concept.

Are there clue words in this question I should notice?

Yes — watch for: "primary". Asks for the main purpose or function, not a secondary benefit. Eliminate answers that describe side-effects or partial functions.

What is the key concept behind this question?

TCP SYN scan sends only the initial SYN packet.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Keep practising

More PT0-002 practice questions

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This PT0-002 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PT0-002 exam.