Question 350 of 509
Tools and Code AnalysismediumMultiple ChoiceObjective-mapped

PT0-002 Tools and Code Analysis Practice Question

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 a SYN packet to initiate a connection.. 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 to craft and send packets. The script contains the following code snippet: 'send(IP(dst=target)/TCP(dport=port, flags='S'))'. The script then listens for responses and looks for packets with flags 'SA'. Which type of scan is this script performing?

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

TCP SYN scan (half-open scan)

The script sends a TCP SYN packet (flags='S') and listens for a SYN-ACK response (flags='SA'), which is the defining behavior of a TCP SYN scan (also known as a half-open scan). This scan never completes the three-way handshake, making it stealthier than a full TCP Connect scan. The use of Scapy's `send()` function (Layer 3) rather than `sr()` or a socket-level connect confirms it is crafting raw packets, not relying on the OS's TCP stack.

Key principle: TCP SYN scan sends a SYN packet to initiate a connection.

Answer analysis

Option-by-option breakdown

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

  • TCP Connect scan

    Why it's wrong here

    A TCP Connect scan completes the full three-way handshake by sending an ACK after receiving SYN-ACK; this script does not send the final ACK.

  • TCP SYN scan (half-open scan)

    Why this is correct

    The script sends SYN packets and checks for SYN-ACK responses, indicating an open port. It does not complete the handshake, making it a half-open scan.

    Related concept

    TCP SYN scan sends a SYN packet to initiate a connection.

  • TCP FIN scan

    Why it's wrong here

    A FIN scan uses flags='F' and relies on different responses to infer port state; this script uses SYN and looks for SYN-ACK.

  • TCP Xmas scan

    Why it's wrong here

    Xmas scan sets FIN, URG, and PSH flags; not applicable here.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates see the use of Scapy and assume any crafted packet scan is a 'half-open' scan, but the specific flag combination (SYN sent, SYN-ACK expected) is what uniquely identifies a TCP SYN scan, not the library used.

Detailed technical explanation

How to think about this question

In a TCP SYN scan, the scanner sends a SYN packet to a target port; if the port is open, the target responds with a SYN-ACK (flags=SA), and the scanner immediately sends a RST to tear down the connection, never completing the handshake. This avoids logging in many applications that only log fully established connections, though modern intrusion detection systems (IDS) can detect the pattern. Scapy's `send()` function operates at the IP layer, bypassing the kernel's TCP stack, which is why the script must manually craft both the IP and TCP headers.

KKey Concepts to Remember

  • TCP SYN scan sends a SYN packet to initiate a connection.
  • An open port responds to a SYN with a SYN-ACK packet.
  • The SYN scan does not send the final ACK, leaving the connection half-open.
  • SYN scans are often less detectable than full TCP Connect scans.

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 a SYN packet to initiate a connection.

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 a SYN packet to initiate a connection., 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 a SYN packet to initiate a connection..

What is the correct answer to this question?

The correct answer is: TCP SYN scan (half-open scan) — The script sends a TCP SYN packet (flags='S') and listens for a SYN-ACK response (flags='SA'), which is the defining behavior of a TCP SYN scan (also known as a half-open scan). This scan never completes the three-way handshake, making it stealthier than a full TCP Connect scan. The use of Scapy's `send()` function (Layer 3) rather than `sr()` or a socket-level connect confirms it is crafting raw packets, not relying on the OS's TCP stack.

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

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

What is the key concept behind this question?

TCP SYN scan sends a SYN packet to initiate a connection.

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.