Skip to content

Commit

Permalink
Merge pull request #47 from emanuelduss/main
Browse files Browse the repository at this point in the history
Added bamda that finds hostnames in responses
  • Loading branch information
Hannah-PortSwigger authored Dec 18, 2023
2 parents b96b01a + 108b485 commit 4d80db7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Proxy/HTTP/HostnameInResponse.bamda
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* Finds responses which contain the hostname.
*
* Useful to identify possible attack surface for host header injection and
* web cache poisioning attacks.
*
* @author emanuelduss
**/

var hostname = requestResponse.request().headerValue("Host");

return requestResponse.hasResponse() && requestResponse.response().contains(hostname, false);

0 comments on commit 4d80db7

Please sign in to comment.