
私のCitrix ADC NetScaler CVE-2019-19781脆弱性DFIRノート。
Splunk の視点に基づいています。 以下のリソースは、侵害の指標 (IoC) を適切に分析するためにログを取り込むことが不可欠であることを示しています。 良い危機を無駄にするな...すべてのログを取り込め!
ロジックの脆弱性により、認証前リモートで任意のコマンドが実行可能(信頼性の高い実行が可能)。
https://support.citrix.com/article/CTX267027 https://www.fireeye.com/blog/threat-research/2020/01/vigilante-deploying-mitigation-for-citrix-netscaler-vulnerability-while-maintaining-backdoor.html https://www.trustedsec.com/blog/netscaler-remote-code-execution-forensics/ http://deyda.net/index.php/en/2020/01/15/checklist-for-citrix-adc-cve-2019-19781/ https://github.com/x1sec/CVE-2019-19781/blob/master/CVE-2019-19781-DFIR.md https://nvd.nist.gov/vuln/detail/CVE-2019-19781 https://www.reddit.com/r/blueteamsec/comments/en4m7j/multiple_exploits_for_cve201919781_citrix/ オランダNCSC: https://english.ncsc.nl/latest/news/2020/january/20/install-patches-for-citrix-adc-en-citrix-gateway-servers https://www.ncsc.nl/actueel/advisory?id=NCSC%2D2019%2D0979 NCSCのフローチャート: https://english.ncsc.nl/binaries/ncsc-en/documents/publications/2020/januari/21/flowchart-citrix-vulnerability/Flowchart+Citrix+vulnerability.pdf ほとんどの組織、サイト、企業は同じことを繰り返している... :-( 私と同じように ;-)
/var/log/httpaccess.log | /var/log/httperror.log | /etc/httpd.conf | /var/log/websocketd.log をダンプファイルおよびNetScalerからのsyslogデータから確認。成功したエクスプロイトを示すWebサーバーログエントリをチェック...
既知のマルウェアのファイルシステムパスを確認
選択: c-uri-path: - '/../vpns/' - '/vpns/cfg/smb.conf' - '/vpns/portal/scripts/.pl' および考えられる他のすべてのバリアント。 NetScalerのディレクトリ内で悪意のある用語や予期しない変更を探す。
/shell/crontab-l.out
/shell/top-b.out + その他
/var/log/bash.log をダンプファイルから確認、および index=yourindex host=yournetscalerhosts (bash.log と sh.log) シェル履歴でのポストエクスプロイトをすべてチェック...
/shell/sockstat.out およびその他の方法。既知のマルウェアが使用するポートをチェック。
index=yourshodanindex asn=yourASN# CVE-2019-19781 vulns.CVE-2019-19781.verified=true
コメントなし 😅
Splunkで確認(Sigmaルールに基づく-->https://github.com/Neo23x0/sigma/blob/master/rules/web/web_citrix_cve_2019_19781_exploit.yml#L17 detection: selection: c-uri-path: - '/../vpns/' - '/vpns/cfg/smb.conf' - '/vpns/portal/scripts/.pl' condition: selection fields:
その他の可能性のあるIoC:
昨夜、Citrix #netscaler CVE-2019-19781 ハニーポットで新しいバックドアにヒットしました。これは、IRC経由で通信するDDoSボットです。50.71.90.246:4545 への接続と /tmp/.perl という名前のファイルに注意してください。
何か見逃している場合は、IoCやその他の確認事項を追加してください。#Sh*trix
#ハニーポットログからSplunkへ https://github.com/x1sec/citrix-honeypot
結果/データは ./log ディレクトリに書き込まれます。内容は以下の通りです: hits.log - スキャン試行とエクスプロイト試行(ヘッダー、POST本文などの全データを含む) all.log - サーバーに到達したすべてのHTTPリクエスト logins.log - Webインターフェースへのログイン試行 tlsErrors.log - インターネットスキャナーがポート443に無効なデータを送信することがよくあります。HTTPSエラーはここに記録されます。
#アップデート
Citrixは2020年1月23日にパッチをリリース: https://www.citrix.com/blogs/2020/01/23/fixes-now-available-for-citrix-adc-citrix-gateway-versions-12-1-and-13-0/
NetScalerを新規インストールした後、Splunk Universal Forwarderをインストールします。(FreeBSDインストール) ドキュメント: https://docs.splunk.com/Documentation/Forwarder/8.0.1/Forwarder/Installanixuniversalforwarder#Install_the_universal_forwarder_on_FreeBSD バイナリ: https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64&platform=freebsd&version=8.0.1&product=universalforwarder&filename=splunkforwarder-8.0.1-6db836e2fb9e-freebsd-11.1-amd64.txz&wget=true
Citrix NetScalerがsyslogデータを生成するように構成する方法: https://docs.splunk.com/Documentation/AddOns/released/CitrixNetscaler/Setup https://docs.citrix.com/en-us/citrix-adc/12-1/system/audit-logging/configuring-audit-logging.html
Splunk Add-On for Citrix Netscaler: https://splunkbase.splunk.com/app/2770/