🇰🇷 한글 설명
Fickling은 Python 피클링 디컴파일러 및 정적 분석기입니다. 버전 0.1.7 이전에는 ctypes 및 pydoc 모듈이 명시적으로 차단되지 않았습니다. 이는 RCE(원격 명령어 실행)를 가능하게 하며, 스캐너는 파일을 LIKELY_SAFE로 보고합니다. 이 문제는 버전 0.1.7에서 해결되었습니다.
💡 쉬운 설명
Fickling은 Python의 피클링 디컴파일러입니다. 버전 0.1.7 이전에는 일부 모듈이 제대로 차단되지 않아 원격 명령어 실행 취약점이 존재했습니다. 이를 이용하면 공격자가 시스템을 제어할 수 있습니다.
🇺🇸 원문 (English)
Fickling is a Python pickling decompiler and static analyzer. Prior to version 0.1.7, both ctypes and pydoc modules aren't explicitly blocked. Even other existing pickle scanning tools (like picklescan) do not block pydoc.locate. Chaining these two together can achieve RCE while the scanner still reports the file as LIKELY_SAFE. This issue has been patched in version 0.1.7.
📍 영향받는 시스템
Fickling 버전 0.1.7 이전
⚔️ 공격 벡터
ctypes 및 pydoc 모듈을 이용한 RCE
🛡️ 대응 방법
Fickling 버전 0.1.7 이상으로 업데이트
🔧 검증 코드
로컬 시스템에서 Python을 실행하고, fickling 패키지를 설치한 후 코드를 실행합니다. 코드는 현재 시스템의 Fickling 버전을 확인하고, 버전 0.1.7 미만일 경우 취약으로 판단합니다.
import pkg_resources
try:
version = pkg_resources.get_distribution('fickling').version
if version < '0.1.7':
print({"result": "취약", "reason": "Fickling 버전이 0.1.7 미만"})
else:
print({"result": "양호", "reason": "Fickling 버전이 0.1.7 이상"})
except pkg_resources.DistributionNotFound:
print({"result": "미설치", "reason": "Fickling이 설치되지 않음"})