HTML Injection inside Email body- The First BUG I hunted down in a Bug Bounty Platform!
2022-9-26 20:8:15 Author: infosecwriteups.com(查看原文) 阅读量:17 收藏

Hola Amigo!!

Today, I got my first Bug at Hackerone which is really interesting for me, and hope it will be the same for you too!

I observed and exploited this Bug in an engagement (Web app Penetration Testing) at my workplace and thought of looking for it in an application that I was testing in Hackerone, and from the title, it should be obvious to you that indeed it worked.

So before talking about the vulnerability, I want you to know this program doesn’t allow disclosure of the Bug, so let the domain be target.com.

The target.com has a feature that allows the user to sell used electronics, including mobile phones, Gaming Consoles, Keyboards, Headphones, etc.

The application prompts the user to input some details regarding the product they are interested in selling and, use this to estimate the amount the user could get, if they are ready to sell this product in a nearby outlet.

The vulnerability arises in the place where the application calculates and sends the estimate to the user via email.

This feature had 2 issues that allowed successful exploitation, and they are

The web application had no control over the email entered to send the estimate, allowing the user to enter any email id he/she wants and receive the email from target.com.

The other issue is that the application takes in product information from the user and, no sanitization takes place before embedding it into the Email body, resulting in HTML Injection.

Combining the above, it is possible for an attacker to craft a malicious email that can be used in social-engineering attacks and, deliver them using the target.com mail servers and their official email ID.

So I entered some random information about the product to sell and captured the request using Burp Proxy which is responsible for the generation of email, and Injected HTML tags into parameters that get reflected in the email body.

And voila!!!! The HTML tags injected got rendered in the Email Body sent to the victim (in this case it was my personal email).

I crafted an email with an anchor tag and used Burp Collaborator URL to demonstrate this attack.

But a malicious attacker could use the same trick to phish or install any malware on the victim’s machine that too using the target.com’s mail servers.

This could cause the company a huge reputational loss and, if they use any paid service to generate such emails, then could even cause a financial loss when done on large scale.

So my friend, if you ever come across such a feature in an application, do look for this issue and enjoy hunting!

From Infosec Writeups: A lot is coming up in the Infosec every day that it’s hard to keep up with. Join our weekly newsletter to get all the latest Infosec trends in the form of 5 articles, 4 Threads, 3 videos, 2 GitHub Repos and tools, and 1 job alert for FREE!


文章来源: https://infosecwriteups.com/html-injection-inside-email-body-the-first-bug-i-hunted-in-a-bug-bounty-platform-3c96b1e0ae9f?source=rss----7b722bfd1b8d--bug_bounty
如有侵权请联系:admin#unsafe.sh