
내 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 from dumpfiles and our syslog data from Netscalers. Check Webserver log entries indicating successful exploitation...
알려진 악성코드의 파일 시스템 경로 확인
selection: c-uri-path: - '/../vpns/' - '/vpns/cfg/smb.conf' - '/vpns/portal/scripts/.pl' and all other variants you can think of. Netscaler 디렉토리에서 악성 용어 및 예상치 못한 수정 사항을 찾습니다.
/shell/crontab-l.out
/shell/top-b.out + others
/var/log/bash.log from dumpfile & index=yourindex host=yournetscalerhosts (bash.log & sh.log) 기본적으로 셸 히스토리에서 모든 사후 익스플로잇을 확인...
/shell/sockstat.out and other methods. 알려진 악성코드가 사용하는 포트 확인.
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 - 웹 인터페이스에 로그인 시도 tlsErrors.log - 인터넷 스캐너가 종종 포트 443에 잘못된 데이터를 보냅니다. HTTPS 오류가 여기에 기록됩니다.
#업데이트
Citrix가 2020-01-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
Citrix Netscaler용 Splunk Add-On: https://splunkbase.splunk.com/app/2770/