Skip to content

Commit

Permalink
Update gcp.bcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
kyawthiha7 authored Jul 12, 2023
1 parent 047011e commit 6f6910d
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions other/gcp.bcheck
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,24 @@ metadata:
author: "Joe Thiha"

define:
path = "http://metadata.google.internal/computeMetada/v1/instance/service-accounts/default/token"
potential_path = "http://metadata.google.internal/computeMetada/v1/instance/service-accounts/default/token"

given insertion point then
send payload:
appending: {path}
if {latest.response.status_code} is "200" then
if("access_token:" in {latest.response.body} then
report issue:
severity: high
confidence: firm
detail: "Leaked GCP Service Account Access Token via SSRF."
remediation: "Restrict access to the metadat url."
appending: {potential_path}

if {latest.response.status_code} is "200" then
if("access_token:" in {latest.response.body})then
report issue:
severity: high
confidence: firm
detail: "Leaked GCP Service Account Access Token via SSRF."
remediation: "Restrict access to the metadat url."
end if
end if
end if






0 comments on commit 6f6910d

Please sign in to comment.