Question 501 · 856 in bank
A security analyst was asked to evaluate a potential attack that occurred on a publicly accessible section of the company's website. The malicious actor posted an entry in an attempt to trick users into clicking the following: https://www.c0mpt1a.com/contact-us/%3Fname%3D%3Cscript%3Ealert(document.cookie)%3C%2Fscript%3E Which of the following was most likely observed?
Show answer
Answer: D
Explanation
Segment by segment: URL Structure: The URL starts with "https://www.c0mpt1a.com/contact-us/," which is a typical URL structure for a website's contact page. This part appears normal. Query Parameter: Following the "/", there is a query parameter represented as "?name=". Query parameters in a URL are often used to pass data to a web application. Payload: After the "name=" query parameter, there is a URL-encoded string: "%3Cscript%3Ealert(document.cookie)%3C%2Fscript%3E". Let's decode and analyze this payload step by step: "%3C" represents " ". So, "%3Cscript%3E" is " ", and "%3C%2Fscript%3E" is " " in HTML. Between the " " and " " tags, there is JavaScript code: "alert(document.cookie)".
Source: Adapted from community discussion — sujon_london