Skip to content
ai-supply.store
탐색카테고리리더보드커뮤니티Agent APIFAQ
로그인무료 가입
catalog / Cybersecurity / Counterfit — ML Model Security Testing CLI
◉AgentCybersecurityFree

Counterfit — ML Model Security Testing CLI

Microsoft Azure's CLI for adversarial robustness testing of ML models: evasion, poisoning, extraction attacks.

@ai-supply
설치 수17k
⟳ upstream v1.1.0 · updated 3y ago
↗ 소스 저장소
← More CybersecurityCybersecurity leaderboard →How we grade security →Source ↗
! Grade B · 75/100 · ReviewSecurity assessment
✓No compromise signals12capabilities surfaced1known CVE9of 20 OWASP controls clear
Potentially unbounded loopVulnerable dependenciesExternal endpoints declared · expectedExternal endpoints declared · expected
scanned 18d ago · partial·osv · gitleaks · opengrep · picklescan + heuristics·full breakdown in the Security tab ↓

Counterfit — ML Model Security Testing CLI

Counterfit is a Microsoft Azure open-source CLI that provides a generic automation layer for assessing AI/ML model security. It wraps popular attack libraries (ART, TextAttack, Augly) behind a single interface so red teams can probe any model — whether it's a REST endpoint, a local PyTorch model, or a cloud API.

Key features

  • Unified interface over 20+ attack algorithms (evasion, poisoning, model extraction, inference)
  • Works against black-box REST endpoints — no source code required
  • Replay attack logs for reproducible security reports
  • Out-of-the-box target adapters for image classifiers and NLP models
  • Built-in logging to Azure Monitor or local JSON

Quick start

pip install counterfit
cf # launch interactive CLI
# Inside the CLI:
list targets
set_target common-cartpole
list attacks
set_attack art-boundary
run
npx ai-supply add counterfit-ml-security-cli

Curated mirror of the open-source Counterfit (MIT). Get it from the source.

Rating rank
#1
of 19 in Cybersecurity
Install rank
#17
of 19 in Cybersecurity
Security score
75/100 · B
review
Security rank
#12
of 19 in Cybersecurity
Installs
17k
cat avg 85k
This listing vs category average
Installs
this
cat avg
Security (of 100)
this
cat avg
Adoption trend
See the Cybersecurity leaderboard →
! Security: Review · 7575/100 · grade Bscanned 18d ago
✓ no compromise signals13 risk-surface · 6/20 OWASP controls flagged

Compromise signals — malicious or tampered code (leaked secrets, backdoors, a dropped executable) — reduce the score, and known dependency CVEs carry a bounded penalty (they warrant review but never QUARANTINE — update the dependency to clear). Other dangerous-by-capability traits are risk surface, expected for some capabilities. Every finding is mapped to its OWASP control below.

What this capability can do · med confidence (static)
⚑ filesystem⚑ shell⚑ network⚑ secrets
egress → crontab.guru, opensource.microsoft.com, img.shields.io, gist.githubusercontent.com, docs.conda.io, www.anaconda.com, git-scm.com, azure.microsoft.com +21

Findings mapped to the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any flagged control for the exact findings — compromise reduces the score; expected/risk-surface do not, except a known CVE, which carries a small bounded penalty (high/critical → Review).

