🇰🇷 한글 설명
OCO-Server의 Apple MDM 등록 엔드포인트에서 PKCS#7 서명 검증 시 인증서 체인 검증을 비활성화하는 취약점이 발견되었습니다. 공격자는 피해 기기의 일련번호를 이용해 위조된 등록 요청을 보내 피해 기기의 MDM 인증서와 개인키를 탈취하고 기기 관리 권한을 가로챌 수 있습니다.
💡 쉬운 설명
해커가 가짜 신분증을 만들어 서버에 제출해도 서버가 이를 제대로 확인하지 않고 통과시키는 문제입니다. 이를 통해 해커는 피해자의 스마트폰 관리 권한을 훔쳐서 기기 정보를 몰래 보거나 제어할 수 있습니다.
🇺🇸 원문 (English)
OCO-Server is a self-hosted endpoint management application for computer inventory, software deployment, and mobile device management. Prior to 1.2.3,the Apple MDM enrollment endpoint `frontend/api-mdm.php` verifies the signed enrollment-request plist with `openssl_pkcs7_verify(..., PKCS7_NOVERIFY, ...)`. `PKCS7_NOVERIFY` disables signer certificate chain and trust validation, so the signature only has to be self-consistent with whatever certificate is embedded in the PKCS#7 blob. A self-signed certificate from an unrelated attacker is accepted. Because the endpoint trusts the `SERIAL` field taken from the unverified payload, anyone who knows a registered device's serial number can sign a forged plist (`SERIAL` = victim device, attacker-chosen `UDID`) with an arbitrary self-signed certificate; POST it unauthenticated to `/api-mdm.php/profile` (Content-Type: `application/pkcs7-signature`); and receive the victim device's freshly minted MDM identity: a certificate with `CN=<serial>` issued by the server's internal MDM device CA, bundled with its private key in a PKCS#12 payload inside the returned `.mobileconfig` enrollment profile. Additionally, the victim's `mobile_device` database row is silently overwritten with the attacker-supplied `UDID` (device-record hijack). With the stolen certificate and key, the attacker can impersonate the victim device on all subsequent MDM traffic (`/checkin`, `/mdm`, `/parameters`), which authenticate callers by the certificate CN (the serial number) via `checkSignature()` in the same file. This yields control over the victim device's MDM relationship: reading its management data, replacing its push token, and disrupting or redirecting its enrollment. Version 1.2.3 fixes the issue.
📍 영향받는 시스템
OCO-Server 1.2.3 미만 버전
⚔️ 공격 벡터
인증되지 않은 상태에서 위조된 PKCS#7 서명 파일을 /api-mdm.php/profile 엔드포인트로 전송
🛡️ 대응 방법
OCO-Server를 최신 보안 패치가 적용된 1.2.3 버전 이상으로 업데이트
🔧 검증 코드
서버 응답에서 버전 정보를 확인하여 1.2.3 미만인지 확인하거나, 관리자 페이지를 통해 설치된 버전을 직접 확인합니다.
curl -s http://<target_ip>/api-mdm.php | grep -i 'version' || echo 'Version info not found via API'
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
💻 영향받는 소프트웨어
IBM WebSphere Application Server