Question 114 of 509
Attacks and ExploitseasyMultiple ChoiceObjective-mapped

Quick Answer

The correct first action is to connect to the switch's console port and attempt default credentials. This is because physical access to the switch itself—especially when the cabinet lock is broken—allows a tester to bypass switch port security entirely by targeting the management plane rather than the data plane. Port security only filters traffic on the standard Ethernet data ports based on MAC addresses, but the console port provides out-of-band administrative access that ignores those restrictions. On the CompTIA PenTest+ PT0-002 exam, this scenario tests your ability to prioritize exploitation paths based on physical access; a common trap is to immediately plug into a data port, which would trigger a security violation and potentially shut down the port. Instead, remember that physical access to the switch hardware means you can attack the switch itself, not just the network it serves. Memory tip: "Console first, data last—default creds bypass the MAC blast."

PT0-002 Attacks and Exploits Practice Question

This PT0-002 practice question tests your understanding of attacks and exploits. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. 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 has physical access to a small office. The network switch is in a locked cabinet, but the tester notices the lock is broken. The switch has multiple ports, and the tester wants to connect to the internal network. The tester has a laptop with an Ethernet port. However, the tester suspects that port security is enabled on the switch ports, which would block the connection if the MAC address is not authorized. Which action should the tester take first to gain network access?

Clue words in this question

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

  • Clue: "first"

    Why it matters: Order matters here. You are being tested on which action comes before the others — not which action is generally useful.

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

Connect to the switch's console port and attempt default credentials.

Option D is correct because the tester has physical access to the switch and the lock is broken, allowing direct console access. If port security is enabled, plugging into a data port (Option C) would be blocked. The fastest first step is to connect to the console port and try default credentials (e.g., cisco/cisco) to gain administrative control of the switch, which can then be used to disable port security or add the tester's MAC address to the allowed list.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

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 MAC flooding attack to fill the switch's MAC table.

    Why it's wrong here

    MAC flooding may cause the switch to fail open but is noisy and not guaranteed to bypass port security.

  • Use a DHCP starvation attack to exhaust IP addresses.

    Why it's wrong here

    DHCP starvation does not bypass port security; it only prevents legitimate clients from obtaining IP addresses.

  • Plug the laptop into an available switch port.

    Why it's wrong here

    This will likely be blocked if port security is enabled, as the MAC address is unknown.

  • Connect to the switch's console port and attempt default credentials.

    Why this is correct

    If successful, the tester can disable port security or add their MAC address as authorized, gaining network access.

    Clue confirmation

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

    Related concept

    Read the scenario before looking for a memorised answer.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates assume physical access to a switch port means they can simply plug in (Option C), but Cisco exams emphasize that port security is a common Layer 2 control that must be bypassed via management access first, not by attacking the data plane.

Detailed technical explanation

How to think about this question

Cisco switch port security uses sticky MAC learning or a static allowed MAC list; a violation can place the port in err-disable state, requiring manual intervention or a configured recovery mechanism. The console port (RJ-45 or USB) provides out-of-band management access, often with default credentials like 'cisco' for both username and password, or no password if not configured. Once in privileged EXEC mode, the tester can issue 'show port-security interface' to view violations and then use 'switchport port-security mac-address sticky' or 'no switchport port-security' to gain network access.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

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

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

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. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. 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.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

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?

Attacks and Exploits — This question tests Attacks and Exploits — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Connect to the switch's console port and attempt default credentials. — Option D is correct because the tester has physical access to the switch and the lock is broken, allowing direct console access. If port security is enabled, plugging into a data port (Option C) would be blocked. The fastest first step is to connect to the console port and try default credentials (e.g., cisco/cisco) to gain administrative control of the switch, which can then be used to disable port security or add the tester's MAC address to the allowed list.

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

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Are there clue words in this question I should notice?

Yes — watch for: "first". Order matters here. You are being tested on which action comes before the others — not which action is generally useful.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

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 25, 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.