Server Side Request Forgery To Internal Smtp Access
The article demonstrates that a server-side request forgery (SSRF) vulnerability can be used to send commands to an internal SMTP server via the gopher protocol, allowing an attacker to send emails from the vulnerable server. The author sets up a lab and shows how to craft a gopher payload that issues SMTP commands to send an email.
Published on infosecwriteups.com
Introduction about SSRF attack can be read on separated medium post Beginner Guide To Exploit Server Side Request Forgery (SSRF) Vulnerability
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
What the attacker needed
Vulnerable SSRF endpoint; internal SMTP server reachable
How it was found
- Set up the lab by cloning the repository and building the Docker image.
- Generate a gopher payload that contains SMTP commands to send an email.
- Enter the generated payload into the vulnerable web application.
- Observe that an email is sent from the target server.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Server-side request forgery (SSRF) is a bug where a website can be tricked into making requests to other servers on its internal network. This article shows that if the website can be made to talk to an internal email server (SMTP), an attacker can send emails as if they came from that server. The attacker uses a special URL format called gopher to send the email commands.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.