Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

The SecOps Group CAP Exam - Topic 10 Question 96 Discussion

Posted by Staci on Jul 03, 2025 at 11:15 AM

In the screenshot below, an attacker is attempting to exploit which vulnerability?

POST /upload.php HTTP/1.1

Host: example.com

Cookie: session=xyz123;JSESSIONID=abc123

User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) rv:107.0

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8

Accept-Language: en-US,en;q=0.5

Accept-Encoding: gzip, deflate

Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

Content-Length: 12345

Connection: keep-alive

Content-Disposition: form-data; name="avatar"; filename="malicious.php"

Content-Type: image/jpeg

phpinfo();

?>

Suggested Answer: C

The screenshot shows an HTTP POST request to /upload.php with a multipart/form-data payload, where the attacker uploads a file named malicious.php disguised as an image/jpeg but containing PHP code (<?php phpinfo(); ?>). This indicates an attempt to exploit a File Upload Vulnerability. Such vulnerabilities occur when an application allows users to upload files without proper validation or sanitization, enabling attackers to upload malicious scripts (e.g., PHP) that can be executed on the server. In this case, if the server executes the uploaded malicious.php, it could expose server information via phpinfo() or perform other malicious actions.

Option A ('HTTP Desync Attack') involves manipulating HTTP request pipelines, which is not relevant here as the request appears standard. Option B ('File Path Traversal Attack') involves accessing unauthorized files using ../, which is not evident in this request. Option D ('Server-Side Request Forgery') involves tricking the server into making unintended requests, which does not apply to file uploads. Thus, C is the correct answer, aligning with the CAP syllabus under 'File Handling Security' and 'OWASP Top 10 (A05:2021 - Security Misconfiguration).'


Get Premium CAP Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
28 comments · newest first
MA
Makeda 10 months ago
I’m surprised they’d try to upload a PHP file as an image. What were they thinking?
YV
Yvonne 10 months ago
Definitely a file upload issue, no doubt about it!
JA
Jackie 10 months ago
Wait, are we sure it's not a Path Traversal Attack?
PA
Pamella 10 months ago
Totally agree, that filename is a red flag!
AL
Albert 10 months ago
Looks like a File Upload Vulnerability to me.
TR
Truman 11 months ago
I’m confused because I thought HTTP desync attacks were more about manipulating headers. This seems more straightforward with the file upload aspect.
BL
Blythe 11 months ago
The Content-Disposition header looks suspicious, and I recall that file upload vulnerabilities often allow attackers to execute code. So, I lean towards option C.
RO
Rodrigo 11 months ago
I'm not entirely sure, but it seems like it could also be a path traversal attack? I remember something about that from our practice questions.
AN
Annabelle 11 months ago
I think this might be related to a file upload vulnerability since the request is trying to upload a PHP file as an image.
MA
Marnie 11 months ago
This looks like a straightforward file upload vulnerability to me. The attacker is trying to upload a malicious PHP file, so I'm going with option C. I feel pretty confident about this one.
JI
Jina 12 months ago
I'm a bit confused by all the different headers and parameters in this request. Could it be a more advanced attack like HTTP desync or path traversal? I'll need to review my notes on these types of vulnerabilities before answering.
LO
Lorriane 12 months ago
Ah, I see what's going on here. The attacker is trying to upload a malicious file, so the answer is definitely C - File Upload Vulnerability. Easy peasy!
MO
Mollie 12 months ago
Hmm, I'm not sure about this one. The request has a lot of headers and parameters, so it could be a more complex attack like HTTP desync or SSRF. I'll need to think this through carefully.
NA
Natalya 1 year ago
This looks like a classic file upload vulnerability. The attacker is trying to upload a malicious PHP file, so I'll go with option C.
SH
Sharee 1 year ago
Hmm, let me think... A file upload vulnerability, for sure. The attacker is trying to sneak in a PHP script and get the server to run it. Classic move, but not gonna work on my watch!
FR
Franklyn 1 year ago
I believe it could also be a Server-Side Request Forgery, as the request is trying to access internal resources.
CE
Celia 1 year ago
I agree with Shantell, the payload in the request indicates a file upload attempt.
GE
Geoffrey 1 year ago
I'd say this is a pretty straightforward file upload vulnerability. The attacker is trying to upload a PHP script and get the server to execute it. Nice try, but not today, buddy!
IO
Iola 1 year ago
↳ replying to Geoffrey
C) File Upload Vulnerability
MI
Mirta 1 year ago
↳ replying to Geoffrey
B) File Path Traversal Attack
SH
Sheridan 1 year ago
↳ replying to Geoffrey
A) HTTP Desync Attack
RO
Rodolfo 1 year ago
Haha, the attacker is trying to upload a 'malicious.php' file? How subtle. It's obviously a file upload vulnerability, no doubt about it.
IE
Iesha 1 year ago
↳ replying to Rodolfo
It's a common tactic to upload malicious files through vulnerabilities like this.
LA
Lacey 1 year ago
↳ replying to Rodolfo
Yes, that's right. The attacker is trying to exploit a file upload vulnerability.
SH
Shantell 1 year ago
I think the attacker is attempting a File Upload Vulnerability.
HE
Hershel 1 year ago
This looks like a classic file upload vulnerability to me. The attacker is trying to upload a malicious PHP file and execute it on the server. Definitely option C.
EL
Elouise 1 year ago
↳ replying to Hershel
Yes, it's definitely a file upload vulnerability. The attacker is attempting to execute the PHP code on the server.
JA
Jackie 1 year ago
↳ replying to Hershel
I agree, the attacker is trying to upload a malicious PHP file through the file upload vulnerability.
0/2000 characters

Save Cancel