Parameter Tampering for Privilege Escalation
What you'll learn: How attackers manipulate user IDs, role flags, and hidden parameters to bypass access controls and gain unauthorized privileges.
The Core Idea
Parameter tampering involves modifying request parameters—whether in URLs, form fields, cookies, or API payloads—to trick an application into granting higher privileges than intended. Unlike IDOR attacks that focus on accessing different resources at the same privilege level, parameter tampering for privilege escalation specifically targets gaining elevated permissions.
Think of it like editing your movie ticket: changing the seat number is horizontal access (IDOR), but changing "Standard" to "VIP" is privilege escalation.
Common Tampering Targets
User ID Switching
Changing userId=1234 to userId=1 (often an admin account) in requests to gain administrative access.
Role Flags
Modifying parameters like isAdmin=false to isAdmin=true or role=user to role=administrator in form submissions or API calls.
Hidden Form Fields
Tampering with fields like <input type="hidden" name="accessLevel" value="2"> by intercepting and changing them to higher access levels before submission.
Privilege Indicators
Manipulating flags such as isPremium=0 to isPremium=1 or permissions=read to permissions=write,delete.
Why It Works
Applications fail when they:
- Trust client-side data without server-side validation
- Use parameters to set privileges instead of checking them against authoritative sources
- Don't verify that the authenticated user actually holds the claimed role
Real-World Example Pattern
A request like POST /updateProfile with body {userId: 5234, isManager: false} becomes {userId: 5234, isManager: true} by an attacker who intercepts and modifies it.
Key Takeaway: Never trust client-supplied parameters for authorization decisions—always verify privileges server-side against a trusted data source, independently of any request parameters.