Skip to content
KitploitKITPLOIT
도구익스플로잇블로그
Log in
제출
도구익스플로잇블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

피드문의개인정보© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
trojan-source-check — CI scanner for Trojan Source attacks: bidi control characters (CVE-2021-42574), mixed-script identifiers (CVE-2021-42694), invisible zero-width chars. Stdlib only. | Kitploit
도구/GitHubGitHub/mehul82099/trojan-source-check
Defensive ToolsStatic AnalysisVulnerability ScannersStatic Code Analysis (SAST)Code AnalysisDevSecOpsSupply Chain Security
GitHubmehul82099/trojan-source-check

trojan-source-check

CI scanner for Trojan Source attacks: bidi control characters (CVE-2021-42574), mixed-script identifiers (CVE-2021-42694), invisible zero-width chars. Stdlib only.

저장소 보기
2026년 10월 28일아직 검토되지 않음
공유
요청한 언어로 콘텐츠를 사용할 수 없습니다. 영어 버전을 표시합니다.

trojan-source-check

A CI scanner for the Trojan Source attacks. It reads source files as raw text and flags the characters behind CVE-2021-42574 (bidirectional control characters that make code display differently from how it compiles), CVE-2021-42694 (mixed-script identifiers used in homoglyph attacks), and invisible zero-width characters that can hide tokens.

Pure Python standard library. No language parsing, no dependencies.

The problem

In November 2021, Boucher and Anderson at the University of Cambridge published Trojan Source: Unicode control characters embedded in comments and strings can reorder source code visually, so a human reviewer sees one program while the compiler builds another. Their defense guidance is that toolchains should "throw errors or warnings for unterminated bidirectional control characters in comments or string literals, and for identifiers with mixed-script confusable characters." Most editors still render these characters invisibly. trojan-source-check is that warning, dropped into CI.

Usage

python3 trojan_source_check.py src/
python3 trojan_source_check.py app.py lib/util.py --fail-on-warning
python3 trojan_source_check.py . --format json

Directories are walked recursively (.git, node_modules, __pycache__ and friends are skipped). Binary and non-UTF-8 files are skipped and reported, not scanned.

Exit codes:

CodeMeaning
0Clean (warnings only when --fail-on-warning is off)
1Findings present (errors, or warnings with --fail-on-warning)
2Input problem: an unreadable path

Example output:

app.py:2:16 [error] bidi-control: U+202E RIGHT-TO-LEFT OVERRIDE can visually reorder source code; the Trojan Source attack (CVE-2021-42574) uses these to make code display differently from how it compiles.
trojan-source-check: 1 error(s), 0 warning(s)

Rules

RuleSeverityTriggerGrounding
bidi-controlerrorany of the 9 explicit directional formatting characters: LRE/RLE/PDF/LRO/RLO (U+202A-U+202E) and LRI/RLI/FSI/PDI (U+2066-U+2069)CVE-2021-42574; character semantics from Unicode UAX #9
mixed-script-identifierwarningan identifier-like token mixing Latin letters with Cyrillic or Greek onesCVE-2021-42694 homoglyph attack (heuristic detector, see below)
zero-width-charwarningU+200B ZWSP, U+200C ZWNJ, U+200D ZWJ, U+2060 WORD JOINER, U+00AD SOFT HYPHEN, or U+FEFF anywhere except the very start of a fileinvisible in most editors; can hide tokens or form look-alike identifiers

Honesty notes:

  • bidi-control is stricter than the paper's minimum guidance: the paper asks compilers to warn on unterminated bidi controls inside comments/strings; this scanner flags every occurrence, because any of these characters in source code deserves a human look.
  • mixed-script-identifier is a heuristic, stated as such in its message. It only flags the attack's shape (Latin mixed with Cyrillic/Greek); pure single-script non-Latin identifiers are not flagged, and rare false positives are possible in multilingual code.
  • The scanner reads raw text, not language tokens: a Cyrillic letter inside a string literal is scanned the same as one inside an identifier.

Options

--ignore RULE            suppress a rule by name (repeatable)
--fail-on-warning        exit 1 when only warnings are present
--format text|json       output format (default: text)

Sources

  • Trojan Source: Invisible Vulnerabilities, Boucher & Anderson, University of Cambridge (attack description, CVE-2021-42574 and CVE-2021-42694, defense guidance): https://www.trojansource.codes/
  • Unicode Standard Annex #9, Unicode Bidirectional Algorithm (character names and semantics): https://www.unicode.org/reports/tr9/

Development

42 tests, all fabricated source strings, no network:

python3 -m unittest -v

CI runs the suite on Ubuntu and Windows with Python 3.9 and 3.13.

License

MIT - see LICENSE.

도구 다운로드

관련 도구

  • wazuh

    엔드포인트 및 클라우드 워크로드 전반의 위협 탐지, 로그 분석, 파일 무결성 모니터링, 취약점 평가 및 규정 준수 관리를 위한 오픈소스 XDR 및 SIEM 플랫폼입니다.

  • suricata

    실시간 트래픽 검사, 침입 탐지 및 차단, 프로토콜 분석, 규칙 기반 위협 헌팅을 위한 오픈소스 네트워크 IDS/IPS/NSM 엔진입니다.

  • zeek

    Zeek는 일반적인 IDS와는 매우 다른 강력한 네트워크 분석 프레임워크입니다.

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

  • 1

    ghostlock-app

    yukonga/ghostlock-app

    # GhostLock 원탭 실행 앱 (CVE-2026-43499)

    745
  • 2

    IMSIcatcher

    28zaaky/imsicatcher

    SMS를 가로채고, 메시지를 주입하며, 모바일 기기를 추적하기 위해 악성 GSM 셀을 배포하는 IMSI Catcher 플랫폼

    732
  • 3

    Callisto

    jetp1ane/callisto

    Ghidra를 통해 실행 파일을 디컴파일하고, Semgrep으로 의사 C 코드를 스캔하며, GPT-3.5-Turbo를 사용하여 결과를 검증해 거짓 양성을 줄이는 자동화된 바이너리 취약점 분석 도구입니다.

    610
  • 4

    opencti

    opencti-platform/opencti

    오픈 사이버 위협 인텔리전스 플랫폼

    546
  • 5

    ARTEX

    baarai/artex

    LLM 멀티 에이전트 자율 침투 테스트 플랫폼으로, 플래너/워커 에이전트, 자산 및 탐색 그래프, MITM 트래픽 기록, 취약점 재테스트 기능을 제공합니다.

    414
  • 6

    DFRoot

    a2333c/dfroot

    삼성 Galaxy S25 Ultra(SM-S938B)용 Android 루트 도구로, DirtyFrag CVE-2026-43284와 CVE-2026-43499를 연쇄하여 KernelSU를 통해 부팅 시 자동으로 루트 권한을 획득합니다.

    413

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →