Question 250 of 509
Tools and Code AnalysiseasyMultiple ChoiceObjective-mapped

Quick Answer

The correct answer is a brute-force attack against SSH credentials. This technique is accurately identified because the script leverages the paramiko library, a Python implementation of the SSHv2 protocol, to systematically attempt connections across multiple IP addresses using a single username paired with a list of common passwords. By iterating through password guesses until a successful login is found, the script exemplifies a classic brute-force approach rather than a dictionary or rainbow table attack, which would rely on precomputed hashes. On the CompTIA PenTest+ PT0-002 exam, this scenario tests your ability to distinguish between credential-based attacks, with a common trap being confusion with a password-spraying attack—remember that spraying uses one password against many usernames, while brute-force uses many passwords against one username. A helpful memory tip: brute-force is “many tries, one key,” whereas spraying is “one try, many locks.”

PT0-002 Tools and Code Analysis Practice Question

This PT0-002 practice question tests your understanding of tools and code analysis. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. A key principle to apply: paramiko is a Python library for SSHv2 client and server implementations.. 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 'paramiko' library. The script reads a list of IP addresses from a file and attempts to connect to each host using the same username and a list of common passwords. Which attack technique is the script most likely performing?

Clue words in this question

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

  • Clue: "most likely"

    Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

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

Brute-force attack against SSH credentials

The script uses the 'paramiko' library, which is a Python implementation of the SSHv2 protocol. By reading a list of IP addresses and attempting connections with the same username and a list of common passwords, it is performing a brute-force attack against SSH credentials. This technique systematically tries multiple password guesses to gain unauthorized access to SSH services.

Key principle: Paramiko is a Python library for SSHv2 client and server implementations.

Answer analysis

Option-by-option breakdown

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

  • Brute-force attack against SSH credentials

    Why this is correct

    The script iterates over hosts and passwords, attempting SSH authentication with 'paramiko'. This is the definition of a brute-force attack on SSH credentials.

    Clue confirmation

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

    Related concept

    Paramiko is a Python library for SSHv2 client and server implementations.

  • SQL injection attack against a database

    Why it's wrong here

    Paramiko is an SSH library, not a database connector. There is no SQL query being constructed or executed, so this cannot be SQL injection.

  • Cross-site scripting (XSS) attack against a web application

    Why it's wrong here

    Paramiko performs SSH connections, not HTTP requests. XSS is a web vulnerability that would require injecting client-side scripts into web pages, which the script does not do.

  • ARP spoofing attack to intercept network traffic

    Why it's wrong here

    ARP spoofing is a network-level attack that manipulates ARP tables, typically requiring raw packet crafting. Paramiko is a higher-level SSH library and does not perform ARP manipulation.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates may confuse the paramiko library with general network scripting and incorrectly associate it with web attacks like SQL injection or XSS, rather than recognizing it as an SSH-specific library used for credential brute-forcing.

Detailed technical explanation

How to think about this question

Paramiko uses the SSH transport layer to authenticate clients via password or public key methods. In a brute-force attack, the script typically opens a new SSH connection for each password attempt, which can trigger rate-limiting or account lockout mechanisms on the target. Real-world penetration testers often combine this with a dictionary of common passwords and may use threading to speed up the attack, but must be cautious of network and system thresholds.

KKey Concepts to Remember

  • Paramiko is a Python library for SSHv2 client and server implementations.
  • Brute-force attacks involve systematically trying many credential combinations.
  • SSH (Secure Shell) provides secure remote access and command execution.
  • Common password lists are frequently used in brute-force attempts.

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

Paramiko is a Python library for SSHv2 client and server implementations.

Real-world example

How this comes up in practice

A security analyst at a medium-sized enterprise encounters this scenario during an investigation or architecture review. The correct answer reflects best practice for the specific threat or control described. Paramiko is a Python library for SSHv2 client and server implementations. Security exam questions test whether you can match controls to threats in context — not just recall definitions.

What to study next

Got this wrong? Here's your next step.

Review paramiko is a Python library for SSHv2 client and server implementations., 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 — Paramiko is a Python library for SSHv2 client and server implementations..

What is the correct answer to this question?

The correct answer is: Brute-force attack against SSH credentials — The script uses the 'paramiko' library, which is a Python implementation of the SSHv2 protocol. By reading a list of IP addresses and attempting connections with the same username and a list of common passwords, it is performing a brute-force attack against SSH credentials. This technique systematically tries multiple password guesses to gain unauthorized access to SSH services.

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

Review paramiko is a Python library for SSHv2 client and server implementations., 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: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

What is the key concept behind this question?

Paramiko is a Python library for SSHv2 client and server implementations.

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

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.