Citrix ADC and Citrix Gateway Security Bulletin for CVE-2022-27507 and CVE-2022-27508

Citrix ADC and Citrix Gateway Security Bulletin for CVE-2022-27507 and CVE-2022-27508

Description of Problem

Vulnerabilities have been discovered in Citrix ADC and Citrix Gateway that, if exploited, could result in a denial of service. 

These vulnerabilities have the following identifiers: 

CVE-ID  Description  CWE  Pre-conditions 
CVE-2022-27507 Authenticated denial of service CWE-400: Uncontrolled Resource Consumption   VPN (Gateway) virtual server with  DTLS, and  either ‹HDX Insight for EDT traffic› or ‹SmartControl› is configured 
CVE-2022-27508 Unauthenticated denial of service CWE-400: Uncontrolled Resource Consumption   Appliance must be configured as a VPN (Gateway) or AAA virtual server 

Für detaillierte Informationen und weitere Schritte, folgen Sie bitte den Informationen im Original Citrix Artikel.


Virtual Apps and Desktops

Virtual Apps and Desktops

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

Proböembeschreibung

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

Betroffene Systeme

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

Lösung

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

CVE-2020-8299 L2 Network-based denial-of-service

CVE-2020-8299 L2 Network-based denial-of-service

Description of Problem

Multiple vulnerabilities have been discovered in Citrix ADC (formerly known as NetScaler ADC), Citrix Gateway (formerly known as NetScaler Gateway) and Citrix SD-WAN WANOP appliance models 4000-WO, 4100-WO, 5000-WO, and 5100-WO. These vulnerabilities, if exploited, could result in the following security issues:

CVE-IDDescriptionCWEAffected ProductsPre-conditions
CVE-2020-8299Network-based denial-of-service from within the same Layer 2 network segment CWE-400: Uncontrolled Resource ConsumptionCitrix ADC, Citrix Gateway, Citrix SD-WAN WANOPThe attacker machine must be in the same Layer 2 network segment as the vulnerable appliance 

The following supported versions of Citrix ADC, Citrix Gateway and Citrix SD-WAN WANOP are affected by CVE-2020-8299:

  • Citrix ADC and Citrix Gateway 13.0 before 13.0-76.29
  • Citrix ADC and Citrix Gateway 12.1 before 12.1-61.18
  • Citrix ADC and NetScaler Gateway 11.1 before 65.20
  • Citrix ADC 12.1-FIPS before 12.1-55.238
  • Citrix SD-WAN WANOP 11.4 before 11.4.0
  • Citrix SD-WAN WANOP 11.3 before 11.3.2
  • Citrix SD-WAN WANOP 11.3 before 11.3.1a
  • Citrix SD-WAN WANOP 11.2 before 11.2.3a
  • Citrix SD-WAN WANOP 11.1 before 11.1.2c
  • Citrix SD-WAN WANOP 10.2 before 10.2.9a

What Customers Should Do

The following supported versions of Citrix ADC, Citrix Gateway, and Citrix SD-WAN WANOP address CVE-2020-8299, a Medium severity vulnerability.  

  • Citrix ADC and Citrix Gateway 13.0-76.29 and later releases of 13.0 
  • Citrix ADC and Citrix Gateway 12.1-61.18 and later releases of 12.1 
  • Citrix ADC and NetScaler Gateway 11.1-65.20 and later releases of 11.1 
  • Citrix ADC 12.1-FIPS 12.1-55.238 and later releases of 12.1-FIPS 
  • Citrix SD-WAN WANOP 11.4.0 and later releases of 11.4 
  • Citrix SD-WAN WANOP 11.3.2 and later releases of 11.3 
  • Citrix SD-WAN WANOP 11.3.1a and later releases of 11.3 
  • Citrix SD-WAN WANOP 11.2.3a and later releases of 11.2 
  • Citrix SD-WAN WANOP 11.1.2c and later releases of 11.1 
  • Citrix SD-WAN WANOP 10.2.9a and later releases of 10.2 
Citrix ADC and Citrix Gateway Security Bulletin for CVE-2022-27507 and CVE-2022-27508

