githubEdit

Web Service And API Attacks

XML-RPC Attacks

Manual Request Crafting (curl)

curl -X POST -H "Content-Type: text/xml" -d '<?xml version="1.0"?><methodCall><methodName>examples.getStateName</methodName><params><param><value><i4>41</i4></value></param></params></methodCall>' http://target.com/RPC2

Fuzzing with wfuzz

wfuzz -z file,xmlrpc_methods.txt -d '<?xml version="1.0"?><methodCall><methodName>FUZZ</methodName><params><param><value><i4>1</i4></value></param></params></methodCall>' http://target.com/RPC2

JSON-RPC Attacks

Manual Request Crafting (curl)

curl -X POST -H "Content-Type: application/json-rpc" -d '{"method": "sum", "params": {"a": 3, "b": 4}, "id": 0}' http://target.com/ENDPOINT

Fuzzing with wfuzz

wfuzz -z file,jsonrpc_methods.txt -d '{"method": "FUZZ", "params": {}, "id": 0}' http://target.com/ENDPOINT

SOAP Attacks

Manual Request Crafting (curl)

curl -X POST -H "Content-Type: text/xml;charset=UTF-8" -d '<?xml version="1.0"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><m:GetQuotation xmlns:m="http://www.xyz.org/quotations"><m:QuotationsName>Microsoft</m:QuotationsName></m:GetQuotation></SOAP-ENV:Body></SOAP-ENV:Envelope>' http://target.com/Quotation

RESTful API Attacks

Basic HTTP Requests (curl)

Fuzzing with wfuzz

SSRF Tests (curl)

XXE Tests (curl)

JWT Attacks (using jwt_tool)

API Rate Limiting Bypass (using ffuf)

General Web Service/API Tools

Nmap (Network Scanning)

Nikto (Web Server Scanning)

Gobuster (Directory Brute-forcing)

SQLmap (SQL Injection)

Burp Suite (GUI & Automation via Burp APIs)

Postman (API Testing & Automation via Newman)

OWASP ZAP (Automated Security Testing)

Wsdump.pl (WSDL analysis, part of OWASP WSFuzzer)

Key Things to Remember

  • Placeholders: Replace target.com, http://target.com/api/endpoint, etc., with actual targets.

  • Wordlists: Ensure xmlrpc_methods.txt, jsonrpc_methods.txt, api_endpoints.txt exist.

  • Dependencies: Install tools (curl, wfuzz, nmap, etc.) before testing.

  • Ethical Use: Only test on systems you have explicit permission for.

  • Burp Suite/Postman: Primarily GUI tools but support CLI automation.

  • OWASP ZAP: Requires CLI tools installed for automation.

Last updated