
Danfoss AK-SM 8xxA CVE-2025-41450/-41451/-41452에 대한 PoC 및 탐지 툴킷: 코드 오브 더 데이 인증 우회, 알람-투-메일 RCE, nginx 설정 인젝션, Suricata/Sigma 규칙 포함.
Claroty Team82가 공개하고 Danfoss가 R4.2 / R4.3.1에서 수정한 세 가지 AK-SM 8xxA 웹 인터페이스 취약점(DSA-2025-03-01, DSA-2025-08-01, CISA ICSA-25-140-03)에 대한 연구/탐지 엔지니어링 PoC:
| CVE | 취약점 | 영향받는 버전 | 수정 버전 |
|---|---|---|---|
| CVE-2025-41450 | xml.cgi?action=getauth의 숨겨진 "code-of-the-day" 인증 우회(날짜/시간 기반 비밀번호) | < R4.2 | R4.2 |
| CVE-2025-41451 | 알람-메일 / SMTP 설정(item 0x1be1)의 인증 후 OS 명령 주입 | < 4.3.1 | 4.3.1 |
| CVE-2025-41452 | action=load_nginx_headers를 통한 인증 후 nginx headers.conf 교체 → 지시문 주입 + sm_app 크래시 DoS | < 4.3.1 | 4.3.1 |
emulator/aksm800a_emulator.py vulnerable-behavior emulator (127.0.0.1 only)
poc/cve_2025_41450_code_of_the_day.py
poc/cve_2025_41451_alarm_mail_cmd_injection.py
poc/cve_2025_41452_nginx_conf_injection.py
detection/suricata/danfoss-aksm-cves.rules Suricata rules (see in-file caveats)
detection/sigma/*.yml Sigma host/log rules
detection/test_rules_against_captures.py replay captures against the ruleset
captures/http-requests.jsonl full request log, tagged per CVE
WRITEUP.md FROMAGEGATE incident context + full research summary
Python 3 표준 라이브러리만 사용하며, 의존성이 없습니다.
python3 emulator/aksm800a_emulator.py 8080 & # start the target
python3 poc/cve_2025_41450_code_of_the_day.py # exit 0 = bypass works
python3 poc/cve_2025_41451_alarm_mail_cmd_injection.py
python3 poc/cve_2025_41452_nginx_conf_injection.py # add --no-dos to skip DoS
python3 detection/test_rules_against_captures.py # replay captures vs Suricata rules
41451 및 41452 PoC는 기본적으로 41450 우회를 통해 연쇄 실행됩니다(실제 공격자는 구성된 자격 증명이 없음). 두 PoC 모두 --user/--password(41451)를 받아 정상 세션에서 시작할 수도 있습니다. 모든 PoC는 --target HOST:PORT를 받으므로 실제 취약한 펌웨어에 대해서도 동작합니다. 단, code-of-the-day 알고리즘과 우회 속성 이름은 펌웨어에서 복구한 값으로 교체해야 합니다(아래 주의사항 참조).
각 에뮬레이터 요청은 태그와 함께 captures/http-requests.jsonl에 기록됩니다. 안정적이고 시그니처로 활용할 만한 네트워크 아티팩트는 다음과 같습니다:
CVE-2025-41450 (인증 우회)
POST /xml.cgi?action=getauth (여기서는 codeofday=1 / support=1; 실제 이름은 공개 자료에서 가려져 있으므로 최종 규칙을 위해서는 펌웨어에서 복구해야 함).Server: nginx)은 본질적으로 취약함 — 배너/버전 탐지가 가장 신뢰도 높은 신호임.CVE-2025-41451 (명령 주입 → RCE)
0x1be1)에 셸 메타문자(; | & $() `)를 포함한 인증된 POST /xml.cgi?action=set_email_config. 정상 SMTP 비밀번호에는 ;+명령이 거의 포함되지 않음.x'; <cmd> # / $(<cmd>) 등 — 값이 셸에 정확히 어떻게 전달되는지는 태그된 constructed_cmd: 로그 라인 참조.id, curl, ...)를 생성함.CVE-2025-41452 (nginx 구성 주입 → 트래픽 조작 / DoS)
xml.cgi?action=load_nginx_headers(파일명 headers.conf)로의 인증된 멀티파트 업로드. 이 엔드포인트는 드문 관리자 유지보수 외에는 정상적인 호출 이유가 없으므로 볼륨 기반 경보가 유효함.location, proxy_pass, rewrite, add_header 지시문이 포함됨.emulator/aksm800a_emulator.py:generate_code)을 제공합니다. PoC와 에뮬레이터가 이를 공유하므로 연쇄는 엔드투엔드로 동작합니다. 실제 하드웨어의 경우 펌웨어에서 check_code_of_day를 추출하여 대체하십시오.id → 증명 파일). 127.0.0.1에서만 바인드/실행하십시오.