ctfs
  • ๐Ÿ‘‹Hello!
  • ๐ŸดPractice
    • ๐ŸŒCryptohack
      • Introduction
      • General
        • Encoding
        • XOR
        • Mathematics
        • Data Formats
      • Symmetric Ciphers
        • How AES Works
        • Symmetric Starter
        • Block Ciphers 1
        • Stream Ciphers
      • Mathematics
        • Modular Math
        • Lattices
      • RSA
        • Starter
        • Primes Part 1
        • Public Exponent
    • ๐ŸŒPortSwigger
      • Path Traversal
      • File Upload
      • SSRF Attacks
    • ๐ŸŒTryHackMe
      • Basic Skills
      • Linux
      • Penetration Testing
      • Networking
      • OSINT
  • ๐ŸšฉCompetitions
    • 2025
      • ๐Ÿ‡ฎ๐Ÿ‡ฉGKSK#9 Osintathon
        • Mudik Lebaran (100 pts)
        • Foto Patung (100 pts)
        • Kolektor Komik (100 pts)
        • Tolong Aku (100 pts)
        • Kencan Pertama (100 pts)
        • Nama Si Pelaku (100 pts)
        • Cekidot (100 pts)
        • Ledakan! (100 pts)
        • ๐ŸŽน๐ŸŽถ (100 pts)
        • Batu Besar (100 pts)
        • Komentar (100 pts)
        • Ini dimana? (100 pts)
        • Koordinat Foto Misterius (100 pts)
        • Bianglalaaa (100 pts)
        • Aku Hacker (100 pts)
        • Anjazzz (100 pts)
        • Dikirim Kakakku (129 pts)
        • Ingfo Loker (154 pts)
        • MISSING 00 (100 pts)
        • MISSING 01 (154 pts)
        • Siapa Aku? (154 pts)
      • ๐Ÿ‡ฎ๐Ÿ‡ฉIFEST 13
        • Ququerer (250 pts)
        • Silent Trace (370 pts)
        • Nugas (Solved After Event)
        • Free Flag (280 pts)
        • Brute (Solved After Event)
        • Web V1 (Solved After Event)
        • Bypass (Solved After Event)
        • Orbiter (Solved After Event)
      • ๐ŸŒOSINT Combine (Wildlife)
        • Getting Started (100 pts)
        • Proper Poppy (100 pts)
        • Legendary Beasts (200 pts)
        • Shadow Fleet (200 pts)
        • Proper Poppy II (200 pts)
        • Not So Smug Smuggler (200 pts)
        • Icy (200 pts)
        • Forest Pals (200 pts)
        • Safari Time II (200 pts)
        • Sneaky! (200 pts)
        • Hello Friend (300 pts)
        • Busy As A (300 pts)
        • Get Rotated! (300 pts)
        • High Seas (300 pts)
        • Nocturnal (300 pts)
        • Safari Time (400 pts)
        • Peak Weather (400 pts)
        • Singsong (400 pts)
        • Falling Fell (500 pts)
        • Kitty Cats (500 pts)
      • ๐Ÿ‡ฎ๐Ÿ‡ฉRECURSION
        • let him cook
        • Basic Math
        • Favourite Number
        • Zarrar Cipher (100 pts)
        • paBlue Team (100 pts)
        • [๐Ÿฉธ] I wish I was there on December 21, 2024 (100 pts)
        • Small House (200 pts)
        • [๐Ÿฉธ] Mission Difference (456 pts)
    • 2024
      • ๐ŸŒSanta Claus CTF
        • Complete Picture
        • Day 1 - Big Bang
        • Day 2 - The Summer Job
        • Day 3 - The Visitors
        • Day 4 - Happy Birthday
        • Day 5 - Say My Name
        • Day 6 - Say "Cheese"
        • Day 7 - Revealing Pixels
        • Day 8 - Connecting The Dots
        • Day 9 - 404 Not Found
        • Day 10 - Breaking News
        • Day 11 - Ayrton Santa
        • Day 12 - Lost and Found
        • Day 13 - Planespotting
        • Day 14 - Santa Surveillance
        • Day 15 - Shaken, Not Stirred
        • Day 16 - Status Update
        • Day 17 - Waste ...of Time
        • Day 18 - Lost in Translation
        • Day 19 - Santa's Clones
        • Day 20 - Losing Tracks
        • Day 21 - Sing my Song
        • Day 22 - Eagle Eye
        • Day 23 - Distances Matters
        • Day 24 - Mastermind
      • ๐ŸŒCyber Jawara International
        • Stone Game (100 pts)
        • prepare the tools (176 pts)
        • Persona (484 pts)
      • ๐ŸŒOSMOSIS Precon CTF
        • 1 The art of espionage
        • # 2 The Hack
        • # 3 The rabbit hole
        • # 4 The Association
        • # 6 Where is number 5
        • # 5 Who is it
        • Too many Layers
        • The prize
      • ๐Ÿ‡ฎ๐Ÿ‡ฉIntechfest
        • Sanity Check (100 pts)
        • Alin (113 pts)
        • GerakSendiri (106 pts)
        • Details (100 pts)
      • ๐Ÿ‡ฎ๐Ÿ‡ฉCOMPFEST 16
        • Let's Help John! (100 pts)
        • money gone, wallet also gone (100 pts)
        • headโ€™s up! (493 pts)
        • CaRd (304 pts)
        • Sanity Check (100 pts)
      • ๐Ÿ‡ฎ๐Ÿ‡ฉGemastik
        • Baby AES (451 pts)
        • Baby Structured (100 pts)
      • ๐Ÿ‡ฎ๐Ÿ‡ฉTechnofair 11
        • Kenangan
        • Xorban
        • Marsha
        • Siap Tempur!!
        • eftipi
        • kurang berarti
        • DUMPling
        • Malicious
      • ๐ŸŒDIVER OSINT
        • chiban
      • ๐Ÿ‡ฎ๐Ÿ‡ฉGKSK#8 Osintathon
        • Sport Location
        • Meklaren lu warna apa boss ?
        • Postcode
        • Rumah Minang
        • Latihan
        • Anak Misterius
        • Travelling Anywhere
        • The Thief
        • Danger Watch
        • Misteri Ruang Angkasa
        • Fun Walk
        • I am Late
        • My Oshi
        • Wellcome to my Youtube Channel
        • Pesan Tersembunyi Wingdings
        • Salah Fokus
        • Apa itu GKSK?
        • Foto Bersejarah
        • Picture
        • Nostalgia Child
        • oldschool
        • Summer Olympic
      • ๐Ÿ‡ฎ๐Ÿ‡ฉTechcomfest
        • pemanasan
        • crackable
        • Kuli-ah forensik
    • 2023
      • ๐Ÿ‡ฎ๐Ÿ‡ฉCyber Jawara
        • daruma
      • ๐Ÿ‡ฎ๐Ÿ‡ฉNCW
        • Simple (220 pts)
        • wangsaf (320 pts)
        • Sillyville Saga (220 pts)
        • Freminhelp (Solved after event)
      • ๐Ÿ‡ฎ๐Ÿ‡ฉHology 6
      • ๐Ÿ‡ฎ๐Ÿ‡ฉSlashRoot 7
        • Summary (441 pts)
        • eeee (480 pts)
        • Zebra Cross (409 pts)
        • Waka Waka eh eh (185 pts)
        • ANABUL (250 pts)
      • ๐Ÿ‡ฎ๐Ÿ‡ฉCOMPFEST 15
        • not simply corrupted (316 pts)
        • Artificial secret (356 pts)
      • ๐Ÿ‡ฎ๐Ÿ‡ฉGemastik
        • easy AES
        • k-1
        • Gen Z
      • ๐Ÿ‡ฎ๐Ÿ‡ฉTechnoFair 10
        • RSA Bwang
        • Marsah
        • rapsodi
        • Pengen Merch JKT ๐Ÿ˜ข
        • space mono
        • file pemberian fans
        • bantu aku mencari sebuah rahasia
    • 2022
      • ๐Ÿ‡ฎ๐Ÿ‡ฉNCW
        • sabeb64 (331 pts)
        • cakemath (451 pts)
        • Downloader (244 pts)
        • 199 passcode (Solved after event)
      • ๐Ÿ‡ฎ๐Ÿ‡ฉTEDCTF
      • ๐Ÿ‡ฎ๐Ÿ‡ฉGemastik
      • ๐Ÿ‡ฎ๐Ÿ‡ฉOSCCTF
      • ๐Ÿ‡ฎ๐Ÿ‡ฉARA
  • ๐ŸชฆOld Hello
