Exploit databaseDownload repository ZIP
GH-b1c97b615191ef07cf017697fcfd48a2
citrix/ioc-scanner-cve-2019-19781
Sources for CVE-2019-19781
47 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files11
citrix/ioc-scanner-cve-2019-19781Revision df7e51b5a3a4
- ↑..Parent directory
- access-logs.sh
- cron-history.sh
- crontab.sh
- error-logs.sh
- failed-exploitation.sh
- fs-paths.sh
- netscaler-content.sh
- ports.sh
- processes.sh
- shell-history.sh
- successful-scanning.sh
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;
}