
Log4Shell(CVE-2021-44228)을 위한 공식 Red Hat Log4j 탐지 스크립트 RHSB-2021-009를 사용하여 대상 Linux 호스트를 검증하는 Ansible 플레이북입니다.
공식 Red Hat Log4j 디텍터 스크립트 RHSB-2021-009를 사용하여 Log4Shell(CVE-2021-44228)을 탐지하기 위해 대상 Linux 호스트를 스캔하는 Ansible 역할입니다.
Red Hat 버전 1.3 디텍터 2022-01-10로 테스트했습니다.
코드는 Ansible 플레이북 lucab85/log4j-cve-2021-44228으로도 제공됩니다.
ansible 2.9+
기본 변수 값 - defaults/main.yml:
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/'
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"
clean_run_before: true
delete_after: true
verify_gpg: false
sh_detector: 디텍터 bash 스크립트 파일의 파일 이름sh_signature: 디텍터 GPG 서명 파일의 파일 이름detector_baseurl: 이전 파일들을 다운로드할 기본 URLdetector_path: 검사할 경로 (기본값 /var/)detector_dir: 디텍터의 다운로드 경로 (기본값 detector_dir - /opt/cve-2021-44228/) 참고: 볼륨에 실행 권한이 필요합니다!detector_run_dir: 실행 전에 생성할 하위 디렉터리 (기본값 tmp)detector_options: 디텍터 스크립트용 명령줄 옵션 (기본값 -n -d --no-progress --scan {{ detector_path }})gpg_keyid: 검증을 위해 다운로드할 GPG 공개 키 (기본값 Red Hat Product Security )없음.
먼저 최신 버전의 Ansible 역할 lucab85.ansible_role_log4shell을 Ansible Galaxy에서 다운로드하세요:
ansible-galaxy install lucab85.ansible_role_log4shell
이 예제는 lucab85.ansible_role_log4shell 역할을 (변수를 매개변수로 전달하여) 사용하는 방법을 보여줍니다:
---
- name: run detector
hosts: all
become: true
roles:
- role: lucab85.ansible_role_log4shell
detector_path: "/var/www"
MIT / BSD
이 역할은 2021년에 Ansible Pilot의 저자인 Luca Berton이 만들었습니다.
추가 정보:
지원해 주셔서 감사합니다:
7514F77D8366B0D9gpg_server: GPG 공개 키를 다운로드할 GPG 서버 (기본값 pgp.mit.edu)clean_run_before: 실행 전에 실행 디렉터리를 제거하고 다시 생성합니다 - 디텍터는 빈 디렉터리가 필요합니다 (기본값 true)delete_after: 실행 후 detector_dir 을 제거합니다 (기본값 false)verify_gpg: GPG 서명 다운로드 및 검증을 수행합니다 (기본값: false)