CVE-2020-8300 SAML authentication hijack through phishing ATTACK

To all customer with SAML authentication!

AXACOM encourage all customer with SAML authentication to have a close look at CVE-2020-8300 and implement the described measures to fix the issue, as soon as possible.

Description of Problem

Multiple vulnerabilities have been discovered in Citrix ADC (formerly known as NetScaler ADC), Citrix Gateway (formerly known as NetScaler Gateway) and Citrix SD-WAN WANOP appliance models 4000-WO, 4100-WO, 5000-WO, and 5100-WO. These vulnerabilities, if exploited, could result in the following security issues:

CVE-IDDescriptionCWEAffected ProductsPre-conditions
CVE-2020-8300SAML authentication hijack through a phishing attack to steal a valid user sessionCWE-284: Improper access controlCitrix ADC, Citrix GatewayCitrix ADC or Citrix Gateway must be configured as a SAML SP or a SAML IdP

The following supported versions of Citrix ADC and Citrix Gateway are affected by CVE-2020-8300:

  • Citrix ADC and Citrix Gateway 13.0. before 13.0-82.41
  • Citrix ADC and Citrix Gateway 12.1 before 12.1-62.23
  • Citrix ADC and NetScaler Gateway 11.1 before 11.1-65.20
  • Citrix ADC 12.1-FIPS before 12.1-55.238

What Customers Should Do

The following supported versions of Citrix ADC and Citrix Gateway address CVE-2020-8300, a High severity vulnerability.  

  • Citrix ADC and Citrix Gateway 13.0-82.41 and later releases of 13.0 
  • Citrix ADC and NetScaler Gateway ADC 12.1-62.23 and later releases of 12.1 
  • Citrix ADC and NetScaler Gateway 11.1-65.20 and later releases of 11.1 
  • Citrix ADC 12.1-FIPS 12.1-55.238 and later releases of 12.1-FIPS 
  • Citrix ADC and Citrix Gateway 13.0-82.41 and later releases of 13.0 
  • Citrix ADC and NetScaler Gateway ADC 12.1-62.23 and later releases of 12.1 
  • Citrix ADC and NetScaler Gateway 11.1-65.20 and later releases of 11.1 
  • Citrix ADC 12.1-FIPS 12.1-55.238 and later releases of 12.1-FIPS 
  • Citrix ADC and Citrix Gateway 13.0-82.41 and later releases of 13.0 
  • Citrix ADC and NetScaler Gateway ADC 12.1-62.23 and later releases of 12.1 
  • Citrix ADC and NetScaler Gateway 11.1-65.20 and later releases of 11.1 
  • Citrix ADC 12.1-FIPS 12.1-55.238 and later releases of 12.1-FIPS 

NOTE: In addition, upon upgrading to the fixed version, customers must modify the device configuration to resolve CVE-2020-8300. See Citrix Application Delivery Controller and Citrix Gateway – SAML Configuration Reference Guide for details. 

ACHTUNG:

Das Update von Firmware Versionen kleiner, oder gleich 12.1.59.x, bzw. 13.0.64.35 führt dazu, dass der SSO für viele Anwendungen nicht mehr funktioniert. Vor dem Update sollte daher unbedingt folgender Citrix eDocs Artikel gelesen werden: Enable SSO for Basic, Digest, and NTLM authentication (citrix.com)

Citrix ADC and Citrix Gateway Security Bulletin for CVE-2022-27507 and CVE-2022-27508

Schwachstelle in Citrix NetScaler und Citrix Gateway

Letzte Aktualisierung: Samstag-25.1.2020 – 20:15
Version: 1.5

Problembeschreibung

In Citrix Application Delivery Controller (ADC), früher bekannt als NetScaler ADC und Citrix Gateway, wurde eine Schwachstelle entdeckt, die, wenn sie ausgenutzt wird, einem nicht authentifizierten Angreifer die Ausführung von beliebigem Code ermöglichen könnte.
Die Schwachstelle wurde mit der folgenden CVE-Nummer versehen: CVE-2019-19781

