Skip to content

Commit

Permalink
Update README.md files
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 4, 2023
1 parent 1441034 commit 522b780
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions Proxy/HTTP/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,49 @@ if (requestResponse.response().hasHeader("authorization")) {
return false;

```
## [OWASPTop25VulnerableParameters.bambda](https://github.com/PortSwigger/bambdas/blob/main/Proxy/HTTP/OWASPTop25VulnerableParameters.bambda)
### Filters Proxy HTTP history for requests with vulnerable parameters based on the OWASP Top 25
#### Author: Tur24Tur / BugBountyzip (https://github.com/BugBountyzip)
```java
// Define the vulnerable parameters as a Set based on OWASP Top 25
Set<String> parameterNames = Set.of(
// SSRF parameters
"dest", "redirect", "uri", "continue", "url", "window", "data",
"reference", "site", "html", "val", "validate", "domain", "callback", "return",
"page", "feed", "host", "port", "to", "out", "dir",
// SQL injection parameters
"id", "select", "report", "search", "category", "file", "class", "news",
"item", "menu", "ref", "title", "topic", "thread",
"form", "main", "nav", "region",
// XSS parameters
"q", "s", "lang", "keyword", "keywords", "year", "email",
"type", "name", "p", "month", "image", "list_type", "terms", "categoryid", "key",
"l", "begindate", "enddate",
// LFI parameters
"cat", "action", "board", "date", "detail", "download", "path", "folder",
"prefix", "include", "inc", "locate", "show", "doc", "view",
"content", "document", "layout", "mod", "conf",
// Open Redirect parameters
"next", "target", "rurl", "destination", "redir", "redirect_uri",
"redirect_url", "image_url", "go",
"returnTo", "return_to", "checkout_url", "return_path",
// RCE parameters
"cmd", "exec", "command", "execute", "ping", "query", "jump", "code", "reg", "do",
"func", "arg", "option", "load", "process", "step", "read", "feature", "exe",
"module", "payload", "run", "print"
);

// Get the request object
var request = requestResponse.request();

// Iterate through each parameter name and check if it exists in the request URL or body
for (String param : parameterNames) {
if (request.hasParameter(param, HttpParameterType.URL) ||
request.hasParameter(param, HttpParameterType.BODY)) {
return true;
}
}

return false;

```

0 comments on commit 522b780

Please sign in to comment.