Courseiva
Question 482 of 185
easyMultiple ChoiceObjective-mapped

PT0-002 Practice Question: A penetration tester is analyzing a Python script…

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?

⚠ Common exam trap

It's easy for candidates to 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.

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.

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 leverages paramiko, a Python implementation of the SSHv2 protocol, to iterate over hosts and attempt authentication with multiple passwords. Repeating login attempts with different credential pairs against an SSH service is the textbook pattern of a brute-force attack. Unlike a single-target dictionary attack, this exhaustive trial-and-error approach may also cycle through usernames, and a successful connect call indicates valid credentials have been uncovered.

  • SQL injection attack against a database

    Why it's wrong here

    SQL injection arises when unsanitized user input is concatenated into SQL queries sent to a database through drivers like psycopg2, PyMySQL, or an ORM. Paramiko is an SSH client library that speaks the SSH protocol over a TCP socket; it does not expose methods for building or executing SQL statements, nor does it connect to relational databases. The script's core action is SSH handshake and authentication, not constructing a SELECT or INSERT query, so there is no DBMS in the loop to subvert.

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

    Why it's wrong here

    Cross-site scripting (XSS) requires injecting client-side scripts into web pages delivered over HTTP, typically by manipulating query parameters, form fields, or stored server responses. Paramiko's API is strictly for SSH communication over an encrypted TCP channel, not for making HTTP requests or rendering HTML. Because the script never sends a request to a web server and never influences a browser's DOM, it cannot be performing an XSS attack; its observable activity is repeated password attempts against an SSH daemon.

  • ARP spoofing attack to intercept network traffic

    Why it's wrong here

    ARP spoofing is a Layer 2 attack that forges Address Resolution Protocol replies to map an attacker's MAC address to a victim's IP, enabling on-path interception of Ethernet frames. Crafting such frames requires raw socket access or packet-injection tools like Scapy or dnet, since ARP operates directly on the link layer. Paramiko is a high-level application-layer SSH library that uses a standard TCP connection, so it has no capability to generate or manipulate ARP traffic; the script's network footprint is limited to TCP handshakes on port 22, not link-layer broadcast frames.

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-003 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-003 exam.