REST Services Home Page

Welcome to the User Account Web Service

This service allows you to create, read, update, and delete user accounts using various HTTP methods.

Note: This service is vulnerable to SQL injection at security level 0. Be cautious when testing or exploring its functionality.


Supported HTTP Methods

1. GET (Retrieve Data)

Use GET requests to retrieve information about one or more accounts.

Optional Parameter: username (as a URL parameter)

Examples:

2. POST (Create New Account)

Use POST requests to create a new user account.

Required Parameters (POST body):

Optional Parameter: signature (User's signature)

Example:
POST /webservices/rest/ws-user-account.php HTTP/1.1
Host: mutillidae.localhost
Content-Type: application/x-www-form-urlencoded

username=john&password=pass123&firstname=John&lastname=Doe&signature=JDoe
cURL Example:
curl -X POST "http://mutillidae.localhost/webservices/rest/ws-user-account.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "username=john&password=pass123&firstname=John&lastname=Doe&signature=JDoe"

3. PUT (Create or Update Account)

Use PUT requests to create or update an existing user account.

Required Parameters (POST body):

Optional Parameters:

Example:
PUT /webservices/rest/ws-user-account.php HTTP/1.1
Host: mutillidae.localhost
Content-Type: application/x-www-form-urlencoded

username=john&password=newpass123&firstname=John&lastname=Doe&signature=JDoeUpdated&update_client_id=true&update_client_secret=false
cURL Example:
curl -X PUT "http://mutillidae.localhost/webservices/rest/ws-user-account.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "username=john&password=newpass123&firstname=John&lastname=Doe&signature=JDoeUpdated&update_client_id=true&update_client_secret=false"

4. DELETE (Remove Account)

Use DELETE requests to delete an existing user account.

Required Parameters (POST body):

Example:
DELETE /webservices/rest/ws-user-account.php HTTP/1.1
Host: mutillidae.localhost
Content-Type: application/x-www-form-urlencoded

username=john&password=newpass123
cURL Example:
curl -X DELETE "http://mutillidae.localhost/webservices/rest/ws-user-account.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "username=john&password=newpass123"

Example Exploits (SQL Injection)

This service is vulnerable to SQL injection at security level 0. Example:

GET /webservices/rest/ws-user-account.php?username=jeremy'+union+select+concat('The+password+for+',username,'+is+',password),mysignature+from+accounts+-- HTTP/1.1
Host: mutillidae.localhost