OWASP Top 10 for LLM Applications
⚠LLM03Supply Chaincritical
Vulnerable/compromised dependencies, models or archives in the artifact.
•Dependency manifest — 36 pip requirements declared · counterfit/requirements.txtrisk surface
•Vulnerable dependencies — 219 known vulnerabilities in: azure-storage-blob@12.1.0, flask@2.0.0, lightgbm@3.3.1, orjson@3.6.4, pillow@9.2.0, protobuf@3.9.2, pytest@6.2.5, pytorch-lightning@1.6.0 (CWE-1395)known CVE · -25 pts
⚠LLM05Improper Output Handlinghigh
Code that pipes model/user output into shell, eval, SQL or paths unsafely.
•Suspicious code patterns — dynamic code execution · counterfit/counterfit/targets/cart_pole/DCPW.py (CWE-95)expected
•Suspicious code patterns — pickle deserialization · counterfit/counterfit/targets/cart_pole/generate_videos.py (CWE-502)expected
•Suspicious code patterns — dynamic code execution; pickle deserialization · counterfit/counterfit/targets/movie_reviews.py (CWE-95)expected
•Suspicious code patterns — OS command execution · counterfit/examples/terminal/commands/docs.py (CWE-78)expected
•Suspicious code patterns — destructive rm -rf / · counterfit/infrastructure/Dockerfile (CWE-78)expected
⚠LLM06Excessive Agencyhigh
Over-broad tool/permission surface or unrestricted egress.
•External endpoints declared — 1 distinct host(s) · counterfit/.github/workflows/testcoverage.yamlexpected
•External endpoints declared — 2 distinct host(s) · counterfit/.github/workflows/tests.yamlexpected
•External endpoints declared — 14 distinct host(s) · counterfit/README.mdexpected
•External endpoints declared — 6 distinct host(s) · counterfit/SECURITY.mdexpected
•Egress to a private/loopback host — 127.0.0.1 · counterfit/examples/terminal/commands/docs.py (CWE-918)expected
⚠LLM10Unbounded Consumptionmedium
Unbounded loops/recursion causing DoS or runaway cost.
Enforced at runtime by the gateway (rate limits + spend caps + size caps); static check flags unbounded loops.
•Potentially unbounded loop — an infinite loop (while True / while(1) / for(;;)) may cause runaway consumption · counterfit/counterfit/targets/cart_pole/cart_pole.py (CWE-835)risk surface
§LLM09MisinformationGovernance
Artifacts designed to produce false/deceptive output.
Detectable only by runtime behavioral evaluation; addressed via responsible-use attestation.
✓LLM01Prompt InjectionPassed
✓LLM02Sensitive Information DisclosurePassed
✓LLM04Data and Model PoisoningPassed
Backdoors/poisoning in training data or serialized models.
Behavioral poisoning needs model execution; static check covers unsafe serialization + dataset skew only.
✓LLM07System Prompt LeakagePassed
✓LLM08Vector and Embedding WeaknessesPassed
PII or plaintext source leakage in embedding/vector exports.
Embedding inversion/poisoning is largely runtime; static check covers PII in vector exports.
OWASP Machine Learning Security Top 10
⚠ML06AI Supply Chaincritical
Compromised PyPI/npm packages, typosquats, unsafe serialized models.
•Dependency manifest — 36 pip requirements declared · counterfit/requirements.txtrisk surface
•Vulnerable dependencies — 219 known vulnerabilities in: azure-storage-blob@12.1.0, flask@2.0.0, lightgbm@3.3.1, orjson@3.6.4, pillow@9.2.0, protobuf@3.9.2, pytest@6.2.5, pytorch-lightning@1.6.0 (CWE-1395)known CVE · -25 pts
⚠ML09Output Integrityhigh
Middleware tampering with model outputs in transit.
Gateway enforces TLS + response integrity; static check flags output-rewriting code.
•Suspicious code patterns — dynamic code execution · counterfit/counterfit/targets/cart_pole/DCPW.py (CWE-95)expected
•Suspicious code patterns — pickle deserialization · counterfit/counterfit/targets/cart_pole/generate_videos.py (CWE-502)expected
•Suspicious code patterns — dynamic code execution; pickle deserialization · counterfit/counterfit/targets/movie_reviews.py (CWE-95)expected
•Suspicious code patterns — OS command execution · counterfit/examples/terminal/commands/docs.py (CWE-78)expected
•Suspicious code patterns — destructive rm -rf / · counterfit/infrastructure/Dockerfile (CWE-78)expected
§ML01Input Manipulation (Adversarial)Governance
Models vulnerable to adversarial perturbations.
Requires runtime robustness evaluation; addressed via publisher robustness attestation.
§ML03Model InversionGovernance
Training data reconstructable from a model's outputs.
Runtime/evaluation property; addressed via model-card data-provenance + DP attestation.
§ML04Membership InferenceGovernance
Determining whether a record was in the training set.
Runtime/evaluation property; addressed via overfitting disclosure + DP attestation.
§ML08Model SkewingGovernance
Models trained on skewed data producing biased output.
Requires fairness evaluation; addressed via model-card bias/limitations disclosure.
✓ML02Data PoisoningPassed
Poisoned training datasets with triggers or anomalous distributions.
Static check covers trigger phrasing, PII and label skew; full poisoning detection is runtime.
✓ML05Model TheftPassed
Unlicensed re-distribution / license-incompatible derivatives.
Static check verifies license declaration; extraction throttling is runtime.
✓ML07Transfer Learning AttackPassed
Backdoored base models / LoRA adapters propagating to derivatives.
Backdoor detection needs behavioral probing; static check covers unsafe serialization + provenance.
✓ML10Model Poisoning (Weights)Passed
Tampered model weight files; integrity must be verifiable.
Static check enforces safe formats + records a content hash for downstream verification.
Other findings (3) · hygiene / uncategorized
•Suspicious network references — raw IP URL (1 URLs) · counterfit/examples/terminal/commands/docs.pyexpected
•Unrecognized file type — '.?' is not on the allowlist · counterfit/infrastructure/Dockerfilerisk surface
•Unrecognized file type — '.ini' is not on the allowlist · counterfit/pytest.inirisk surface
✔ verified source · pinned partial
Check against a policy

