Skip to content

intrafind/if-log4shell-updater

Repository files navigation

Log4shell Updater Documentation

English

In order to close vulnerabilities related to the log4shell problem (CVE-2021-44228) we provide a tool to detect and (if possible) fix files and libraries within installations of iFinder components.

Important
  • This tool must be applied to all IntraFind components on all servers of your installation.

  • This tool is an effort to detect places where action is needed in an automated way. Depending on the details of your installation there might still be vulnerabilities that this tool cannot detect. Please do use this tool in combination with other scanners to guarantee a complete result.

What exactly does the tool do?

The tool scans the specified directory including all subdirectories and reacts to potential log4shell vulnerabilities as follows:

  • log4j2 program libraries (jar files) of version 2.16 or lower are automatically replaced by the corresponding jars in version 2.17.

  • <if-elasticsearch-install-dir>/bin/elasticsearch-sql-cli-xx.yy.zz.jar. This file contains an embedded version of log4j-2.x. It is not needed and will be removed automatically.

  • All other jar files that contain a vulnerable version of log4j2 in embedded form will have the class org.apache.logging.log4j.core.lookup.JndiLookup removed.

Compatible iFinder versions

  • 5.2.0.3

  • 5.3.3, 5.3.4, 5.3.5

  • 5.4.0, 5.4.1, 5.4.2, 5.4.3, 5.4.4, 5.4.5, 5.4.6

  • 5.5.0

If your iFinder version is not listed here, please contact the IntraFind support team.

How to apply the tool step-by-step:

Windows:

Step 1:

You can download a tool to automatically replace the jars here: https://intrafind.org/log4j/. Save the tool to C:\tmp\.

Important

Do not save the tool to the directory you want to process!

The source code, changelog and documentation can be accessed on GitHub.

Step 2:

Stop all components: services, web application (Tomcat), connectors, monitoring, OCR and all others.

Step 3:

Apply the tool to all installation directories on all servers. Usually, the components are installed under a common installation directory such as C:\IntraFind\ - applying the tool to this directory is sufficient to update all components stored in it.

  1. Open a console (cmd) as administrator.

  2. Change to the C:\tmp\ folder and run the tool as follows. Adjust the paths if necessary and run the tool repeatedly for multiple paths if necessary.

    C:\IntraFind\jdk\bin\java -jar if-log4shell-updater-2.0.0-jar-with-dependencies.jar -p C:\IntraFind
Step 4:

There may be other files in your installation that are classified as questionable by your scanner.

  • hostid.jar: This file was needed to initially create a license that matches your system. It can safely be deleted.

Step 5:

Start all components and check if the application is working properly.

Step 6:

Run the tool again with an additional -b option to delete the backup files that were generated in the first run.

C:\IntraFind\jdk\bin\java -jar if-log4shell-updater-2.0.0-jar-with-dependencies.jar -p C:\IntraFind -b

Linux:

Step 1:

You can download a tool to automatically replace the jars here: https://intrafind.org/log4j/. Save the tool to /tmp/.

Important

Do not save the tool to the directory you want to process!

The source code, changelog and documentation can be accessed on GitHub.

Step 2:
  1. Open a console as the user under which the IntraFind components are run.

  2. Change to the /tmp/ folder and run the tool as follows. Adjust the paths if necessary and run the tool repeatedly for multiple paths if necessary.

    /opt/intrafind/jdk/bin/java -jar if-log4shell-updater-2.0.0-jar-with-dependencies.jar -p /opt/intrafind
Step 3:

There may be other files in your installation that are classified as questionable by your scanner. The following files can be safely be deleted:

  • hostid.jar: This file was needed to initially create a license that matches your system. It can safely be deleted.

Step 5:

Restart all components and check if the application is working properly.

Step 6:

Run the tool again with an additional -b option to delete the backup files that were generated in the first run.

/opt/intrafind/jdk/bin/java -jar if-log4shell-updater-2.0.0-jar-with-dependencies.jar -p /opt/intrafind -b

Deutsch

Um Schwachstellen im Zusammenhang mit dem log4shell-Problem (CVE-2021-44228) zu schließen, stellen wir ein Tool zur Verfügung, um Dateien und Bibliotheken in Installationen von iFinder-Komponenten zu erkennen und (wenn möglich) zu reparieren.

Important
  • Dieses Tool muss auf alle IntraFind-Komponenten auf allen Servern Ihrer Installation angewendet werden.

  • Mit diesem Tool wird versucht, auf automatisierte Weise zu erkennen, wo Handlungsbedarf besteht. Je nach den Details Ihrer Installation kann es immer noch Schwachstellen geben, die dieses Tool nicht erkennen kann. Bitte verwenden Sie dieses Tool in Kombination mit anderen Scannern, um ein vollständiges Ergebnis zu gewährleisten.

Was genau macht das Tool?

