
SunShine CTF 2025 - Intergalactic Webhook Service Write-up
Room / Challenge: Intergalactic Webhook Service (Web) Metadata Author: jameskaois CTF: SunShine CTF 2025 Challenge: Intergalactic Webhook Service (web) Target / URL: https://supernova.sunshinectf.games/ Difficulty: Easy Points: 10 Date: 01-10-2025 Goal We have to get the flag by leveraging the vuln in webhook service. My Solution Here is the source code, you can download it here. The backend has this vulnerable code: def is_ip_allowed(url): parsed = urlparse(url) host = parsed.hostname or '' try: ip = socket.gethostbyname(host) except Exception: return False, f'Could not resolve host' ip_obj = ipaddress.ip_address(ip) if ip_obj.is_private or ip_obj.is_loopback or ip_obj.is_link_local or ip_obj.is_reserved: return False, f'IP "{ip}" not allowed' return True, None This code takes the URL, if hostnames -> IP address using the DNS. If IP is private (like 192.168.x.x), loopback (127.0.0.1) it will be blocked. ...