The SOAP WS Login Service allows clients to authenticate using their client_id and client_secret, receiving a JSON Web Token (JWT) for further interaction with secured services.
POST /webservices/soap/ws-login.php
Here’s how to send a SOAP request to the login service using Burp Repeater:
POST /webservices/soap/ws-login.php HTTP/1.1
Host: mutillidae.localhost
Content-Type: text/xml; charset=utf-8
SOAPAction: "urn:ws-login#login"
Content-Length: [length]
Connection: close
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:ws-login">
<soapenv:Header/>
<soapenv:Body>
<urn:login>
<client_id>fb975a0e0248994221b3a6e87ba92fe9</client_id>
<client_secret>f1d10934f1525ebfdf0b08a2413a3a3f683eaae3913489c786e496e403ab7bff</client_secret>
<audience>http://mutillidae.localhost/webservices/soap/ws-user-account.php</audience>
</urn:login>
</soapenv:Body>
</soapenv:Envelope>
Instructions:
Content-Length header to match the byte size of the body.curlIf you prefer using the command line, here’s how to send the same request with curl:
curl -X POST "http://mutillidae.localhost/webservices/soap/ws-login.php" \
-H "Content-Type: text/xml; charset=utf-8" \
-H "SOAPAction: "urn:ws-login#login"" \
--data '<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:ws-login">
<soapenv:Header/>
<soapenv:Body>
<urn:login>
<client_id>fb975a0e0248994221b3a6e87ba92fe9</client_id>
<client_secret>f1d10934f1525ebfdf0b08a2413a3a3f683eaae3913489c786e496e403ab7bff</client_secret>
<audience>http://mutillidae.localhost/webservices/soap/ws-user-account.php</audience>
</urn:login>
</soapenv:Body>
</soapenv:Envelope>'
Instructions:
curl command.fb975a0e0248994221b3a6e87ba92fe9 and f1d10934f1525ebfdf0b08a2413a3a3f683eaae3913489c786e496e403ab7bff with valid values.Upon successful authentication, the server will respond with a JWT token:
<?xml version="1.0"?>
<response>
<access_token>your-jwt-token</access_token>
<token_type>bearer</token_type>
<expires_in>3600</expires_in>
<timestamp>2024-11-18T12:00:00Z</timestamp>
</response>
After obtaining the token, include it in the Authorization header for future SOAP or REST requests. For example:
To call an authenticated endpoint, such as ws-user-account:
curl -X POST "http://mutillidae.localhost/webservices/soap/ws-user-account.php" \
-H "Content-Type: text/xml; charset=utf-8" \
-H "SOAPAction: "urn:ws-user-account#getUser"" \
-H "Authorization: Bearer your-jwt-token" \
--data '<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:ws-user-account">
<soapenv:Header/>
<soapenv:Body>
<urn:getUser>
<username>some-user</username>
</urn:getUser>
</soapenv:Body>
</soapenv:Envelope>'
To include the token in Burp Suite:
Authorization header of your request:Authorization: Bearer your-jwt-token
SOAPAction header matches the registered action for the service.client_id and client_secret values.audience matches a valid endpoint.