IDOR and HTTP Security Headers
IDOR and HTTP Security Headers
AND
HTTP SECURITY HEADERS
What is IDOR?
• When a web server processes a user’s request, it
determines the resource accessed using parameters
stated within the HTTP request. The direct object reference
is information that is used to locate and access a particular
resource. While the server is retrieving a resource,
attackers can manipulate these parameters and access
internal implementation object details in the event of a lack
of adequate server-side validation. This attack is known as
an Insecure Direct Object Reference (IDOR) vulnerability.
IDOR examples
There are many examples of access control vulnerabilities
where user-controlled parameter values are used to access
resources or functions directly.
Syntax:
Strict-Transport-Security: max-age=<expire-time>
Strict-Transport-Security: max-age=<expire-time>;
includeSubDomains
Strict-Transport-Security: max-age=<expire-time>;
preload
Syntax:
Content-Security-Policy: <policy-directive>;
<policy-directive>
Syntax:
X-XSS-Protection: 0
X-XSS-Protection: 1
X-XSS-Protection: 1; mode=block
X-XSS-Protection: 1; report=<reporting-uri>
4. X-Frame-Options
In the Orkut era, a spoofing technique called ‘Clickjacking’ was
pretty popular. It still is. In this technique, an attacker fools a
user into clicking something that isn’t there. For example, a user
might think that he’s on the official Orkut website, but something
else is running in the background. A user may reveal his/her
confidential information in the process.
Syntax:
X-Frame-Options: DENY
X-Frame-Options: SAMEORIGIN
5. X-Content-Type-Options
The X-Content-Type header offers a countermeasure against
MIME sniffing. It instructs the browser to follow the MIME types
indicated in the header. Used as a feature to discover an asset’s
file format, MIME sniffing can also be used to execute cross-site
scripting attacks.
Syntax:
X-Content-Type-Options: nosniff
References
• https://crashtest-security.com/insecure-direct-object-
reference-idor/
• https://portswigger.net/web-security/access-control/idor
• https://www.loginradius.com/blog/engineering/http-
security-headers
• https://www.geeksforgeeks.org/insecure-direct-object-
reference-idor-vulnerability/
• https://www.thesslstore.com/blog/http-security-
headers/