Skip to content
KitploitKITPLOIT
أدواتعمليات الاستغلالالمدونة
Log in
إرسال
أدواتعمليات الاستغلالالمدونة
إرسال

أدوات الاختراق واختبار الاختراق والأمن السيبراني لترسانتك الأمنية!

Kitploit هو دليل لأدوات الاختراق والأمن السيبراني واختبار الاختراق. اكتشف آخر تحديثات المشاريع للعثور على الثغرات وتحليل الأنظمة وأتمتة الاختبارات وتعزيز أمنك.

الخلاصاتاتصالالخصوصية© 2026 Kitploit

دليل الأدوات

الفئات

عرض جميع الفئات
Loading categories
log4j-cve-2021-44228 — # Ansible playbook لأتمتة سكربت كاشف Log4j من Red Hat لفحص مضيفات Linux بحثًا عن ثغرة CVE-2021-44228 (Log4Shell) مع التحقق عبر GPG. | Kitploit
أدوات/GitHubGitHub/lucab85/log4j-cve-2021-44228
ماسحات الثغرات الأمنيةتحليل الثغرات الأمنيةالبرمجة النصية والأتمتةتدقيق التكوينأمن السحابةDevSecOps
GitHublucab85/log4j-cve-2021-44228

log4j-cve-2021-44228

# Ansible playbook لأتمتة سكربت كاشف Log4j من Red Hat لفحص مضيفات Linux بحثًا عن ثغرة CVE-2021-44228 (Log4Shell) مع التحقق عبر GPG.

عرض المستودع
571023منذ 4 سنواتتمت المراجعة من قبل Kitploit
الموقع الإلكتروني

الأكثر شعبية

عرض الكل →

اكتشف الأدوات الأكثر استخدامًا من قبل مجتمعنا.

استكشف جميع الأدوات

تصفح مجموعتنا من الأدوات

عرض جميع الأدوات →
مشاركة

دليل تشغيل ماسح كاشف Log4j-CVE-2021-44228

CI

دليل تشغيل Ansible للتحقق من أجهزة Linux المستهدفة باستخدام سكربت كاشف Log4j الرسمي من Red Hat لثغرة Log4Shell (CVE-2021-44228).

كاشف Red Hat الإصدار 1.3 بتاريخ 2022-01-10.

يُحفظ الناتج في ملف txt داخل detector_dir (الافتراضي: /opt/cve-2021-44228/).

دور Ansible Galaxy

الكود متاح أيضًا كدور Ansible Galaxy باسم lucab85.ansible_role_log4shell```bash ansible-galaxy install lucab85.ansible_role_log4shell

## كيفية تشغيل Ansible Playbook

تقوم المتغيرات الافتراضية بفحص مسار `/var/` بالكامل بحثاً عن الملفات المتأثرة.
يمكنك تخصيص ملف `vars.yml` لمزيد من الخيارات.```bash
ansible-playbook log4j-cve-2021-44228.yml

التبعيات

لا شيء.

المتطلبات

ansible 2.9+

المتغيرات vars.yml

القيم الافتراضية:```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`: رابط نشرة RHSB (الافتراضي: [https://access.redhat.com/security/vulnerabilities/RHSB-2021-009](https://access.redhat.com/security/vulnerabilities/RHSB-2021-009))
- `intro`: نص المقدمة
- `vulnerable`: نص الثغرة (يظهر فقط عند التنفيذ بمستوى التصحيح 2 `-vv`)
- `not_vulnerable`: نص عدم وجود الثغرة (يظهر فقط عند التنفيذ بمستوى التصحيح 2 `-vv`)
- `report_txt`: مسار التقرير المراد طباعته (الافتراضي: `/report/vuln_log4j2_path_*.txt`)
- `sh_detector`: اسم ملف سكربت bash الخاص بالكاشف
- `sh_signature`: اسم ملف توقيع GPG الخاص بالكاشف
- `detector_baseurl`: الرابط الأساسي لتنزيل الملفات السابقة
- `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`: مفتاح GPG العام المراد تنزيله للتحقق (الافتراضي أمان منتجات Red Hat `7514F77D8366B0D9`)
- `gpg_server`: خادم مفاتيح GPG (الافتراضي: `pgp.mit.edu`)
- `gpg_public_key`: أمر التحقق عبر gpg (الافتراضي: `gpg --keyserver {{ gpg_server }} --recv {{ gpg_keyid }}`)
- `clean_run_before`: حذف مجلد التشغيل وإعادة إنشائه قبل التنفيذ - يتطلب الكاشف مجلدًا فارغًا (الافتراضي `true`)
- `delete_after`: حذف _detector_dir_ بعد التنفيذ (الافتراضي `false`)
- `verify_gpg`: تنفيذ تنزيل توقيع GPG والتحقق منه (الافتراضي: `true`)

## تنفيذ تجريبي

المخرجات الكاملة لتنفيذ الـ playbook ضد مضيف الهدف التجريبي RHEL8:```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"
}
تنزيل الأداة