Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Einreichen
ToolsExploitsBlog
Einreichen

Hacking-, PenTest- und Cybersicherheits-Tools für Ihr Sicherheitsarsenal!

Kitploit ist ein Verzeichnis von Hacking-, Cybersicherheits- und Pentesting-Tools. Entdecken Sie die neuesten Projekt-Updates, um Schwachstellen zu finden, Systeme zu analysieren, Tests zu automatisieren und Ihre Sicherheit zu stärken.

··Feeds·Kontakt·Datenschutz·© 2026 Kitploit

Tool-Verzeichnis

Kategorien

Alle Kategorien anzeigen
Loading categories
log4j-cve-2021-44228 — Ein Ansible-Playbook, das das Log4j-Erkennungsskript von Red Hat automatisiert, um Linux-Hosts auf die CVE-2021-44228 (Log4Shell)-Schwachstelle mit GPG-Verifizierung zu scannen. | Kitploit
Tools/GitHubGitHub/lucab85/log4j-cve-2021-44228
SchwachstellenscannerSchwachstellenanalyseScripting & AutomatisierungKonfigurationsprüfungCloud-SicherheitDevSecOps
GitHublucab85/log4j-cve-2021-44228

log4j-cve-2021-44228

Ein Ansible-Playbook, das das Log4j-Erkennungsskript von Red Hat automatisiert, um Linux-Hosts auf die CVE-2021-44228 (Log4Shell)-Schwachstelle mit GPG-Verifizierung zu scannen.

Repository anzeigen
571012vor 4 JahrenVon Kitploit geprüft
Webseite

Beliebteste

Alle anzeigen →

Entdecken Sie die meistgenutzten Tools unserer Community.

Alle Tools erkunden

Durchsuchen Sie unsere Tool-Sammlung

Alle Tools anzeigen →
Teilen

Log4j-CVE-2021-44228 Detektor-Scanner-Playbook

CI

Ansible-Playbook zur Überprüfung von Ziel-Linux-Hosts mithilfe des offiziellen Red Hat Log4j-Detektorskripts für Log4Shell (CVE-2021-44228).

Red Hat Detektor Version 1.3 vom 2022-01-10.

Das Ergebnis wird in einer txt-Datei unter detector_dir gespeichert (Standard: /opt/cve-2021-44228/).

Ansible-Galaxy-Rolle

Code ist auch als Ansible-Galaxy-Rolle verfügbar lucab85.ansible_role_log4shell```bash ansible-galaxy install lucab85.ansible_role_log4shell

## So führen Sie das Ansible Playbook aus

Die Standardvariablen durchsuchen den gesamten `/var/`-Pfad nach betroffenen Dateien.
Sie können die Datei `vars.yml` für weitere Optionen anpassen.```bash
ansible-playbook log4j-cve-2021-44228.yml

Abhängigkeiten

Keine.

Anforderungen

ansible 2.9+

Variablen vars.yml

