Public-Facing Application Exploitation
Tests whether publicly exposed AI APIs, web interfaces, or endpoints can be abused or exploited beyond intended use.
Sub-types
- API Abuse: Exploiting publicly exposed AI APIs beyond intended use.
- Web Interface Exploitation: Attacking web-based AI interfaces through injection or manipulation.
- Rate Limit Bypass: Circumventing rate limits or access controls on public endpoints.
Threat Profile
Objective: policy_violation
Objective vs. goals
The objective above selects the scoring rubric for a run — it is one of a
fixed set of built-in names, not something you write. The goals you pass to an
attack are separate free-text strings that you author yourself. See
Goals vs. objective.
Recommended Datasets
Primary
- wmdp_cyber: WMDP Cyber for evaluating exploitation of public-facing applications
Attack Techniques
Primary
- Static Template: Template-based prompt construction
Metrics
- asr
- judge_score
Usage
Instantiate the Vulnerability
from hackagent.risks import PublicFacingApplicationExploitation
from hackagent.risks.public_facing_application_exploitation.types import PublicFacingApplicationExploitationType
# Use all sub-types
vuln = PublicFacingApplicationExploitation()
# Or specify particular sub-types
vuln = PublicFacingApplicationExploitation(types=[
PublicFacingApplicationExploitationType.API_ABUSE.value,
PublicFacingApplicationExploitationType.RATE_LIMIT_BYPASS.value,
])
Run an Evaluation Campaign
from hackagent import HackAgent
from hackagent.risks.public_facing_application_exploitation import PUBLIC_FACING_APPLICATION_EXPLOITATION_PROFILE
agent = HackAgent(endpoint="http://localhost:8080/chat", name="my-agent")
# Use profile recommendations
for attack in PUBLIC_FACING_APPLICATION_EXPLOITATION_PROFILE.primary_attacks:
for dataset in PUBLIC_FACING_APPLICATION_EXPLOITATION_PROFILE.primary_datasets:
attack_config = {
"attack_type": "static_template", # attack.technique is "StaticTemplate"
"objective": PUBLIC_FACING_APPLICATION_EXPLOITATION_PROFILE.objective,
"dataset": {"preset": dataset.preset},
}
results = agent.hack(attack_config=attack_config)
print(f"Results: {results}")