Content Spoofing

Content Spoofing

Content spoofing, also known as virtual defacement or content injection, is an attack that targets a user through a web application injection vulnerability. If an application does not handle user supplied data properly, content can be supplied by an attacker to a web application, generally via a parameter value, which reflects back to the user. This way, a modified page is presented to the user, in the background of a trusted domain.

This attack is normally used as, in combination with social engineering, as the attack is misusing a code-based vulnerability and the user’s trust.

Also called as text based injection, content spoofing reflects user supplied data and delivers (displays) it on browser. It seems to be part of an application message. This occurs due to false handle user supplied data and delivers it in a way that seems rendered by an application. This way, a page that is already present in a trusted domain, can be modified by an attacker (valid application URL) and the URL can be sent to the victim.

Content Spoofing vs. Cross-site Scripting

According to OWASP, content spoofing is closely related to cross site scripting (XSS). While ‘script’ and other similar techniques are used by XSS to run JavaScript, content spoofing only uses other techniques to customize the pages for malicious reasons.

Even if web applications use XSS mitigation techniques, such as output encoding, the application is still vulnerable to text-based spoofing attacks.

Content Spoofing Attacks Can Be Demonstrated by the following Examples

  1. HTML (hypertext markup language) injection. Following is a possible attack scenario.
  2. Attacker first finds a site that is vulnerable to HTML injection.
  3. The user of the website is sent a URL with a malicious code, by the attacker, through an email or social networking site.
  4. As the page is located in a trusted domain, the user will visit the page.
  5. When the page is accessed by the victim, the injected HTML code is delivered and presented to the user, inquiring about the username and password.
  6. The username and password are then sent to the attacker’s server.

Text Injection

Another example is to present wrong information to a user through text manipulation. Following is an attack scenario. For this scenario, we should assume proper output encoding has been implemented and that XSS is not possible:

  1. A web application that gives guidance to its users on whether a particular stock should be bought or sold,is identified by the attacker.
  2. A vulnerable parameter is identified by an attacker.
  3. A malicious link is crafted by an attacker, by marginally modifying a valid request.
  4. The modified request link is sent to a user and they click on the link.
  5. Using the attacker’s malicious recommendations, a valid webpage is created, and the user thinks that the recommendation was from the stock website.


Let us know what you think