The Gopher Protocol
Gopher is a protocol that predates the Web. While unused for its original purpose today, it has a dangerous relevance in exploiting Server-Side Request Forgery (SSRF) vulnerabilities.
Why Gopher is Dangerous in SSRF Attacks
An SSRF vulnerability allows an attacker to trick a server into making an arbitrary network request. The danger of Gopher lies in its simplicity. Unlike HTTP, a `gopher://` URL allows an attacker to specify the exact raw bytes to be sent to a target IP and port. This turns a simple "URL fetching" vulnerability into a tool for speaking any plain-text protocol, such as Redis, SMTP, or internal admin panels.
Example Attack Scenario
An attacker provides the following URL to an application vulnerable to SSRF:
gopher://127.0.0.1:6379/_*1%0d%0a$8%0d%0aFLUSHALL%0d%0a
If the server's library supports Gopher, it will connect to the local Redis database (port 6379) and send the raw command to wipe all data.