Skip to content
KitploitKITPLOIT
ツールエクスプロイトブログ
Log in
提出
ツールエクスプロイトブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
deleting-the-trace — ツール利用型LLMエージェントに対する制御トークン連鎖思考抑制とパーサー寛容性攻撃の実験 | Kitploit
ツール/GitHubGitHub/usama1002/deleting-the-trace
脆弱性分析エクスプロイト機械学習論文と研究AIセキュリティ敵対的攻撃
GitHubusama1002/deleting-the-trace

deleting-the-trace

ツール利用型LLMエージェントに対する制御トークン連鎖思考抑制とパーサー寛容性攻撃の実験

リポジトリを見る
161日前未レビュー

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有

ツール利用エージェントに対する制御トークン注入攻撃

ツール利用言語モデルエージェントに対する2つの入力レベル攻撃を研究したコードと記録済み測定値。第1の攻撃は、モデル自身のチャネル制御トークンの短い文字列を信頼できない入力に追加する。トークナイザはそれを既に閉じられた推論チャネルとして読み取るため、モデルは連鎖的思考を出力せず、直接ツール呼び出しへ進む。これによりモニタが依存する推論トレースが削除され、モデルが本来拒否するリクエストでは拒否が完了済みアクションに変換される。第2の結果は、同一のツール呼び出し生成が実際に発火するかどうかはモデルではなくハーネスパーサによって決定されるため、エージェントの堅牢性はモデルとそのデコーディングおよびパースハーネスの共同特性であるということである。

すべての実験は、リリースされたツールサンドボックスを通じて完全精度(bfloat16)かつ貪欲デコーディングで実行され、results/ 以下の記録済みJSONはすべてここにあるスクリプトによって生成される。

論文:「Control-Token Injection Suppresses Chain-of-Thought and Defeats Reasoning-Based Oversight in Tool-Using Agents」。

知見

  1. 制御トークン注入は推論チャネルを抑制しつつ、安全でないツール呼び出しは依然として発火し、内容を読む連鎖的思考モニタを無効化し、モデル自身の拒否を回避する。空推論トリップワイヤは基本的な攻撃を捕捉するが、1行の無害なデコイによって回避される。
  2. ハーネスパーサの寛容さが、モデル非依存でツール呼び出しの発火を左右する。切り捨て耐性のあるパーサは閉じトークンが欠落した呼び出しを発火させる一方、厳格なパーサはそれを破棄する。1つのモデルとその貪欲デコーディングを固定したまま、2つの出荷済みパーサが正反対のセキュリティ結果を生み出す。

要件

  • ターゲットモデルをbfloat16で扱うのに十分なメモリを備えたCUDA GPU 1台(実行は単一のNVIDIA H200、141 GBで生成された)。
  • Python 3.12、CUDA対応PyTorch、および requirements.txt に固定されたパッケージ(aicomp-sdk 3.1.2、transformers 5.16.1、gymnasium 0.29、openai、openai-harmony)。
  • Hugging Face上のターゲットモデルへのアクセス:openai/gpt-oss-20b、google/gemma-4-26B-A4B-it、、。
deepseek-ai/DeepSeek-R1-Distill-Qwen-7B
Qwen/Qwen3-4B-Thinking-2507

セットアップ:

root@kitploit:~
python3 -m venv --system-site-packages .venv
source .venv/bin/activate
pip install -r requirements.txt

# download the target models (needs an authenticated Hugging Face CLI)
hf download openai/gpt-oss-20b
hf download google/gemma-4-26B-A4B-it
hf download deepseek-ai/DeepSeek-R1-Distill-Qwen-7B
hf download Qwen/Qwen3-4B-Thinking-2507

gpt-oss-20b は transformers 4.57 または 5.16 で動作する。gemma-4-26B-A4B-it は transformers 5.16 を必要とするマルチモーダルモデルである。gpt-oss の推論抑制測定は両バージョンで同一である。

実験の実行

すべての実験スクリプトは共有ハーネスをインポートするため、experiments をパスに含めて実行すること。各スクリプトは出力を results/ に書き込む。

root@kitploit:~
export PYTHONPATH=experiments