Betroffene Systeme

  • Citrix ADC und Citrix Gateway Version 13.0 alle unterstützten Builds
  • Citrix ADC und NetScaler Gateway Version 12.1 alle unterstützten Builds
  • Citrix ADC und NetScaler Gateway Version 12.0 alle unterstützten Builds
  • Citrix ADC und NetScaler Gateway Version 11.1 alle unterstützten Builds
  • Citrix NetScaler ADC und NetScaler Gateway Version 10.5 alle unterstützten Builds

Citrix Patch verfügbar

Citrix hat diese Woche begonnen die Patches für alle verfügbaren Version zu veröffentlichen. Es stehen nun für alle Citrix ADC Versionen, sowie Citrix SD-WAN ein Patch zum download zur Verfügung.

Weiter Informationen entnehmen Sie bitte dem nachfolgenden Artikerl.


Wichtiger Nachtrag!

Bitte kontrollieren Sie ob bei Ihnen folgender Release zum Einsatz kommt:
Citrix ADC 12.1 51.16/51.19
Citrix ADC 12.1 50.31

Bei diesen beiden Versionen funktionieren die hier beschriebene Lösungsansatz NICHT! Bitte aktualisieren Sie auf die aktuelle 12.1 Version. Danach können Sie mit dem Workaround weiterfahren. Bitte beachten Sie, dass auch diese Version noch immer den eigentlichen Fehler beinhaltet.


Ist mein System betroffen?

Die starke Medienpräsenz hat dazu geführt, dass sich die Angriffe potentiell erhöht haben. Da viele Systeme, die bis zum heutigen Tag noch nicht abgesichert wurden, tatsächlich gehackt wurden, besteht dringender Bedarf bei allen Betreibern eines Citrix ADC zu analysieren ob Sie betroffen sind und Gegenmassnahmen einzuleiten.

Ob Ihr ADC angreifbar ist, können Sie mittels eines simplen CURL Befehles feststellen

curl -v https://MeineGatewayURL.company.com/vpn/../vpns/cfg/smb.conf –path-as-is

Ausserdem wurden folgende Test Methoden beschrieben und veröffentlicht:
• https://github.com/projectzeroindia/CVE-2019-19781
• https://github.com/trustedsec/cve-2019-19781/
• https://support.citrix.com/article/CTX267027
• https://www.virustotal.com/gui/file/2052f1e7830e2d86a356a0532d3c2728b88d674a4384727ea7df1d3522a5ed05

Wurden vom Attacker CronTab Jobs hinterlegt?

Überprüfen Sie ob Angreifer auf Ihre  Cron-Jobs“ im BSD Zugriff erhalten haben um Zugriff auch  dann weiterhin zu erhalten nachdem  wenn die Lücke  behoben wurde. Überprüfen Sie Ihre Crontab-Datei:

cat /etc/crontab
crontab -l -u nobody

Finden Sie crontab jobs die unter dem Benutzer “nobody laufen” oder die sich nicht kennen und die dort nicht hingehören  so wurde Ihr System gehackt und Gegenmassnahmen müssen getroffen werden.

Überprüfen Sie Ihre HTTP access logs ob Verdächtige Zugriffe stattgefunden haben:

Mithilfe der folgenden Befehle können Sie Überprüfen ob Ihr System kompromittiert wurde:

gzcat /var/log/httpaccess.log.*.gz | grep vpns | grep xml
gzcat /var/log/httpaccess.log.*.gz | grep “/\.\./”
cat /var/log/httpaccess.log | grep vpns | grep xml
cat /var/log/httpaccess.log | grep “/\.\./”

Sehen Sie verdächtige .xml uploads in den Logs oder sehen Sie Zugriffe die in den URLs /../ enthalten, so wurde Ihr System attackiert und Gegenmassnahmen müssen dringend ergriffen werden.

Überprüfen der Template Dateien:

Die am häufigsten gesehene Attacke kann nachgewiesen werden, indem überprüft wird, ob verdächtige .xml Dateien auf Ihren ADC hochgeladen wurden.

