Question 18 of 509
Tools and Code AnalysiseasyMultiple ChoiceObjective-mapped

Quick Answer

The answer is that the -A option enables OS detection, version detection, script scanning, and traceroute all at once. This is correct because -A is a composite flag in Nmap that bundles four distinct reconnaissance techniques into a single switch: -O for operating system detection, -sV for service version detection, -sC for default script scanning, and --traceroute for path analysis. On the CompTIA PenTest+ PT0-002 exam, this question tests your ability to interpret common Nmap aggressive scan options and understand how they streamline comprehensive scanning without needing separate flags. A common trap is confusing -A with just OS detection or thinking it only speeds up the scan, when in fact it activates multiple deep-inspection modules. For the exam, remember the mnemonic “All-in-One” for -A: it Aggregates OS, version, scripts, and traceroute into a single aggressive sweep.

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: -A combines OS detection (-O) and version detection (-sV).. 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 runs the following command: nmap -sS -p 1-65535 -T4 -A -O --reason target. What is the primary purpose of the -A option in this command?

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 1easymultiple choice
Full question →

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

Enables OS detection, version detection, script scanning, and traceroute.

The -A option in nmap is a composite flag that enables OS detection (-O), version detection (-sV), script scanning (-sC), and traceroute (--traceroute) in a single switch. This is explicitly documented in nmap's man page and is designed to provide comprehensive reconnaissance in one command, making option A correct.

Key principle: -A combines OS detection (-O) and version detection (-sV).

Answer analysis

Option-by-option breakdown

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

  • Enables OS detection, version detection, script scanning, and traceroute.

    Why this is correct

    Correct. -A is an aggregation flag that combines several scanning techniques to provide detailed information about the target's operating system, running services, and other characteristics.

    Clue confirmation

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

    Related concept

    -A combines OS detection (-O) and version detection (-sV).

  • Sets the timing template to aggressive (level 4).

    Why it's wrong here

    The timing template is set by -T4, not -A. -A does not affect timing; it is for detection features.

  • Enables aggressive scanning that is more likely to be detected by the target.

    Why it's wrong here

    While -A can generate more traffic, it is not primarily about aggressiveness. The timing template (-T4) controls how quickly packets are sent. -A focuses on the depth of information gathering.

  • Performs a SYN (half-open) scan.

    Why it's wrong here

    The SYN scan type is specified by -sS. -A is independent of the scan type and can be combined with various scan types.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates confuse the 'aggressive' label of -A with nmap's timing templates (e.g., -T4 or -T5), which are actually named 'aggressive' and 'insane' in the documentation, leading them to incorrectly associate -A with scan speed or detectability rather than its true composite functionality.

Detailed technical explanation

How to think about this question

Under the hood, -A triggers a sequence of operations: first, nmap performs OS fingerprinting by analyzing TCP/IP stack responses (e.g., TTL, window size, and DF bit), then runs version detection by connecting to open ports and parsing service banners, followed by executing default NSE scripts (e.g., http-title, smb-os-discovery), and finally performs a traceroute using ICMP or TCP probes. A real-world scenario where this matters is during internal penetration tests where -A can inadvertently cause service disruption or trigger IDS alerts due to the volume of probes, so testers often use -A only after initial stealthy scans.

KKey Concepts to Remember

  • -A combines OS detection (-O) and version detection (-sV).
  • -A includes script scanning (--script=default).
  • -A also performs a traceroute (--traceroute).
  • -A is an 'Aggressive scan' flag, but 'aggressive' refers to the depth of information, not just speed.

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

-A combines OS detection (-O) and version detection (-sV).

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 -A combines OS detection (-O) and version detection (-sV)., 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 — -A combines OS detection (-O) and version detection (-sV)..

What is the correct answer to this question?

The correct answer is: Enables OS detection, version detection, script scanning, and traceroute. — The -A option in nmap is a composite flag that enables OS detection (-O), version detection (-sV), script scanning (-sC), and traceroute (--traceroute) in a single switch. This is explicitly documented in nmap's man page and is designed to provide comprehensive reconnaissance in one command, making option A correct.

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

Review -A combines OS detection (-O) and version detection (-sV)., 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?

-A combines OS detection (-O) and version detection (-sV).

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.