Standardwerte:```yaml rh_bullettin: >- https://access.redhat.com/security/vulnerabilities/RHSB-2021-009 intro: | Ansible Playbook tested with detector version 1.3 released 2022-01-10. If a 404 error occur please adjust the URL with the latest version available for detector URL. Please refer to the Red Hat Security Bullettin for up-to-date information and adjust the playbook variables accordingly. {{ rh_bullettin }}. vulnerable: | System MIGHT be vulnerable to log4j (CVE-2021-44228) not_vulnerable: | System IS NOT vulnerable to log4j (CVE-2021-44228) report_txt: "/report/vuln_log4j2_path_*.txt" sh_detector: "cve-2021-44228--2022-01-10-1242.sh" sh_signature: "cve-2021-44228--2022-01-10-1242.sh.asc" detector_baseurl: "https://access.redhat.com/sites/default/files/" force_download: false detector_path: "/var/" detector_dir: "/opt/cve-2021-44228/" detector_run_dir: "tmp" detector_options: '-n -d --no-progress --scan {{ detector_path }}' gpg_keyid: "7514F77D8366B0D9" gpg_server: "pgp.mit.edu" gpg_public_key: 'gpg --keyserver {{ gpg_server }} --recv {{ gpg_keyid }}' clean_run_before: true delete_after: false verify_gpg: true

- `rh_bullettin`: Link des RHSB (Standard: [https://access.redhat.com/security/vulnerabilities/RHSB-2021-009](https://access.redhat.com/security/vulnerabilities/RHSB-2021-009))
- `intro`: Einleitungstext
- `vulnerable`: verwundbarer Text (nur sichtbar bei Ausführung mit Debug-Level 2 `-vv`)
- `not_vulnerable`: NICHT verwundbarer Text (nur sichtbar bei Ausführung mit Debug-Level 2 `-vv`)
- `report_txt`: auszugebender Berichtspfad (Standard: `/report/vuln_log4j2_path_*.txt`)
- `sh_detector`: der Dateiname der Bash-Skriptdatei des Detektors
- `sh_signature`: der Dateiname der GPG-Signaturdatei des Detektors
- `detector_baseurl`: die Basis-URL zum Herunterladen der vorherigen Dateien
- `force_download`: erzwingt das Herunterladen des Codes bei jedem Lauf (Standard: `false`)
- `detector_path`: der zu untersuchende Pfad (Standard `/var/`)
- `detector_dir`: der Download-Pfad des Detektors (Standard `/opt/cve-2021-44228/`)
- `detector_run_dir`: das Unterverzeichnis, das vor dem Lauf erstellt werden soll (Standard `tmp`)
- `detector_options`: die Befehlszeilenoptionen für das Detektor-Skript (Standard: `-n -d --no-progress --scan {{ detector_path }}`)
- `gpg_keyid`: der öffentliche GPG-Schlüssel zum Herunterladen für die Verifizierung (Standard Red Hat Product Security `7514F77D8366B0D9`)
- `gpg_server`: der GPG-Schlüsselserver (Standard: `pgp.mit.edu`)
- `gpg_public_key`: Befehl zur GPG-Verifizierung (Standard: `gpg --keyserver {{ gpg_server }} --recv {{ gpg_keyid }}`)
- `clean_run_before`: das Laufverzeichnis vor der Ausführung entfernen und neu erstellen - der Detektor benötigt ein leeres Verzeichnis (Standard `true`)
- `delete_after`: das _detector_dir_ nach der Ausführung entfernen (Standard `false`)
- `verify_gpg`: den GPG-Signaturdownload und die Verifizierung durchführen (Standard: `true`)

## Demo-Ausführung

Die vollständige Ausgabe der Ausführung des Playbooks gegen den RHEL8-Demo-Zielhost:```bash
$ ansible-playbook -i test/inventory log4j-cve-2021-44228.yml -vv
ansible-playbook [core 2.12.1]
  config file = None
  configured module search path = ['/Users/lberton/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/Cellar/ansible/5.1.0/libexec/lib/python3.10/site-packages/ansible
  ansible collection location = /Users/lberton/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible-playbook
  python version = 3.10.1 (main, Dec  6 2021, 23:20:29) [Clang 13.0.0 (clang-1300.0.29.3)]
  jinja version = 3.0.3
  libyaml = True
No config file found; using defaults
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: log4j-cve-2021-44228.yml *********************************************************************************************************************************************************
2 plays in log4j-cve-2021-44228.yml

PLAY [download detector for Apache Log4j (CVE-2021-44228)] *********************************************************************************************************************************
META: ran handlers

TASK [include_vars] ************************************************************************************************************************************************************************
task path: /Users/lberton/prj/github/log4j-cve-2021-44228/log4j-cve-2021-44228.yml:29
ok: [localhost] => {"ansible_facts": {"clean_run_before": true, "delete_after": false, "detector_baseurl": "https://access.redhat.com/sites/default/files/", "detector_dir": "/opt/cve-2021-44228/", "detector_options": "-n -d --no-progress --scan {{ detector_path }}", "detector_path": "/var/", "detector_run_dir": "tmp", "force_download": false, "gpg_keyid": "7514F77D8366B0D9", "gpg_public_key": "gpg --keyserver {{ gpg_server }} --recv {{ gpg_keyid }}", "gpg_server": "pgp.mit.edu", "intro": "Ansible Playbook tested with detector version 1.3 released 2022-01-10.\nIf a 404 error occur please adjust the URL with the latest version available\nfor detector URL.\nPlease refer to the Red Hat Security Bullettin for up-to-date information and\nadjust the playbook variables accordingly.\n{{ rh_bullettin }}.\n", "not_vulnerable": "System IS NOT vulnerable to log4j (CVE-2021-44228)\n", "report_txt": "/report/vuln_log4j2_path_*.txt", "rh_bullettin": "https://access.redhat.com/security/vulnerabilities/RHSB-2021-009", "sh_detector": "cve-2021-44228--2022-01-10-1242.sh", "sh_signature": "cve-2021-44228--2022-01-10-1242.sh.asc", "verify_gpg": true, "vulnerable": "System MIGHT be vulnerable to log4j (CVE-2021-44228)\n"}, "ansible_included_var_files": ["/Users/lberton/prj/github/log4j-cve-2021-44228/vars.yml"], "changed": false}

TASK [print information] *******************************************************************************************************************************************************************
task path: /Users/lberton/prj/github/log4j-cve-2021-44228/log4j-cve-2021-44228.yml:31
ok: [localhost] => {
    "msg": "Ansible Playbook tested with detector version 1.3 released 2022-01-10.\nIf a 404 error occur please adjust the URL with the latest version available\nfor detector URL.\nPlease refer to the Red Hat Security Bullettin for up-to-date information and\nadjust the playbook variables accordingly.\nhttps://access.redhat.com/security/vulnerabilities/RHSB-2021-009.\n"
}
Tool herunterladen