Welcome to the WS Echo Service. This service is designed to receive a text message from you and send it back exactly as it was received. This type of service is often used to test connectivity and ensure that web requests are correctly handled.
curl command (a command-line tool for making web requests). If you’re new to web services,
don’t worry! Just follow along with the examples and you’ll get the hang of it quickly.
This is the address where the service is hosted:
POST /webservices/rest/ws-echo.php
The Echo Service expects a single parameter called message in the request.
It will return that same message in the response. This is useful to verify that your request
was successfully received and processed.
Here’s how you can send a request to this service using Burp Repeater:
POST /webservices/rest/ws-echo.php HTTP/1.1
Host: mutillidae.localhost
Accept: application/json
Content-Type: application/x-www-form-urlencoded
Origin: http://mutillidae.localhost
Connection: close
Content-Length: 20
message=Hello+World!
Instructions:
curl (Command Line)If you prefer using the command line, here’s how you can make the same request with curl:
curl -X POST "http://mutillidae.localhost/webservices/rest/ws-echo.php" \
-H "Host: mutillidae.localhost" \
-H "Accept: application/json" \
-H "Origin: http://mutillidae.localhost" \
-H "Content-Type: application/x-www-form-urlencoded" \
--data "message=Hello+World!"
Instructions:
curl command.If everything works correctly, you will receive a response like this:
{
"message": "Hello World!",
"command": "echo 'Hello World!'",
"security-level": 0,
"result": "Hello World!"
}
mutillidae.localhost host is correctly configured in your environment.If you want to explore more, try modifying the message parameter and observe how the response changes.
For example, send the message Hello from Class! and see if the service returns the same.