Powered by GitBook
On this page
  • Description
  • Bypassing SSRF defenses
  • Blind SSRF
  • Lab Solutions
  1. Practice
  2. PortSwigger

SSRF Attacks

Description

  • before you send an HTTP request, you can edit the parameters as you like

  • that parameter would be processed by the server, so we can make the server do malicious things

  • for example, a webserver would show an image from a url sent by the user via POST request. in the request, we can instead send https://ifconfig.pro/ and the server would return its IP address

Bypassing SSRF defenses

Sometimes blocked: 127.0.0.1, localhost, /admin

  • alternative representation: 127.0.0.1, 2130706433, 017700000001, or 127.1

  • register own domain that resolves to 127.0.0.1: use spoofed.burpcollaborator.net

  • obfuscate using URL encoding or cAsE vARiaTion

  • switch the protocols: http: to https:

Sometimes sites use whitelisting instead

  • embed creds: https://expectedhost.com:fakepassword@evilhost.com

  • URL fragment: https://evilhost.com#expectedhost.com

  • DNS naming hierarchy: https://expectedhost.com.evilhost.com

  • URL encode 1-2 times

Blind SSRF

  • OAST/Out-of-Band techniques

  • generate unique domain names, send it to payload, and if http request/DNS lookup coming from the app, then the app is vulnerable

  • Referer header -> some sites use analytics software to track where users come from and what the referrer sites are about

Lab Solutions

Lab 1

Change the parameter to stockApi=http://localhost/admin/. Then, we'll get the admin page on the response. Notice how the href to delete user Carlos is admin/delete?username=carlos. Then, we just update the payload to be stockApi=http://localhost/admin/delete?username=carlos.

Lab 2

Look at the HTTP request and pass it to Intruder as stockApi=http://192.168.0.ยงxยง/admin:8080. Iterate from 0-255 and wait for the one with a different response. Then update the IP on the request and the rest is the same as the previous lab. Final payload: stockApi=http://192.168.0.99:8080/admin/delete?username=carlos

Lab 3

Try different bypasses. This payload works: stockApi=http://127.1/admiN/delete?username=carlos

Lab 4

Do "check stock" and "next product". Put the GET request of next product (which supports redirection) to "check stock" POST request. Final payload: stockApi=/product/nextProduct?path=http://192.168.0.12:8080/admin/delete?username=carlos.

Lab 5

Need Burp Collaborator (Pro Version) :) -- Basically, replace the Referer header with a domain created by Burp Collaborator. Then the back-end server will do DNS and HTTP request to the inputted domain.

PreviousFile UploadNextTryHackMe

Last updated 6 months ago

๐Ÿด
๐ŸŒ