The same gate an agent runs before installing (POST /api/v1/trust/counterfit-ml-security-cli/check). Click a policy:

Consume Counterfit — ML Model Security Testing CLI programmatically. Authenticate with an API key or session — see Authorize an agent.

# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/counterfit-ml-security-cli

# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/counterfit-ml-security-cli/check \
  -H "Content-Type: application/json" \
  -d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'

# CLI
npx ai-supply add counterfit-ml-security-cli

# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/counterfit-ml-security-cli/install \
  -H "Authorization: Bearer $AIM_KEY"

# MCP tool
install_listing({ "slug": "counterfit-ml-security-cli" })
OpenAPI spec →
vlatest
! Security: Review · 751mo ago

Curated mirror — latest upstream source. See the repository for tagged releases.

Sign in and install this listing to leave a review.

More from @ai-supply

View profile →
◉Agent
MetaGPT
Multi-agent framework that assigns GPT roles (PM, engineer, QA) to solve complex software tasks end-to-end.
↓ 1.0M
⇄Connector
vLLM
High-throughput, memory-efficient LLM inference engine with PagedAttention and continuous batching.
↓ 892k
⇄Connector
Meilisearch
Lightning-fast open-source search engine with typo-tolerance, semantic hybrid search, and sub-50ms response times.
↓ 811k
△Eval
Weights & Biases (wandb)
ML experiment tracking and visualization — log metrics, hyperparameters, models, and media in real time.
↓ 784k
ai-supply.store

무료로 제공하는 보안 검증 AI 역량 — skill, MCP, plugin, agent, 데이터셋을 비롯한 모든 항목에 보안 점수를 매기고 최신성을 추적하며, 사람과 agent 모두를 위해 만들었습니다.

api · v3.1status · all green
문의하기
support@ai-supply.storesecurity@ai-supply.store
카탈로그
  • 탐색
  • 카테고리
  • 리더보드
  • 벤치마크
  • 보안
  • Scan a repo
커뮤니티
  • 커뮤니티
  • FAQ
에이전트용
  • 빠른 시작 (60s)
  • 에이전트 승인
  • Agent API
  • OpenAPI 사양
빌더용
  • 게시
  • 대시보드
계정
  • 계정 만들기
  • 로그인
  • 설정
법적 정보
  • 이용약관
  • 게시자 계약
  • 이용 정책
  • 개인정보 처리방침