Exploit database

GH-b1c97b615191ef07cf017697fcfd48a2

citrix/ioc-scanner-cve-2019-19781

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2019-19781

47 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files11
citrix/ioc-scanner-cve-2019-19781Revision df7e51b5a3a4

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

scanners/failed-exploitation.sh

Shell · 1,368 bytes
# Copyright 2020 FireEye, Inc. and Citrix Systems, Inc.

declare -a failed_regexes;
# [GET POST or HEAD] [space] [any url prefix] /vpns/ [any url postfix] .[xml or pl] [space] HTTP/1.1" [401 or 404]
#                                              ^^^^ may be encoded
failed_regexes[0]="(GET|POST|HEAD)\s[^\s]*/(v|%76)(p|%70)(n|%6[Ee])(s|%73)/[^\s]*\.(xml|pl).*HTTP/1\.1\"\s(401|404)";

failed_exploitation() {
    if [ ! -d "$root_directory/var/log/" ]; then
        debug "didn't find /var/log/";
        return;
    fi

    local results="";
    for regex in "${failed_regexes[@]}"; do
        hits=$(find "$root_directory/var/log/" -type f -iname "*httpaccess*" -exec zgrep -HEi "$regex" {} \;);
        # ref: https://stackoverflow.com/a/3182519/87207
        results="$results"$'\n'"$hits";
    done

    local readonly deduped_results=$(echo "$results" | grep -E [a-zA-Z0-9]| sort | uniq);
    local readonly result_count=$(echo "$results" | grep -E [a-zA-Z0-9]| sort | uniq | wc -l);

    if [ $result_count -gt 0 ]; then
        report_failed_exploitation "web access logs show $result_count instances of failed HTTP exploitation";
        report "web access log entries:"
        report "$deduped_results";
    else
        debug "no instances of failed exploitation found in HTTP access logs";
    fi
}

scan_failed_exploitation() {
    failed_exploitation;
}