@Override public int consolidateDuplicateIssues(IScanIssue existingIssue, IScanIssue newIssue) { // This method is called when multiple issues are reported for the same URL // path by the same extension-provided check. The value we return from this // method determines how/whether Burp consolidates the multiple issues // to prevent duplication // // Since the issue name is sufficient to identify our issues as different, // if both issues have the same name, only report the existing issue // otherwise report both issues if (existingIssue.getIssueName().equals(newIssue.getIssueName())) { return -1; } else { return 0; } } }
@Override public int consolidateDuplicateIssues(IScanIssue existingIssue, IScanIssue newIssue) { if (existingIssue.getIssueName().equals(newIssue.getIssueName()) && existingIssue.getIssueDetail().equals(newIssue.getIssueDetail())) return -1; else return 0; } }
@Override public int consolidateDuplicateIssues(IScanIssue existingIssue, IScanIssue newIssue) { if (existingIssue.getIssueName().equals(newIssue.getIssueName()) && existingIssue.getIssueDetail().equals(newIssue.getIssueDetail())) return -1; else return 0; } }
/** * * Verify for a specific protocol - host a specific * issue has been already detected * * @param callbacks IBurpExtenderCallbacks * @param vulnerabilityName vulnerability to check if it's present into the issues * @param protocol (http/https) * @param host the hostname * */ public static boolean isvulnerabilityFound(IBurpExtenderCallbacks callbacks, String vulnerabilityName, String protocol, String host) { IScanIssue[] allIssues; allIssues = callbacks.getScanIssues(protocol + "://" + host); for (IScanIssue a : allIssues) { if (a.getIssueName().contains(vulnerabilityName)) { return true; } } return false; } }
@Override public int consolidateDuplicateIssues(IScanIssue existingIssue, IScanIssue newIssue) { switch (newIssue.getIssueName()) { case "Clickjacking": case "Missing X-Content-Type-Options header": case "Missing X-XSS-Protection header": case "Content Security Policy related information": if (existingIssue.getIssueName().equals(newIssue.getIssueName()) && existingIssue.getUrl().getHost().equals(newIssue.getUrl().getHost()) && existingIssue.getUrl().getPath().equals(newIssue.getUrl().getPath())) { return -1; } return 0; default: if (existingIssue.getIssueDetail().equals(newIssue.getIssueDetail())) { return -1; } return 0; } }
/** * {@inheritDoc} */ @Override public void newScanIssue(IScanIssue issue) { if (isFalsePositive(issue)) { log("Excluding false positive of type: " + issue.getIssueType() + ", name: " + issue.getIssueName() + " found at URL: " + issue.getUrl()); } else { log("New scan issue of type: " + issue.getIssueType() + ", name: " + issue.getIssueName() + " found at URL: " + issue.getUrl()); scanIssues.add(issue); } }
issue.issue = scanIssue.getIssueName(); if(httpMessages[0] instanceof IHttpRequestResponseWithMarkers)
/******************* * Consolidate duplicate issues. * * @param existingIssue The existing scanner issue. * @param newIssue The new scanner issue. * @return -1 keep existing issue, 0 to keep both, 1 to keep the new issue. ******************/ public int consolidateDuplicateIssues(IScanIssue existingIssue, IScanIssue newIssue) { //Compare issues if (existingIssue.getUrl().equals(newIssue.getUrl()) && existingIssue.getIssueName().equals(newIssue.getIssueName())) { //Return the issue with higher confidence if (confidenceValue(existingIssue) > confidenceValue(newIssue)) { return -1; } else if (confidenceValue(existingIssue) < confidenceValue(newIssue)) { return 1; } else { //Confidence matches, return the issue with higher severity if (severityValue(existingIssue) > severityValue(newIssue)) { return -1; } else if (severityValue(existingIssue) < severityValue(newIssue)) { return 1; } else { //Both match, keep the existing issue return -1; } } } //Keep both issues return 0; }
int existingIssues = issueStat.getOrDefault(issue.getIssueName(), 0); if (extConfig.getMaxIssuesByType() > 0 && existingIssues >= extConfig.getMaxIssuesByType()) { return; issueStat.put(issue.getIssueName(), existingIssues+1); issues.add(issue);