CVE-2024-23897
위험도 심각 실제 악용 (KEV) 랜섬웨어 악용 ASEC 언급 5건
- 우선순위 이 사이트의 참고 점수
- 19.30
- 위험도 CVSS 3.1 · 0~10점
- 9.8
- 악용 가능성 EPSS · 30일 안에 공격에 쓰일 확률
- 100.0%
- 공개일 NVD
- 2024-01-24
설명 NVD 원문
Jenkins 2.441 이하, LTS 2.426.2 이하는 CLI 명령 파서의 기능을 비활성화하지 않는다. 이 기능은 인자에 포함된 '@'와 그 뒤의 파일 경로를 해당 파일의 내용으로 치환하는데, 이로 인해 인증되지 않은 공격자가 Jenkins 컨트롤러 파일 시스템의 임의 파일을 읽을 수 있다.
Claude 로 기계 번역한 글입니다. 정확한 내용은 영어 원문을 확인하세요.
영어 원문
Jenkins 2.441 and earlier, LTS 2.426.2 and earlier does not disable a feature of its CLI command parser that replaces an '@' character followed by a file path in an argument with the file's contents, allowing unauthenticated attackers to read arbitrary files on the Jenkins controller file system.
위험도 세부 항목 CVSS 3.1
- 공격 경로
- 네트워크(원격) AV:N
- 공격 난이도
- 낮음(쉬움) AC:L
- 필요한 권한
- 없음(로그인 불필요) PR:N
- 사용자 행동 필요
- 필요 없음 UI:N
- 영향 범위
- 그 제품 안 S:U
- 정보 유출(기밀성)
- 높음 C:H
- 데이터 변조(무결성)
- 높음 I:H
- 서비스 중단(가용성)
- 높음 A:H
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
조치 방법 5행
Red Hat 조치 5행
| 출처 | 플랫폼·제품 | 방식 | 패키지 | 수정된 버전 | 권고문RHSA 등 | 내용 |
|---|---|---|---|---|---|---|
| Red Hat | OCP-Tools-4.12-RHEL-8 | 패치(업데이트) | jenkins | 2.426.3.1706515686-3.el8 | RHSA-2024:0778 | |
| Red Hat | OCP-Tools-4.13-RHEL-8 | 패치(업데이트) | jenkins | 2.426.3.1706516254-3.el8 | RHSA-2024:0776 | |
| Red Hat | OpenShift Developer Tools and Services for OCP 4.11 | 패치(업데이트) | jenkins | 2.426.3.1706516929-3.el8 | RHSA-2024:0775 | |
| Red Hat | Red Hat (공통) | 완화 조치 | 원문 | Disabling access to the CLI is expected to prevent exploitation completely. Doing so is strongly rec…Disabling access to the CLI is expected to prevent exploitation completely. Doing so is strongly recommended to administrators unable to immediately update to Jenkins 2.442, LTS 2.426.3 or LTS 2.440.1. Applying this workaround does not require a Jenkins restart. |
||
| Red Hat | Red Hat OpenShift Container Platform 3.11 | 수정판 없음 | jenkins | 원문 | Red Hat 상태: 지원 기간 끝남 |
CISA 조치 권고 KEV
제조사 안내에 따라 완화 조치를 적용하세요. 완화 방법이 없으면 제품 사용을 중단하세요.
영어 원문
Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.
미국 연방기관 조치 기한: 2024-09-09
살펴볼 장비 초안
공격 대상: 서버·웹 서비스. '이 장비에서 살펴볼 취약점' 이라는 분류이며, 장비가 탐지한다는 확인이 아닙니다.
| 장비 보기 | 정도 | 분류 이유 |
|---|---|---|
| 웹 요청 (WAF·웹 로그) | 확인 필요 | 웹 공격 유형이지만 웹 요청인지 설명으로 알 수 없음 |
단계별 판정 예시 환경
시나리오 미작성 — 이 CVE 는 단계별 판정을 하지 않았습니다. 안전하다는 뜻이 아닙니다.
출처별 내용 6건
CISA KEV Jenkins Command Line Interface (CLI) Path Traversal Vulnerability 2024-08-19
Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.
ASEC Jenkins 취약점 노출 국내 서버 현황 (CVE-2024-23897, CVE-2024-43044) 2024-09-03
전 세계적으로 널리 사용되는 개발 도구인 Jenkins 제품에 대한 다수의 취약점이 발표되었으며 그중 일부 취약점이 실제 공격에 악용되고 있다. 또한 국내 Jenkins 서버 대다수가 취약점에 노출된 것으로 확인되었다. 올해 초 공개된 CVE-2024-23897 취약점은 인증되지 않은 사용자가 Jenkins 서버 시스템의 임의 파일을 읽을 수 있는 취약점으로 CVSS 점수 9.8의 위험도가 매우 높은 취약점이다. 최근 해당 취약점이 실제 공격에 악용되고 있다는 보고 [1] 가 있으며, 해외 언론에 따르면 특정 기업이 해당 취약점을 악용한 공격으로 피해를 입었다고 한다 [2] . 해당 취약점으로 대상 버전의 모든 Jenkins 서버에 공격이 가능할 것으로 파악된다. 최근 공개된 CVE-2024-43044 취약점 또한 기본 라이브러리의 특정 기능을 악용하여 Agent 접근 권한을 가진 공격자가 서버의 임의 파일을 읽을 수 있는 취약점으로 CVSS 점수 8.8의 위험도 높은 취약점이다. 두 취약점 모두 PoC 코드가 GitHub, 블로그 등지에 공개되어 쉽게 찾을 수 있어 언제든 공격에 악용될 수 있으므로 주의해야 한다. ASEC(AhnLab SEcurity intelligence Center)에서는 자사 고객의 위협 노출 현황을 파악하기 위해 ASM 서비스를 활용하여 국내에서 운용 중인 Jenkins 서버에 대한 취약성 여부를 조사하였다. 당시 외부에서 접근 가능한 Jenkins 서버 4245개가 확인되었으며, 이 중 3972개 서버의 버전 정보 확인이 가능했다. 조사 결과, 2824개(71%)의 환경이 심각한 위협인 CVE-2024-23897 취약점에 노출되어 있고, 비교적 최신 취약점인 CVE-2024-43044에 노출된 환경은 3969개(99.9%)였다. 대다수의 서버가 취약점에 노출된 상태로 운용되고 있는 것으로 확인된다. (*2024.08.20 기준) IP Port Domain Jenkins Version 115.89.***.195 8080 *******.********.net 2.346.3 175.45.***.185 7979 ***********.***.or.kr 2.375.1 211.62.***.72 9000 *****.********.com 2.319.2 116.125.***.22 9090 *****.co.kr 2.387.3 119.205.***.48 8110 ********.or.kr 2.263.3 표 1. 확인된 취약 Jenkins 서버 예시 그림 1. 국내 Jenkins 서버 취약점 노출 현황 CVE-2024-23897 Jenkins는 원격 명령 인터페이스를 지원한다. Jenkins-CLI 툴을 통해 원격지에서 명령어와 인자를 전달하여 각종 기능을 실행 가능하다. 이 CLI 명령 분석 과정에서 발생하는 취약점이다. 그림 2. Jenkins CLI 실행 화면 명령 분석에 사용하는 Args4j 라이브러리에 ‘@’ 식별자 이후 문자열 경로의 파일을 읽어 인자로 설정하는 기능(expandAtFiles)이 있다. 명령에 대한 유효한 인자가 아닌 경우 에러가 발생하는데, 이 에러 메시지에 인자로 사용했던 문자열, 즉 파일 내용이 노출되는 취약점이다. 분석 결과, 취약점에 활용 가능한 에러 메시지를 출력하는 명령어는 일부 라인을 읽을 수 있는 명령어와 전체 라인을 읽을 수 있는 명령어로 나뉜다. 인자를 사용하지 않거나 제한된 개수의 인자를 사용하는 명령어의 경우 파일의 특정 라인을 읽을 수 있는 반면, 인자 개수 제한이 없는 명령어의 경우 파일 라인 전체를 읽을 수 있다. 또한 권한에 따라 사용 가능한 명령어가 제한되는데, 모든 라인을 읽을 수 있는 명령어는 특정 설정 환경에서만 동작 가능했다. 별다른 설정을 하지 않은 환경의 경우 기본 권한으로 다음 명령어만 사용 가능하다. 인자가 필요하지 않거나 제한된 개수의 인자를 사용하는 명령어이다. 명령어 읽기 가능 라인 who-am-i 1 shutdown 1 safe-shutdown 1 restart 1 keep-build 3 help 1, 2 enable-job 2 disable-job 2 표 2. 권한 없이 사용 가능한 명령어 기본 권한 상태에서는 취약점으로 탈취 가능한 파일 내용이 일부 라인으로 제한되나, SSH Key, Jenkins 암호화 키 등의 라인 구분이 없는 주요 파일은 전체 내용을 출력할 수 있다. 그림 3. 파일 일부를 읽을 수 있는 명령어 사용 예시 특정 설정의 상황에서는 다수 인자를 사용하는 명령을 실행할 수 있다. 다음 설정 중 하나에 해당될 경우 취약점을 통해 파일의 모든 라인, 즉 파일 전체를 읽을 수 있다. – 익명 연결 기능을 사용한 경우 – 모든 사용자에 읽기 권한을 부여했을 경우 – 사용자 가입을 허용했을 경우 – Lagacy 모드를 사용할 경우 그림 4. 취약점 관련 Jenkins 설정 위와 같이 특정 설정 환경에서 파일 내용 전체를 읽을 수 있는 명령어는 다음과 같다. 명령어 connect-node delete-job delete-node delete-view disconnect-node offline-node online-node reload-job 표 3. 파일 전체를 읽을 수 있는 명령어 그림 5. 파일 전체를 읽을 수 있는 명령어 사용 예시 공개된 사이트에 다수의 PoC 코드가 존재하며, PoC 코드가 아니더라도 Jenkins 패키지에 기본으로 포함된 CLI 접속 도구로 취약점 구현이 가능하기 때문에 누구든지 즉시 공격이 가능하다. 해당 취약점의 대상 버전 사용자는 확인 즉시 완화 버전으로 패치할 것을 권고한다. CVE-2024-43044 Jenkins 설치 시 기본으로 설치되는 Remoting 라이브러리에 대한 취약점이다. 라이브러리 자체는 기본으로 설치되지만, Jenkins에 Agent가 등록되어 있고 공격자가 Agent 접근 권한을 가질 경우 취약점을 사용할 수 있다. 해당 라이브러리는 Jenkins 서버와 Agent의 통신 기능을 구현하며, Agent가 서버에 요청한 JAVA 클래스를 실행할 수 있는 기능을 포함한다. 서버 URL의 JAR 파일을 실행하는 목적으로 구현된 것으로 파악되지만, 파일 경로 및 타입을 검사하지 않기 때문에 서버 시스템의 임의 파일을 읽어 Agent로 전송할 수 있다. 이 취약점을 통해 디렉토리 리스팅 및 임의 파일 읽기가 가능하다. 분석 결과 RemoteClassLoader 클래스의 특정 메소드에 코드를 추가하는 것으로 취약점을 구현 가능하다. 파일 경로가 디렉토리일 경우 디렉토리 리스트를 응답하며, 파일일 경우 파일 내용 전체를 응답한다. 그림 6. 원본 Remoting.jar RemoteClassLoader 코드 요청 URL에 “file://” 경로가 허용되기 때문에 해당 경로가 디렉토리일 경우 디렉토리 내부 파일 목록이, 파일일 경우 파일 내용 전부가 Agent로 전달된다. 그림 7. 취약점을 통한 디렉토리 리스팅 및 파일 읽기 예시 해당 취약점 또한 위험도 높은 취약점으로 설명되고 있으며, 제조사에서는 즉시 업데이트가 어려울 경우를 위해 문제가 되는 fetchJar 메소드 자체를 사용하지 못하도록 패치하는 프로그램을 제공하고 있다 [3] . 본문의 취약점은 구현 난이도가 낮고 서버의 중요한 파일 내용이 유출될 수 있으므로 악용될 경우 큰 피해가 예상된다. 취약한 버전으로 지속 운영 시 공격 대상으로 노출될 수 있으므로, 피해 예방을 위하여 즉시 최신 패치를 적용해야 한다. 해당 사례 외에도 공격자는 여러 유명 제품의 알려진 취약점을 악용하여 공격을 시도한다. 사용 중인 서비스를 항상 최신 버전으로 유지해야 하며 각종 보안 설정을 통해 공격자의 취약점 스캐닝 및 공격을 방어해야 한다. 또한 국내외 보안 권고를 상시 확인하여 대상 서비스를 운용 중인 경우 신속한 조치와 함께 피해 여부를 점검해야 한다. ASEC에서는 블로그를 통해 주요 취약점에 대한 보안 권고문을 게시하고 있으며, AhnLab TIP 서비스 가입 고객 중 취약점 대상 서비스 운용 기업이 확인될 경우 별도의 맞춤형 보고서를 전달하고 있다. 자사 고객의 취약 정보가 외부에 노출되지 않도록 하며 안전하게 서비스를 운영할 수 있도록 비공개로 해당 고객에게만 전달하는 서비스이다. 관련 링크 [1] https://www.cisa.gov/known-exploited-vulnerabilities-catalog [2] https://www.cybersecuritydive.com/news/jenkins-critical-cve-exploits-cisa/724729/ [3] https://github.com/jenkinsci-cert/SECURITY-3430 보안 권고문 [보안권고문] Jenkins 제품 보안 업데이트 권고(CVE-2024-43044) https://asec.ahnlab.com/ko/82339/ [보안권고문] JenKins 제품군 2024년 1월 보안 업데이트 권고(CVE-2024-23897) https://asec.ahnlab.com/ko/79332/ AhnLab TIP 를 구독하시면 연관 IOC 및 상세 분석 정보를 추가적으로 확인하실 수 있습니다. 자세한 내용은 아래 배너를 클릭하여 확인해보세요.
ASEC JenKins 제품군 2024년 1월 보안 업데이트 권고 2024-01-26
개요 JenKins( https://www.jenkins.io/ )에서 발생하는 취약점을 해결하는 업데이트가 제공되었습니다. 해당하는 버전 사용자는 최신 버전으로 업데이트 하시기 바랍니다. 대상 제품 CVE-2024-23897 Jenkins 2.441 이하, LTS 2.426.2 이하의 모든 버전 CVE-2024-23898 Jenkins 2.217 이상 2.441 이하의 모든 버전, LTS 2.222.1 이상 2.426.2 이하의 모든 버전 CVE-2024-23899 Jenkins의 Git Server 플러그인 99.va_0826a_b_cdfa_d 이하의 모든 버전 CVE-2023-6147, CVE-2023-6148, CVE pending Jenkins의 Qualys Policy Compliance Scanning Connector 플러그인 1.0.5 이하의 모든 버전 CVE-2024-23904 Jenkins의 Log Command 플러그인 1.0.2 이하의 모든 버전 CVE-2024-23905 Jenkins의 Red Hat Dependency Analytics 플러그인 0.7.1 이하의 모든 버전 CVE-2024-23900 Jenkins의 Matrix Project 플러그인 822.v01b_8c85d16d2 이하의 모든 버전 CVE-2024-23901, CVE-2024-23902, CVE-2024-23903 Jenkins의 GitLab Branch Source 플러그인 684.vea_fa_7c1e2fe3 이하의 모든 버전 해결된 취약점 CVE-2024-23897 : JenKins에서 발생하는 CLI를 통한 임의 파일 읽기 취약점 CVE-2024-23898 : JenKins에서 발생하는 CLI의 Cross-site WebSocket hijacking 취약점 CVE-2024-23899 : Jenkins의 Git Server 플러그인에서 발생하는 임의 파일 읽기 취약점 CVE-2023-6147 : Jenkins의 Qualys Policy Compliance Scanning Connector 플러그인에서 발생하는 XXE 취약점 CVE-2023-6148 : Jenkins의 Qualys Policy Compliance Scanning Connector 플러그인에서 발생하는 XSS 취약점 CVE pending : Jenkins의 Qualys Policy Compliance Scanning Connector 플러그인에서 발생하는 잘못된 권한 검사로 인한 자격 증명 캡처 허용 취약점 CVE-2024-23904 : Jenkins의 Log Command 플러그인에서 발생하는 임의 파일 읽기 취약점 CVE-2024-23905 : Jenkins의 Red Hat Dependency Analytics 플러그인에서 발생하는 사용자 콘텐츠에 대한 Content-Security-Policy 보호 비활성화 취약점 CVE-2024-23900 : Jenkins의 Matrix Project 플러그인에서 발생하는 Path traversal 취약점 CVE-2024-23901 : Jenkins의 GitLab Branch Source 플러그인에서 발생하는 공유프로젝트의 무조건적인 검색 허용 취약점 CVE-2024-23902 : Jenkins의 GitLab Branch Source 플러그인에서 발생하는 CSRF 취약점 CVE-2024-23903 : Jenkins의 GitLab Branch Source 플러그인에서 발생하는 실행시간 예측에 따른 webhook 토큰 비교 취약점 취약점 패치 2024년 1월 24일, 25일 업데이트를 통해 취약점 패치가 제공되었습니다. 취약점 패치에 대한 보다 자세한 사항은 “JenKins” 사이트의 보안 권고 문서를 참고하시기 바랍니다. CVE-2024-23897, CVE-2024-23898 : Jenkins 2.442, LTS 2.426.3 CVE-2024-23899 : Jenkins의 Git Server 플러그인 99.101.v720e86326c09 CVE-2023-6147, CVE-2023-6148, CVE pending : Jenkins의 Qualys Policy Compliance Scanning Connector 플러그인 1.0.6 CVE-2024-23904 : 패치버전 제공되지 않음[7] CVE-2024-23905 : Jenkins의 Red Hat Dependency Analytics 플러그인 0.9.0 CVE-2024-23900 : Jenkins의 Matrix Project 플러그인 822.824.v14451b_c0fd42 CVE-2024-23901, CVE-2024-23902, CVE-2024-23903 : Jenkins의 GitLab Branch Source 플러그인 688.v5fa_356ee8520 참고 사이트 [1] Jenkins Security Advisory 2024-01-24 https://www.jenkins.io/security/advisory/2024-01-24/ [2] Git server https://plugins.jenkins.io/git-server [3] Matrix Project https://plugins.jenkins.io/matrix-project/ [4] GitLab Branch Source https://plugins.jenkins.io/gitlab-branch-source/ [5] Qualys Policy Compliance Scanning Connector https://plugins.jenkins.io/qualys-pc/ [6] Red Hat Dependency Analytics https://plugins.jenkins.io/redhat-dependency-analytics/ [7] Log Command https://plugins.jenkins.io/log-command/
ASEC 영어·일본어 등 다른 언어 글 3건
ASEC Jenkins の脆弱性露出に関する韓国国内サーバーの状況 (CVE-2024-23897、CVE-2024-43044) 2024-09-09
全世界的に広く使用されている開発ツールである Jenkins 製品に関する複数の脆弱性が公表され、そのうち一部の脆弱性が実際の攻撃に悪用されている。また、韓国国内の Jenkins サーバーの大多数が脆弱性にさらされていることが確認された。 今年の初めに公開された CVE-2024-23897 脆弱性は、認証されていないユーザーが Jenkins サーバーシステムの任意のファイルを読み込むことができる脆弱性であり、CVSS スコア9.8の非常に危険度が高い脆弱性である。最近、この脆弱性が実際の攻撃に悪用されているという報告 [1] があり、海外メディアによると特定の企業がこの脆弱性を悪用した攻撃で被害を受けたという [2] 。この脆弱性により、対象となるバージョンのすべての Jenkins サーバーに攻撃が可能なものと見られる。 最近公開された CVE-2024-43044 脆弱性も、標準ライブラリの特定機能を悪用して Agent アクセス権限を手に入れた攻撃者が、サーバーの任意のファイルを読み込むことができる脆弱性で、CVSS スコア8.8の危険度が高い脆弱性である。 どちらの脆弱性も PoC コードが GitHub、ブログなどに公開されており簡単に探すことができるため、いつでも攻撃に悪用されるおそれがあり注意が必要だ。 ASEC(AhnLab SEcurity intelligence Center)では、当社顧客の脅威露出状況を把握するため、ASM サービスを活用して韓国内で運用中の Jenkins サーバーの脆弱性有無を調査した。当時、外部からアクセスが可能な Jenkins サーバー 4245個が確認され、そのうち 3972個のサーバーのバージョン情報を確認できた。調査の結果、2824個(71%)の環境が深刻な脅威である CVE-2024-23897 脆弱性にさらされており、比較的新しい脆弱性である CVE-2024-43044 にさらされた環境は3969個(99.9%)であった。大多数のサーバーが脆弱性にさらされている状態で運用されていることが確認された。(*2024.08.20 基準) IP Port Domain Jenkins Version 115.89.***.195 8080 *******.********.net 2.346.3 175.45.***.185 7979 ***********.***.or.kr 2.375.1 211.62.***.72 9000 *****.********.com 2.319.2 116.125.***.22 9090 *****.co.kr 2.387.3 119.205.***.48 8110 ********.or.kr 2.263.3 表1. 確認された脆弱な Jenkins サーバーの例 図1. 韓国国内の Jenkins サーバーの脆弱性露出状況 (左から、すべての Jenkins サーバー、バージョン情報確認サーバー、CVE-2024-43044 脆弱性対象サーバー、CVE-2024-23897 脆弱性対象サーバー) CVE-2024-23897 Jenkins はリモートコマンドのインターフェースに対応トしている。Jenkins-CLI ツールによって遠隔地からコマンドや引数を渡して、各種機能を実行できる。この CLI コマンドの解析過程で発生する脆弱性である。 図2. Jenkins CLI の実行画面 コマンド解析に使用する Args4j ライブラリに「@」識別子以降の文字列パスのファイルを読み取り、引数として設定する機能(expandAtFiles)がある。コマンドに対する有効な引数ではない場合はエラーが発生するが、このエラーメッセージに引数として使用した文字列、すなわちファイルの内容が表示されてしまう脆弱性である。 解析の結果、脆弱性に利用可能なエラーメッセージを出力するコマンドは、一部のラインを読み取れるコマンドと、全体のラインを読み取れるコマンドに分けられる。引数を使用しない、または制限された個数の引数を使用するコマンドの場合はファイルの特定ラインを読み取れる一方で、引数の個数制限がないコマンドの場合、ファイルライン全体を読み取ることができる。また、権限によって使用可能なコマンドが制限されるが、すべてのラインを読み取れるコマンドは特定の設定環境でのみ動作が可能であった。 特に設定を行っていない環境の場合、デフォルト権限で以下のコマンドのみが使用できる。これらは、引数が必要でないか、個数が制限された引数を使用するコマンドである。 コマンド 読み取り可能ライン who-am-i 1 shutdown 1 safe-shutdown 1 restart 1 keep-build 3 help 1, 2 enable-job 2 disable-job 2 表2. 権限なしで使用可能なコマンド デフォルト権限の状態では脆弱性を利用して窃取できるファイルの内容が一部のラインのみに制限されるが、SSH Key、Jenkins 暗号化キーなどのライン区分がない主要ファイルは全体の内容を出力することができる。 図3. ファイルの一部を読み取ることができるコマンドの使用例 特定の設定状況では複数の引数を使用するコマンドを実行することができる。以下の設定のうち1つに該当する場合、脆弱性によってファイルの全ライン、すなわちファイル全体を読み取ることができる。 – 匿名接続機能を使用した場合 – すべてのユーザーに読み取り権限を付与した場合 – ユーザー加入を許可した場合 – Legacy モードを使用する場合 図4. 脆弱性に関する Jenkins の設定 上記のような特定の設定環境でファイルの内容全体を読み取ることができるコマンドは、以下の通りである。 コマンド connect-node delete-job delete-node delete-view disconnect-node offline-node online-node reload-job 表3. ファイル全体を読み取ることができるコマンド 図5. ファイル全体を読み取ることができるコマンドの使用例 公開されているサイトに多数の PoC コードが存在し、PoC コードでなくとも Jenkins パッケージにデフォルトで含まれている CLI 接続ツールで脆弱性の再現が可能なため、誰でもすぐに攻撃することができる。この脆弱性の対象となるバージョンのユーザーは、確認後直ちに緩和バージョンのパッチを適用することを推奨する。 CVE-2024-43044 Jenkins インストール時にデフォルトでインストールされる Remoting ライブラリに対する脆弱性である。ライブラリ自体はデフォルトでインストールされるが、Jenkins に Agent が登録されており、攻撃者が Agent アクセス権限を有する場合、脆弱性を利用することができる。 このライブラリは Jenkins サーバーと Agent の通信機能を実現し、Agent がサーバーにリクエストした JAVA クラスを実行できる機能を含んでいる。サーバー URL の JAR ファイルを実行する目的で実現されたものと思われるが、ファイルパスおよびタイプをスキャンしないため、サーバーシステムの任意のファイルを読み取り、Agent に転送することができる。この脆弱性によってディレクトリリストや任意のファイルの読み取りが可能である。 解析の結果、RemoteClassLoader クラスの特定メソッドにコードを追加することで脆弱性の再現が可能である。ファイルパスがディレクトリの場合はディレクトリリストを返し、ファイルの場合はファイル内容全体を返す。 図6. オリジナルの Remoting.jar RemoteClassLoader コード リクエスト URL には「file://」パスが許可されるため、当該パスがディレクトリの場合はディレクトリ内部のファイルリストが、ファイルの場合はファイル内容全体が Agent に伝達される。 図7. 脆弱性によるディレクトリリストやファイル読み取りの例 この脆弱性も危険度の高い脆弱性として説明されており、メーカーでは直ちにアップデートを行うのが難しい場合に備え、問題となる fetchJar メソッド自体を使用できないようにパッチを当てるプログラムを提供している [3] 。 本文の脆弱性は再現難易度が低く、サーバーの重要なファイル内容が流出するおそれがあるため、悪用されると多大な被害が予想される。脆弱なバージョンで運用を続けていると、攻撃対象としてさらされるおそれがあるため、被害予防のため直ちに最新のパッチを適用する必要がある。 当該事例以外にも、攻撃者は複数の有名製品の既知の脆弱性を悪用して攻撃を試みる。使用しているサービスは常に最新バージョンを維持する必要があり、各種セキュリティ設定によって攻撃者の脆弱性スキャンや攻撃を防御するべきである。また、国内外のセキュリティ勧告を常にチェックし、対象サービスを運用中の場合は迅速な措置を講じるとともに、被害の有無をチェックする必要がある。 ASEC では、ブログを通じて主要な脆弱性に関するセキュリティ勧告文書を掲示しており、AhnLab TIP サービスに加入している顧客のうち脆弱性の対象となるサービスを運用している企業が確認された場合、別途カスタマイズ型レポートを提供している。当社顧客の脆弱情報が外部に漏えいしないようにし、安全にサービスを運用できるよう、非公開で該当する顧客にのみ提供するサービスである。 関連リンク [1] https://www.cisa.gov/known-exploited-vulnerabilities-catalog (外部サイト、英語にて提供) [2] https://www.cybersecuritydive.com/news/jenkins-critical-cve-exploits-cisa/724729/ (外部サイト、英語にて提供) [3] https://github.com/jenkinsci-cert/SECURITY-3430 (外部サイト、英語にて提供) セキュリティ勧告文書 [セキュリティ勧告文書] Jenkins 製品のセキュリティアップデート勧告(CVE-2024-43044) https://asec.ahnlab.com/ko/82339/ (韓国語にて提供) [セキュリティ勧告文書] JenKins 製品群の2024年1月セキュリティアップデート勧告(CVE-2024-23897) https://asec.ahnlab.com/ko/79332/ (韓国語にて提供) 関連 IOC および詳細な解析情報は、AhnLab の次世代脅威インテリジェンスプラットフォーム 「 AhnLab TIP 」 サブスクリプションサービスを通して確認できる。
ASEC Jenkins Servers in Korea With Exposed Vulnerabilities (CVE-2024-23897, CVE-2024-43044) 2024-09-03
Multiple vulnerabilities were announced for Jenkins, a widely used development tool, and some of them are being exploited in actual attacks. It was also found that most Jenkins servers in Korea were exposed to these vulnerabilities. The CVE-2024-23897 vulnerability disclosed earlier this year allows unauthenticated users to read arbitrary files in the Jenkins server system. This vulnerability has a CVSS score of 9.8, indicating a very high level of risk. There was a report [1] stating that this vulnerability is being exploited in actual attacks, and according to a global news organization, a certain enterprise suffered damages due to an attack exploiting this vulnerability. [2] It is presumed that this vulnerability enables attacks on all Jenkins servers of this version. The recently disclosed CVE-2024-43044 vulnerability also allows a threat actor with Agent access privileges to read arbitrary files from the server by exploiting specific functions of a core library. This vulnerability has a CVSS score of 8.8, indicating a high level of risk. Both vulnerabilities have publicly available Proof of Concept (PoC) codes on platforms such as GitHub and blogs, making them easy to find and potentially exploitable at any time, so caution is advised. AhnLab SEcurity intelligence Center (ASEC) used its ASM service to identify the current status of threat exposure for its customers and investigated whether their Jenkins servers operating in Korea were exposed to the vulnerabilities. At the time, there was a total of 4,245 Jenkins servers that could be accessed from the outside, and version information was available for 3,972 of them. The investigation revealed that 2,824 (71%) servers were exposed to the high-risk CVE-2024-23897 vulnerability, and 3,969 (99.9%) were exposed to the comparatively new vulnerability, CVE-2024-43044. In short, a majority of the servers are operating with vulnerabilities exposed. (*As of Aug. 20th, 2024) IP Port Domain Jenkins Version 115.89.***.195 8080 *******.********.net 2.346.3 175.45.***.185 7979 ***********.***.or.kr 2.375.1 211.62.***.72 9000 *****.********.com 2.319.2 116.125.***.22 9090 *****.co.kr 2.387.3 119.205.***.48 8110 ********.or.kr 2.263.3 Table 1. Examples of identified vulnerable Jenkins servers Figure 1. Current status of vulnerability exposures of Jenkins servers in Korea CVE-2024-23897 Jenkins supports remote command interfaces. By transmitting commands and arguments from a remote location using the Jenkins-CLI tool, it can perform various functions. This vulnerability occurs during the CLI command analysis. Figure 2. Upon executing Jenkins CLI The Args4j library, used for command analysis, has a function (expandAtFiles) that reads the contents of a file specified by a string path following the ‘@’ identifier and sets them as arguments. If the input is not a valid argument for the command, an error occurs, and the error message exposes the string used as the argument, i.e., the contents of the file. An analysis revealed that the commands that output the error messages used in the vulnerability are divided into ones that can read some lines and those that can read all lines. Commands that do not use arguments or use a limited number of arguments can read specific lines of a file, while commands without restrictions on the number of arguments can read all lines of a file. Additionally, the commands available depend on permissions, and the commands that can read all lines are only operational in certain configuration environments. In environments with no specific configuration, only the following commands can be used with default permissions. These commands either do not need arguments or use a limited number of arguments. Commands Readable Lines who-am-i 1 shutdown 1 safe-shutdown 1 restart 1 keep-build 3 help 1, 2 enable-job 2 disable-job 2 Table 2. Commands that can be used without permission With default permissions, only certain lines can be exfiltrated from files using the vulnerability. However, key files with no line separators such as SSH Key and Jenkins encryption key could have their entire content outputted. Figure 3. Example of using commands that can read a portion of a file In certain settings, it is possible to execute commands that use multiple arguments. If any of the configuration below is set, all the lines within a file can be read using the vulnerability. – When the anonymous access feature is enabled – When read permissions are granted to all users – When user registration is allowed – When Legacy mode is enabled Figure 4. Jenkins configurations related to the vulnerability Below are the commands that can read the entire file content in specific environments as mentioned above. Commands connect-node delete-job delete-node delete-view disconnect-node offline-node online-node reload-job Table 3. Commands that can read entire files Figure 5. Example of using commands that can read entire files There are multiple PoC codes available on public websites, and even without these codes, the vulnerability can be exploited immediately by anyone using the CLI access tool included by default in the Jenkins package. Users of the affected version are strongly advised to patch to a mitigated version as soon as possible. CVE-2024-43044 This vulnerability occurs in the Remoting library, which is installed by default when installing Jenkins. Although the library itself is installed by default, Agent must be registered to Jenkins and the threat actor must have Agent access permissions to use the vulnerability. The library provides a communication function between Jenkins servers and the Agent, and includes the function that allows the execution of JAVA classes requested by the Agent on the server. Although this function seems to have been put in place to execute JAR files from server URLs, users can read arbitrary files within the server system and send them to the Agent because it does not verify the file path or type. This vulnerability allows directory listing and arbitrary file reading. Upon analysis, it was discovered that the vulnerability could be triggered by adding a code to a certain method of the RemoteClassLoader class. If the file path is a directory, the response will contain the directory listing; if it is a file, the response will include the entire file content. Figure 6. The original Remoting.jar RemoteClassLoader code Since the “file://” path is allowed in the request URL, if the specified path is a directory, the list of files within that directory is sent to the Agent. If the path is a file, the entire content of the file is transmitted to the Agent. Figure 7. Example of listing directories and reading files using the vulnerability This vulnerability is also described as high-risk, and the manufacturer provides a patch program that disables the use of the problematic fetchJar method in case the update cannot be applied. [3] As the vulnerability can be triggered easily and has the potential to leak the content of important files within servers, victims will suffer great damage if it is exploited. Continuing to use the vulnerable version can increase the risk of exposure, so it is crucial to apply the latest patch to prevent damage. The threat actor also attempts attacks exploiting other known vulnerabilities of popular products. Therefore, users should update any services they are using to the latest versions and enable various security settings to defend against vulnerability scans and attacks by threat actors. Users are also advised to regularly check security advisories from various sources to see if any of the services in use are mentioned, and if so, scan for any damages while also taking immediate action. ASEC posts security advisories on major vulnerabilities through its blog and provides tailored reports to AhnLab TIP service clients if it is confirmed that they are operating services affected by the vulnerabilities. This ATIP service ensures that the vulnerability information of AhnLab’s clients is not exposed externally and is delivered only to the relevant clients confidentially, allowing them to operate their services securely. Related Links [1] https://www.cisa.gov/known-exploited-vulnerabilities-catalog [2] https://www.cybersecuritydive.com/news/jenkins-critical-cve-exploits-cisa/724729/ [3] https://github.com/jenkinsci-cert/SECURITY-3430 Security Advisories [Security Advisory] Jenkins Security Update Advisory (CVE-2024-43044) https://asec.ahnlab.com/ko/82339/ (This link is only available in Korean for now.) [Security Advisory] Jenkins Security Update Advisory for Jan 2024 (CVE-2024-23897) https://asec.ahnlab.com/ko/79332/ (This link is only available in Korean for now.) Gain access to related IOCs and detailed analysis by subscribing to AhnLab TIP . For subscription details, click the banner below.
ASEC JenKins Family January 2024 Security Update Advisory 2024-01-26
Overview An update has been made available to fix vulnerabilities in JenKins (https://www.jenkins.io/ ). Users of affected versions are advised to update to the latest version. Affected Products All versions of Jenkins 2.441 and earlier, LTS 2.426.2 and earlier CVE-2024-23898 Jenkins 2.217 and all versions before 2.441, LTS 2.222.1 and all versions before 2.426.2 CVE-2024-23899 All versions of Jenkins’ Git Server plugin 99.va_0826a_b_cdfa_d or earlier CVE-2023-6147, CVE-2023-6148, CVE pending Qualys Policy Compliance Scanning Connector plugin in Jenkins, all versions 1.0.5 and earlier CVE-2024-23904 All versions of the Log Command plugin in Jenkins 1.0.2 and earlier CVE-2024-23905 All versions of the Red Hat Dependency Analytics plugin in Jenkins 0.7.1 and earlier CVE-2024-23900 All versions of the Matrix Project plugin in Jenkins before 822.v01b_8c85d16d2 CVE-2024-23901, CVE-2024-23902, CVE-2024-23903 All versions of the GitLab Branch Source plugin in Jenkins before 684.vea_fa_7c1e2fe3 Resolved Vulnerabilities CVE-2024-23897: Arbitrary file read vulnerability via CLI in JenKins CVE-2024-23898: Cross-site WebSocket hijacking vulnerability in the CLI in JenKins CVE-2024-23899: Arbitrary file read vulnerability in the Git Server plugin in Jenkins CVE-2023-6147: XXE vulnerability in the Qualys Policy Compliance Scanning Connector plugin in Jenkins CVE-2023-6148: XSS vulnerability in the Qualys Policy Compliance Scanning Connector plugin in Jenkins CVE pending : Credential capture allowance vulnerability due to incorrect permission checking in the Qualys Policy Compliance Scanning Connector plugin in Jenkins CVE-2024-23904: Arbitrary file read vulnerability in the Log Command plugin in Jenkins CVE-2024-23905: Disable Content-Security-Policy protection for user content vulnerability in the Red Hat Dependency Analytics plugin in Jenkins CVE-2024-23900: Path traversal vulnerability in the Matrix Project plugin in Jenkins CVE-2024-23901: Allow unconditional search of shared projects vul nerability in the GitLab Branch Source plugin in Jenkins CVE-2024-23902: CSRF vulnerability in the GitLab Branch Source plugin in Jenkins CVE-2024-23903: Webhook token comparison vulnerability due to runtime prediction in the GitLab Branch Source plugin in Jenkins Vulnerability Patches Patches for the vulnerabilities were made available in the January 24 and 25, 2024 updates. For more information about the vulnerability patches, please refer to the security advisory on the “JenKins” site. CVE-2024-23897, CVE-2024-23898: Jenkins 2.442, LTS 2.426.3 CVE-2024-23899: Git Server plugin in Jenkins 99.101.v720e86326c09 CVE-2023-6147, CVE-2023-6148, CVE pending : Qualys Policy Compliance Scanning Connector plugin 1.0.6 in Jenkins CVE-2024-23904 : No patch available[7] CVE-2024-23905: Red Hat Dependency Analytics plugin in Jenkins 0.9.0 CVE-2024-23900: Matrix Project plugin in Jenkins 822.824.v14451b_c0fd42 CVE-2024-23901, CVE-2024-23902, CVE-2024-23903: GitLab Branch Source plugin 688.v5fa_356ee8520 in Jenkins Referenced Sites [1] Jenkins Security Advisory 2024-01-24 https://www.jenkins.io/security/advisory/2024-01-24/ [2] Git server https://plugins.jenkins.io/git-server [3] Matrix Project https://plugins.jenkins.io/matrix-project/ [4] GitLab Branch Source https://plugins.jenkins.io/gitlab-branch-source/ [5] Qualys Policy Compliance Scanning Connector https://plugins.jenkins.io/qualys-pc/ [6] Red Hat Dependency Analytics https://plugins.jenkins.io/redhat-dependency-analytics/ [7] Log Command https://plugins.jenkins.io/log-command/
자동 추천 장비와 근거 참고용
분류 체계(취약점 종류 CWE → 공격 유형 CAPEC → 공격 기법 ATT&CK) 매핑으로 계산한 후보입니다. 범위가 넓어 관련이 적은 장비가 섞입니다. 해당 장비가 이 공격을 탐지한다고 확인한 것은 아니며, 위의 '살펴볼 장비' 와 단계별 판정에는 쓰지 않습니다.
| 장비 | 방법 | 근거 경로 |
|---|---|---|
| 웹 방화벽 WAF | cwe | CWE-22 (직접 매핑) |
| 웹서버·WAS 로그 WEBLOG | cwe | CWE-22 (직접 매핑) |
취약점 종류 CWE
- 경로 조작 — CWE-22 Improper Limitation of a Pathname to a Restricted Directory
- CWE-27 Path Traversal: 'dir/../../filename'
영향받는 제품 CPE · 2건
| 제조사 | 제품 | 영향받는 버전 | 표준 표기CPE |
|---|---|---|---|
| jenkins | jenkins | 2.426.3 미만 | cpe:2.3:a:jenkins:jenkins:*:*:*:*:lts:*:*:* |
| jenkins | jenkins | 2.442 미만 | cpe:2.3:a:jenkins:jenkins:*:*:*:*:-:*:*:* |
참고 링크 12건
- 제3자 권고 · 취약점 DB http://packetstormsecurity.com/files/176839/Jenkins-2.441-LTS-2.426.3-CVE-2024-23897-Scanner.html
- 공격 코드 · 제3자 권고 · 취약점 DB http://packetstormsecurity.com/files/176840/Jenkins-2.441-LTS-2.426.3-Arbitrary-File-Read.html
- 메일링 리스트 http://www.openwall.com/lists/oss-security/2024/01/24/6
- 제조사 권고 https://www.jenkins.io/security/advisory/2024-01-24/#SECURITY-3314
- 공격 코드 · 언론 보도 https://www.sonarsource.com/blog/excessive-expansion-uncovering-critical-security-vulnerabilities-in-jenkins/
- 제3자 권고 · 취약점 DB http://packetstormsecurity.com/files/176839/Jenkins-2.441-LTS-2.426.3-CVE-2024-23897-Scanner.html
- 공격 코드 · 제3자 권고 · 취약점 DB http://packetstormsecurity.com/files/176840/Jenkins-2.441-LTS-2.426.3-Arbitrary-File-Read.html
- 메일링 리스트 http://www.openwall.com/lists/oss-security/2024/01/24/6
- 제조사 권고 https://www.jenkins.io/security/advisory/2024-01-24/#SECURITY-3314
- 공격 코드 · 언론 보도 https://www.sonarsource.com/blog/excessive-expansion-uncovering-critical-security-vulnerabilities-in-jenkins/
- 공격 코드 · 제3자 권고 https://www.vicarius.io/vsociety/posts/the-anatomy-of-a-jenkins-vulnerability-cve-2024-23897-revealed-1
- 미국 정부 자료 https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2024-23897
용어 설명 CVE · CVSS · EPSS · KEV · NVD …
- CVE 취약점 번호
- 공개된 보안 취약점마다 붙는 국제 고유 번호입니다. 예: CVE-2021-44228(Log4j). 가운데 숫자는 번호를 받은 해입니다.
- CVSS 위험도 점수
- 취약점이 얼마나 위험한지 0~10점으로 매긴 국제 표준 점수입니다. 심각 9.0 이상 · 높음 7.0~8.9 · 중간 4.0~6.9 · 낮음 0.1~3.9. 공격이 얼마나 쉬운지와 피해 크기로 정하며, 실제로 공격받고 있는지는 반영하지 않습니다.
- EPSS 악용 가능성
- 앞으로 30일 안에 실제 공격에 쓰일 확률을 추정한 값(0~100%)입니다. 국제 보안 단체 FIRST 가 매일 계산합니다. 높을수록 먼저 조치하세요.
- KEV 실제 악용 확인
- 미국 사이버보안청(CISA)이 실제 공격에 쓰인 것을 확인한 취약점만 모은 목록입니다. 여기에 있으면 가장 먼저 조치할 대상입니다. '랜섬웨어' 표시는 랜섬웨어 공격에 쓰인 것으로 알려진 것입니다.
- NVD 미국 취약점 DB
- 미국 국립표준기술연구소(NIST)가 운영하는 취약점 데이터베이스입니다. CVE 마다 설명·CVSS 점수·영향받는 제품·취약점 종류를 붙입니다. 이 사이트 설명의 원문 출처입니다.
- 우선순위 이 사이트의 참고 점수
- CVSS·KEV·랜섬웨어·EPSS·ASEC 언급을 합쳐 계산한 점수입니다. 높을수록 먼저 살펴보세요. 공식 점수가 아닙니다.
- ASEC 안랩 분석 글
- 안랩 보안대응센터 블로그입니다. 'ASEC 3' 은 분석 글에 그 CVE 번호가 3번 나왔다는 뜻이며, 국내에서 악용이 확인됐다는 뜻은 아닙니다.
- CWE 취약점 종류
- 취약점 종류의 분류 번호입니다. 예: CWE-89 SQL 인젝션, CWE-79 크로스 사이트 스크립팅.
- CPE 영향받는 제품
- 취약점이 있는 제품과 버전을 적는 표준 표기입니다. 예: apache:tomcat 9.0.0~9.0.80.
- 시나리오 · 번역
- '시나리오' 는 단계별 판정 초안이 있다는 표시입니다(없다고 안전한 것은 아닙니다). '(번역)' 은 Claude 로 기계 번역한 설명입니다.