You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-5Lines changed: 16 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,13 +37,13 @@ After applying, Terraform outputs a `submit_url`. To submit a URL to the admin b
37
37
38
38
### GCP
39
39
40
-
2. Build and push the image to [`gcr.io`](https://cloud.google.com/container-registry) or [`pkg.dev`](https://cloud.google.com/artifact-registry).
41
-
1. Use the [Terraform module](https://registry.terraform.io/modules/redpwn/admin-bot/google/latest) to deploy to Cloud Run.
40
+
1. Build and push the image to [`gcr.io`](https://cloud.google.com/container-registry) or [`pkg.dev`](https://cloud.google.com/artifact-registry).
41
+
2. Use the [Terraform module](https://registry.terraform.io/modules/redpwn/admin-bot/google/latest) to deploy to Cloud Run.
42
42
43
43
### AWS
44
44
45
-
2. Build and push the image to [ECR](https://aws.amazon.com/ecr/).
46
-
1. Use the [Terraform module](https://registry.terraform.io/modules/redpwn/admin-bot/aws/latest) to deploy to Fargate and Lambda.
45
+
1. Build and push the image to [ECR](https://aws.amazon.com/ecr/).
46
+
2. Use the [Terraform module](https://registry.terraform.io/modules/redpwn/admin-bot/aws/latest) to deploy to Fargate and Lambda.
47
47
48
48
## Challenge Configuration
49
49
@@ -54,11 +54,22 @@ The key of each entry is its challenge ID. To submit a URL to the admin bot, vis
54
54
The value of each entry is an object with properties:
55
55
56
56
*`name`: the display name of the challenge
57
+
*`restrict_domains`: see below for a more in-depth explanation
57
58
*`timeout`: the timeout in milliseconds for each admin bot visit
58
59
*`handler`: a function which returns a `Promise` and accepts the submitted URL and a [Puppeteer `BrowserContext`](https://pptr.dev/#?show=api-class-browsercontext)
59
60
*`urlRegex` (optional): a regex to check the URL against (default: `/^https?:\/\//`)
60
61
61
-
To mitigate possible Chrome vulnerabilities, JIT/WebAssembly is disabled.
62
+
To prevent cookie tossing (and other cheeses) from another vulnerable challenge on the same domain, we also support providing the
63
+
`restrict_domains` option, where one can provide a list of domains and their subdomains that should be accessible. Any subdomain of a domain that is not part of the list will automatically
64
+
fail. For example, if all challenges are hosted under `example.com`, one can restrict access to only the challenge-specific subdomain `one.example.com` with the following configuration:
65
+
```js
66
+
restrict_domains: {
67
+
'example.com': ['one.example.com']
68
+
}
69
+
```
70
+
Behind the scenes, the --proxy-pac-url flag is used to tell browser how the restricted URLs should be handled.
71
+
72
+
Additionally, to mitigate possible Chrome vulnerabilities, JIT/WebAssembly is disabled.
0 commit comments