Attack Types Reference¶
HiveTraceRed includes 92 attack implementations organised into two sub-packages: single_turn/ (one attack prompt per invocation, including the iterative PAIR/TAP searches) and multi_turn/ (multi-message conversations with the target, currently Crescendo). Each attack is selected in a pipeline config by its config key.
Attacks That Need an Attacker Model¶
Three attacks make more than one model call per prompt and require an attacker_model (and usually judges) in the config. They fall into two distinct kinds:
Conversational (multi-turn) —
CrescendoAttack(conversational). Drives a single persistent dialogue with the target, escalating across many turns and backtracking on refusal. See Crescendo Attack.Iterative single-prompt —
PAIRAttackandTAPAttack(iterative). These are not multi-turn: they repeatedly refine one attack prompt and send each candidate to the target as an independent single-turn request. PAIR follows a single refinement path; TAP explores a branch-and-prune tree.
All three run through the pipeline config as well as the Python API. Iterative attacks resolve their evaluator from a per-attack evaluator: block, the dataset’s evaluator (if it is a ScoringJudgeEvaluator), or a default judge built from evaluation_model. See the multi-step example in Quickstart - API-based Testing.
Complete Attack Reference¶
All 92 attacks grouped by category. The config key is the value you put under attacks: - name: in a pipeline YAML config; the attack type is the attack_type string shown in bracketed monospace next to each category heading.
Conversational — multi-turn (conversational)¶
Config key ( |
Attack |
|---|---|
|
Crescendo |
Iterative — single-prompt refinement (iterative)¶
Config key ( |
Attack |
|---|---|
|
PAIR |
|
TAP |
Context Switching (context_switching)¶
Config key ( |
Attack |
|---|---|
|
Dashed Divider |
|
Forget Everything Before |
|
Ignore Previous Instructions |
|
Symbol Divider |
In-Context Learning (in_context_learning)¶
Config key ( |
Attack |
|---|---|
|
Few Shot JSON |
|
Many Shot Jailbreak |
Irrelevant Information (irrelevant_information)¶
Config key ( |
Attack |
|---|---|
|
Distractors |
|
Distractors Negated |
|
Irrelevant Information |
Output Formatting (output_formatting)¶
Config key ( |
Attack |
|---|---|
|
Base64 Output |
|
CSV Output |
|
GCG Transfer Harmbench |
|
GCG Transfer Universal |
|
JSON Output |
|
Language Output |
|
Prefix Injection |
|
Prefix Injection Of Course |
|
Refusal Suppression |
Persuasion (persuasion)¶
Config key ( |
Attack |
|---|---|
|
Affirmation |
|
Alliance Building |
|
Anchoring |
|
Authority Endorsement |
|
Compensation |
|
Complimenting |
|
Confirmation Bias |
|
Creating Dependency |
|
Discouragement |
|
Door In The Face |
|
Encouragement |
|
Evidence Based Persuasion |
|
Expert Endorsement |
|
Exploiting Weakness |
|
False Information |
|
False Promises |
|
Favor |
|
Foot In The Door |
|
Framing |
|
Injunctive Norm |
|
Logical Appeal |
|
Loyalty Appeals |
|
Misrepresentation |
|
Negative Emotion Appeal |
|
Negotiation |
|
Non Expert Testimonial |
|
Positive Emotion Appeal |
|
Priming |
|
Public Commitment |
|
Reciprocity |
|
Reflective Thinking |
|
Relationship Leverage |
|
Rumors |
|
Shared Values |
|
Social Proof |
|
Social Punishment |
|
Storytelling |
|
Supply Scarcity |
|
Threats |
|
Time Pressure |
Roleplay (roleplay)¶
Config key ( |
Attack |
|---|---|
|
AIM |
|
DAN |
|
Evil Confidant |
Simple Instructions (simple_instructions)¶
Config key ( |
Attack |
|---|---|
|
None |
Task Deflection (task_deflection)¶
Config key ( |
Attack |
|---|---|
|
Code |
|
Fill Spaces |
|
Payload Splitting |
|
Text Continuing |
|
Unsafe Word Variable Full |
|
Variable Prompt |
|
Wikipedia |
Text Structure Modification (text_structure_modification)¶
Config key ( |
Attack |
|---|---|
|
Back To Front |
|
Disemvowel |
|
JSON Transform |
|
Past Tense |
|
Translation |
|
Typo |
|
Vertical Text |
|
Word Divider |
|
Zero Width |
Token Smuggling (token_smuggling)¶
Config key ( |
Attack |
|---|---|
|
Atbash Cipher |
|
Base64 Input Only |
|
Binary Encoding |
|
Encoding |
|
Hex Encoding |
|
Html Entity |
|
Leetspeak |
|
Morse Code |
|
Rot Cipher |
|
Transliteration |
|
Unicode Russian Style |
Using Attacks¶
from hivetracered.attacks import DANAttack, Base64OutputAttack
# Basic usage
attack = DANAttack()
modified_prompt = attack.apply("Your prompt here")
# Composing attacks
composed = Base64OutputAttack() | DANAttack()
result = composed.apply("Your prompt")
For detailed usage examples, see Creating Custom Attacks.
Attack Selection¶
Basic Testing: Start with
NoneAttack(baseline) andDANAttackAdvanced Testing: Use composed attacks and encoding techniques
Robustness Testing: Mix categories and test multilingual attacks
For custom attack creation and detailed strategies, see Creating Custom Attacks.
See Also¶
Attacks API - Attack API reference
Creating Custom Attacks - Creating custom attacks
Quickstart - API-based Testing - Quick start guide (cloud APIs)
Quickstart - On-Premise Testing - Quick start guide (on-premise)