BLACK FRIDAY SALE – Unlock Up to 25% OFF on All Exam Prep! - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

CompTIA PT0-003 Exam - Topic 2 Question 21 Discussion

Posted by Devorah on Mar 22, 2025 at 06:34 AM

A penetration tester is trying to get unauthorized access to a web application and executes the following command:

GET /foo/images/file?id=2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2fetc%2fpasswd

Which of the following web application attacks is the tester performing?

Suggested Answer: C

The attacker is attempting to access restricted files by navigating directories beyond their intended scope.

Directory Traversal (Option C):

The request uses encoded '../' sequences (%2e%2e%2f = ../) to move up directories and access /etc/passwd.

This is a classic directory traversal attack aimed at accessing system files.


Incorrect options:

Option A (Insecure Direct Object Reference - IDOR): IDOR exploits direct access to objects (e.g., changing user_id=123 to user_id=456), not directory navigation.

Option B (CSRF): CSRF forces users to execute unwanted actions, unrelated to directory access.

Get Premium PT0-003 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
32 comments · newest first
TA
Tarra 11 months ago
This seems a bit too straightforward, are we missing something?
HA
Hannah 11 months ago
Totally agree, it's about accessing restricted files!
LE
Lenna 12 months ago
Wait, are we sure it's not Insecure Direct Object Reference?
LA
Laquanda 12 months ago
I thought it was Local File Inclusion at first.
AL
Alesia 1 year ago
That's definitely a Directory Traversal attack.
AN
An 1 year ago
I’m a bit confused; could it also be Insecure Direct Object Reference? But the path traversal seems more likely to me.
GE
Georgeanna 1 year ago
I remember practicing similar questions, and I think Directory Traversal fits best here since it’s manipulating the file path.
MI
Mignon 1 year ago
I'm not entirely sure, but it seems like it could also be Local File Inclusion because it's trying to include a file from the server.
TY
Tyisha 1 year ago
I think this might be related to Directory Traversal since the command is trying to access files outside the intended directory.
HA
Harrison 1 year ago
I think this is a directory traversal attack, but I'm not 100% certain. The URL is trying to access a sensitive file, so that's a good indicator. I'll make sure to review the other answer choices before submitting my final answer.
BR
Brendan 1 year ago
Okay, so the tester is trying to access a file outside of the web application's root directory. That sounds like a directory traversal attack to me. I'm pretty sure this is the right answer, but I'll double-check the other options just to be sure.
TR
Truman 1 year ago
Hmm, I'm not sure about this one. The URL looks a bit strange, but I'm not sure if it's a directory traversal or something else. I'll have to think this through carefully.
CE
Cecil 1 year ago
This looks like a classic directory traversal attack. The URL is trying to access the /etc/passwd file, which is a sensitive system file. I'm pretty confident this is the right answer.
VE
Veronika 2 years ago
Well, this is clearly a directory traversal attempt. The tester is trying to access a sensitive file by using the '../' syntax to move up the directory tree. Not a very subtle approach, but hey, sometimes the direct route works!
MO
Mose 2 years ago
↳ replying to Veronika
Directory Traversal
MA
Matt 2 years ago
↳ replying to Veronika
Cross-Site Scripting
ET
Ettie 2 years ago
↳ replying to Veronika
SQL Injection
CI
Ciara 2 years ago
Haha, this tester is just messing around, trying to see what they can get away with. I bet they're hoping for some juicy information in that /etc/passwd file!
KA
Kaycee 2 years ago
↳ replying to Ciara
Cross-site Request Forgery (CSRF)
YU
Yuki 2 years ago
↳ replying to Ciara
Directory Traversal
DE
Denae 2 years ago
↳ replying to Ciara
Cross-site Scripting (XSS)
SA
Salley 2 years ago
↳ replying to Ciara
SQL Injection
CE
Ceola 2 years ago
I think this is a local file inclusion attack. The tester is trying to include a local file on the server, which could lead to unauthorized access or even remote code execution.
LA
Laurena 2 years ago
Hmm, I'm not so sure. It could also be an insecure direct object reference attack, where the tester is trying to access a sensitive file by manipulating the 'id' parameter.
EL
Elden 2 years ago
Whoa, the tester is definitely trying a directory traversal attack here. That URL looks like it's trying to access the /etc/passwd file on the server, which is a classic move.
LA
Latonia 2 years ago
↳ replying to Elden
The web application should have proper input validation to prevent these types of attacks. It's important to always be vigilant against security threats.
JA
Jamal 2 years ago
↳ replying to Elden
It's a common tactic to try to access the /etc/passwd file to gather information about the server and its users.
SA
Samuel 2 years ago
↳ replying to Elden
That's right, it's a directory traversal attack. The tester is trying to move up multiple directories to access sensitive files.
NO
Nobuko 2 years ago
I think it's important for the tester to report this vulnerability to the web application owner for proper mitigation.
GR
Gracia 2 years ago
I believe it could also be a Local File Inclusion attack, as the command includes the /etc/passwd file.
MA
Martha 2 years ago
I agree with Kristeen, the command looks like it's trying to access files outside the intended directory.
KR
Kristeen 2 years ago
I think the penetration tester is performing a Directory Traversal attack.
0/2000 characters

Save Cancel