# reproduction gate: the forge empties the gpt-oss analysis channel while the call still fires
python scripts/h200_gate.py

# E1: chain-of-thought suppression at scale
python experiments/e1_cot_suppression.py

# E2: monitor evasion and refusal bypass (generate traces, then score three monitors)
python experiments/e2b_generate.py
JUDGE=gemma python experiments/e2b_judge.py

# E3: parser leniency
python experiments/e3a_parser_leniency.py                 # deterministic, no model
MODEL=gpt_oss python experiments/e3b_end2end.py
MODEL=gemma   python experiments/e3b_end2end.py
python experiments/e3c_gemma_parser_ab.py                 # same model, two parsers

# E4: generality across reasoning models
MODEL=deepseek-ai/DeepSeek-R1-Distill-Qwen-7B TAG=deepseek python experiments/e4_generality.py
MODEL=Qwen/Qwen3-4B-Thinking-2507 TAG=qwen3 python experiments/e4_generality.py

# E5: defenses
python experiments/e5_defenses.py                         # input sanitization
python experiments/e5_d2_parser_hardening.py              # parser hardening, deterministic

# W1 to W3: ablation, token-level grounding, indirect delivery, cross-stack parser
python experiments/w1_forge_variants.py
python experiments/w1_tokenlevel.py
python experiments/w2_indirect.py
python experiments/w3_truncation_sweep.py

# adaptive empty-reasoning evasion (raw traces, effort sweep, decoy attack, monitor matrix)
python experiments/ad_traces_effort.py
python experiments/ad_decoy.py
python experiments/ad_decoy_judge.py

# regenerate the results figure from the logged JSON
python scripts/make_results_fig.py

リポジトリ構造

root@kitploit:~
experiments/harness.py            shared harness: build an agent, run a message through the
                                  sandbox gym env, and read back the reasoning channel, the
                                  fired tool events, and the predicates
experiments/e1_*.py               chain-of-thought suppression at scale
experiments/e2*_*.py              monitor evasion and refusal bypass (generate, then judge)
experiments/e3*_*.py              parser leniency: deterministic, end-to-end, and A/B
experiments/e4_*.py               generality across reasoning models
experiments/e5_*.py               defenses: sanitization and parser hardening
experiments/w1_*.py               ablation of the injected string and token-level grounding
experiments/w2_*.py               indirect delivery and broader action types
experiments/w3_*.py               truncation robustness of the attack
experiments/ad_*.py               adaptive empty-reasoning evasion and raw traces
experiments/*_probe.py, *_debug.py supporting probes used while building the study
scripts/h200_gate.py              the reproduction gate
scripts/make_results_fig.py       the results figure
results/*.json                    logged measurements produced by the scripts above

主要な結果

実験測定値
E1 (gpt-oss-20b)推論チャネルが52.5から0トークン(55タスク中55で空)、安全でないアクションが100パーセント発火
E2 モニタ回避ルールベースおよび言語モデルモニタは注入なしで100パーセント検出、注入ありで0パーセント検出。拒否の39.6パーセントが完了済みの持ち出しに変換
E3c パーサA/B (Gemma)同一モデルおよび貪欲デコーディング:regexパーサは24中24発火、ネイティブプロセッサパーサは24中0発火
E4 一般性gpt-ossは入力注入に対して脆弱。Qwen3-Thinkingのコンプライアンスは閉チャネルプリミティブ下で0.08から1.00へ。DeepSeekは堅牢
E5 防御スペース置換サニタイザは攻撃を無効化。単純削除は無害な入力で失敗。パーサ強化は切り捨てられた呼び出しを破棄
適応型空推論トリップワイヤは空のforgeを捕捉するが、100パーセント発火する1行の無害なデコイによって回避される

再現性に関する注記

デコーディングは貪欲であるため、各レートは入力ごとに決定論的であり、報告された区間は有限のタスクサンプルを反映している。シード123および8ホップの対話ループはリリースされたサンドボックスと一致する。ターゲットモデルのリビジョンとtransformersのバージョンは requirements.txt に固定され、各スクリプトに記載されている。

ライセンス

MIT License。LICENSE を参照。

ツールをダウンロード