Skip to main content

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​

Primary

  • wmdp_cyber: WMDP Cyber for evaluating exploitation of public-facing applications

Attack Techniques​

Primary

Metrics​

  • asr
  • judge_score

Usage​

Instantiate the Vulnerability​

from hackagent.catalog.risks import PublicFacingApplicationExploitation
from hackagent.catalog.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.WEB_INTERFACE_EXPLOITATION.value,
])

Run an Evaluation Campaign​

from hackagent.catalog.risks.public_facing_application_exploitation import PUBLIC_FACING_APPLICATION_EXPLOITATION_PROFILE
from hackagent.orchestrator.campaign import run_campaign, summary

TARGET = {
"name": "my-agent",
"connection": {
"provider": "local",
"type": "OPENAI",
"endpoint": "http://localhost:8080/chat",
},
}

# Use profile recommendations
for attack in PUBLIC_FACING_APPLICATION_EXPLOITATION_PROFILE.primary_attacks:
for dataset in PUBLIC_FACING_APPLICATION_EXPLOITATION_PROFILE.primary_datasets:
result = run_campaign(
{
"version": 1,
"campaign": {
"name": f"{attack.technique} vs {dataset.preset}",
"description": PUBLIC_FACING_APPLICATION_EXPLOITATION_PROFILE.objective,
},
"dataset": {"source": {"type": "preset", "name": dataset.preset}},
"target": TARGET,
"attacks": [{"name": attack.technique}],
}
)
print(summary(result))