File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ id: 996d9f0d-1113-46c1-b731-4e6918013604
2+ name: Bypass first-request validation
3+ function: CUSTOM_ACTION
4+ location: REPEATER
5+ source: |
6+ /**
7+ * This hides your repeater request behind an innocent GET request. It's useful for bypassing server-level validation sometimes.
8+ *
9+ * @author James Kettle (https://github.com/albinowax)
10+ *
11+ * Try it out on the Academy lab here: https://portswigger.net/web-security/host-header/exploiting#connection-state-attacks
12+ *
13+ **/
14+ var connectionId = utilities().randomUtils().randomString(8);
15+ var options = RequestOptions.requestOptions().withConnectionId(connectionId).withHttpMode(HttpMode.HTTP_1);
16+
17+ // Send a simple GET / HTTP/1.1 to the target as the precusor request
18+ var url = requestResponse.request().url();
19+ var precursorRequest = HttpRequest.httpRequestFromUrl(url);
20+ precursorRequest = precursorRequest.withPath("/").withHeader("Connection", "keep-alive");
21+
22+ // Send the attack in the repeater, and update the response pane
23+ api().http().sendRequest(precursorRequest, options);
24+ var response = api().http().sendRequest(requestResponse.request(), options);
25+ httpEditor.responsePane().set(response.response().toByteArray());
26+
You can’t perform that action at this time.
0 commit comments