Mit Hilfe der folgenden Befehle können Sie das überprüfen:

ls -lh /var/vpn/bookmark/*.xml
ls -lh /netscaler/portal/templates/*.xml
ls -lh /var/tmp/netscaler/portal/templates

Finden Sie in den Verzeichnissen verdächtige .html, .html.ttc2 oder andere Dateien die dort nicht liegen sollten 
so wurde Ihr System attackiert und Gegenmassnahmen müssen dringend ergriffen werden.

Überprüfen ob Backdoor Skripte  Implementiert wurden:

Backdoor Skripten oder anderen böswilligen Aufgaben können  als Perl- oder Python-Skript Ihr System Infizieren.
So überprüfen Sie, ob aktive Perl- oder Python-Tasks ausgeführt werden:

ps -aux | grep python
ps -aux | grep perl

Überprüfen ob fremde Dienste oder Crypto Miner  Implementiert wurden:

In einigen Fällen wurde versucht Crypto Miner und andere Dienste zu installieren.
Sie können diese identifizieren, indem Sie sich die CPU-intensiven Prozesse ansehen und bewerten:

top -n 10

Sollten Sie andere Prozesse als NSPPE-00, NSPPE-01, NSPPE-002 NSPPE-03, NSPPE-04, NSPPE-05 sehen, die eine hohe CPU-Auslastung aufweisen,
so haben Sie möglicherweise einen Crypto Miner gefunden!

Problembehebung

Die folgenden Konfigurationsänderungen dienen der Abschwächung der oben genannten Schwachstelle.

Standalone System

Führen Sie die folgenden Befehle über die Befehlszeilenschnittstelle der Appliance aus, um eine Responder-Aktion und -Richtlinie zu erstellen:

enable ns feature responder
add responder action respondwith403 respondwith "\"HTTP/1.1 403 Forbidden\r\n\r\n\""
add responder policy ctx267027 "HTTP.REQ.URL.DECODE_USING_TEXT_MODE.CONTAINS(\"/vpns/\") && (!CLIENT.SSLVPN.IS_SSLVPN || HTTP.REQ.URL.DECODE_USING_TEXT_MODE.CONTAINS(\"/../\")) || http.req.header(\"NSC_USER\").Contains(\"/../\") || http.req.header(\"NSC_NONCE\").Contains(\".pl\")" respondwith403
bind responder global ctx267027 1 END -type REQ_OVERRIDE
save config .

Stellen Sie sicher, dass die Änderungen auch für die Management-Schnittstellen gelten. Führen Sie von der Kommandozeilenschnittstelle aus die folgenden Befehle aus.

shell nsapimgr_wr.sh -ys skip_systemaccess_policyeval=0
shell "echo 'nsapimgr_wr.sh -ys skip_systemaccess_policyeval=0' >> /nsconfig/rc.netscaler"
reboot

HA Pair

On Primary:

enable ns feature responder
add responder action respondwith403 respondwith "\"HTTP/1.1 403 Forbidden\r\n\r\n\""
add responder policy ctx267027 "HTTP.REQ.URL.DECODE_USING_TEXT_MODE.CONTAINS(\"/vpns/\") && (!CLIENT.SSLVPN.IS_SSLVPN || HTTP.REQ.URL.DECODE_USING_TEXT_MODE.CONTAINS(\"/../\")) || http.req.header(\"NSC_USER\").Contains(\"/../\") || http.req.header(\"NSC_NONCE\").Contains(\".pl\")" respondwith403
bind responder global ctx267027 1 END -type REQ_OVERRIDE
save config 
shell nsapimgr_wr.sh -ys skip_systemaccess_policyeval=0
shell "echo 'nsapimgr_wr.sh -ys skip_systemaccess_policyeval=0' >> /nsconfig/rc.netscaler"
reboot

Auf dem sekundären System, nachdem das primäre System wieder erreichbar ist:

shell nsapimgr_wr.sh -ys skip_systemaccess_policyeval=0
shell "echo 'nsapimgr_wr.sh -ys skip_systemaccess_policyeval=0' >> /nsconfig/rc.netscaler"
reboot