Das Tool durchsucht das angegebene Verzeichnis einschließlich aller Unterverzeichnisse und reagiert wie folgt auf potenzielle log4shell-Schwachstellen:

  • log4j2-Programmbibliotheken (jar-Dateien) der Version 2.15 oder niedriger werden automatisch durch die entsprechenden jars in Version 2.17 ersetzt.

  • <if-elasticsearch-install-dir>/bin/elasticsearch-sql-cli-xx.yy.zz.jar. Diese Datei enthält eine eingebettete Version von log4j-2.x. Sie ist nicht erforderlich und wird automatisch entfernt.

  • Allen anderen jar-Dateien, die eine angreifbare Version von log4j2 in eingebetteter Form enthalten, wird die Klasse org.apache.logging.log4j.core.lookup.JndiLookup entfernt.

Kompatible iFinder-Versionen

  • 5.2.0.3

  • 5.3.3, 5.3.4, 5.3.5

  • 5.4.0, 5.4.1, 5.4.2, 5.4.3, 5.4.4, 5.4.5, 5.4.6

  • 5.5.0

Falls Sie eine andere iFinder Version betreiben, kontaktieren Sie bitte den IntraFind Support.

So wenden Sie das Tool Schritt für Schritt an:

Windows:

Schritt 1:

Sie können das Tool zum automatischen Ersetzen der jar-Dateien hier herunterladen: https://intrafind.org/log4j/. Speichern Sie das Programm unter C:\tmp\.

Important

Speichern Sie das Tool nicht in dem Ordner, den Sie bereinigen wollen!

Der Quellcode, das Changelog und die Dokumentation können auf GitHub eingesehen werden.

Schritt 2:

Stoppen Sie alle Komponenten: Dienste, Webanwendung (Tomcat), Konnektoren, Monitoring, OCR und alle anderen.

Schritt 3:

Wenden Sie das Tool auf alle Installationsverzeichnisse auf allen Servern an. Normalerweise werden die Komponenten in einem gemeinsamen Installationsverzeichnis installiert, z. B. C:\IntraFind\ - die Anwendung des Tools auf dieses Verzeichnis reicht aus, um alle darin gespeicherten Komponenten zu aktualisieren.

  1. Öffnen Sie eine Konsole (cmd) als Administrator.

  2. Wechseln Sie zum Ordner C:\tmp\ und führen Sie das Tool wie folgt aus. Passen Sie die Pfade gegebenenfalls an und führen Sie das Werkzeug bei Bedarf wiederholt für mehrere Pfade aus.

    C:\IntraFind\jdk\bin\java -jar if-log4shell-updater-2.0.0-jar-with-dependencies.jar -p C:\IntraFind
Schritt 4:

Möglicherweise befinden sich in Ihrer Installation weitere Dateien, die von Ihrem Scanner als fragwürdig eingestuft werden.

  • hostid.jar: Diese Datei wurde benötigt, um anfangs eine Lizenz zu erstellen, die zu Ihrem System passt. Sie kann sicher gelöscht werden.

Schritt 5:

Starten Sie alle Komponenten und prüfen Sie, ob die Anwendung ordnungsgemäß funktioniert.

Schritt 6:

Führen Sie das Tool erneut mit einer zusätzlichen -b Option aus, um die im ersten Lauf generierten Backupdateien zu entfernen.

C:\IntraFind\jdk\bin\java -jar if-log4shell-updater-2.0.0-jar-with-dependencies.jar -p C:\IntraFind -b

Linux:

Schritt 1:

Sie können das Tool zum automatischen Ersetzen der jar-Dateien hier herunterladen: https://intrafind.org/log4j/. Speichern Sie das Programm unter /tmp/.

Important

Speichern Sie das Tool nicht in dem Ordner, den Sie bereinigen wollen!

Der Quellcode, das Changelog und die Dokumentation können auf GitHub eingesehen werden.

Schritt 2:

Wenden Sie das Tool auf alle Installationsverzeichnisse auf allen Servern an. Normalerweise werden die Komponenten in einem gemeinsamen Installationsverzeichnis installiert, z. B. /opt/intrafind/ - die Anwendung des Tools auf dieses Verzeichnis reicht aus, um alle darin gespeicherten Komponenten zu aktualisieren.

  1. Öffnen Sie eine Konsole als der Benutzer, unter dem die IntraFind-Komponenten ausgeführt werden.

  2. Wechseln Sie in den Ordner /tmp/ und führen Sie das Programm wie folgt aus. Passen Sie die Pfade gegebenenfalls an und führen Sie das Werkzeug bei Bedarf wiederholt für mehrere Pfade aus.

    /opt/intrafind/jdk/bin/java -jar if-log4shell-updater-2.0.0-jar-with-dependencies.jar -p /opt/intrafind
Schritt 3:

Möglicherweise befinden sich in Ihrer Installation weitere Dateien, die von Ihrem Scanner als fragwürdig eingestuft werden. Die folgenden Dateien können sicher gelöscht werden:

  • hostid.jar: Diese Datei wurde benötigt, um anfangs eine Lizenz zu erstellen, die zu Ihrem System passt. Sie kann sicher gelöscht werden.

Schritt 4:

Starten Sie alle Komponenten neu und prüfen Sie, ob die Anwendung ordnungsgemäß funktioniert.

Schritt 5:

Führen Sie das Tool erneut mit einer zusätzlichen -b Option aus, um die im ersten Lauf generierten Backupdateien zu entfernen.

/opt/intrafind/jdk/bin/java -jar if-log4shell-updater-2.0.0-jar-with-dependencies.jar -p /opt/intrafind -b

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages