Insecure Direct Object References ( IDOR )

● Description

It occurs when a developer exposes a reference to an internal implementation object, such as a file, directory, or database key as in URL or as a FORM parameter. The attacker can use this information to access other objects and can create a future attack to access the unauthorized data.

Implication

·        Using this vulnerability, an attacker can gain access to unauthorized internal objects, can modify data or compromise the application.

Vulnerable Objects

·        In the URL.

Examples:

Changing "userid" in the following URL can make an attacker to view other user's information.

An attacker can view others information by changing user id value.

Recommendations:

1.     Implement access control checks.

2.     Avoid exposing object references in URLs.

3.     Verify authorization to all reference objects.

Cross Site Request Forgery

Description

Cross Site Request Forgery is a forged request came from the cross site.

CSRF attack is an attack that occurs when a malicious website, email, or program causes a user's browser to perform an unwanted action on a trusted site for which the user is currently authenticated.

A CSRF attack forces a logged-on victim's browser to send a forged HTTP request, including the victim's session cookie and any other automatically included authentication information, to a vulnerable web application.

A link will be sent by the attacker to the victim when the user clicks on the URL when logged into the original website, the data will be stolen from the website.

Implication

·        Using this vulnerability as an attacker can change user profile information, change status, create a new user on admin behalf, etc.

Vulnerable Objects

·        User Profile page

·        User account forms

·        Business transaction page

Examples

The victim is logged into a bank website using valid credentials. He receives mail from an attacker saying "Please click here to donate $1 to cause."

When the victim clicks on it, a valid request will be created to donate $1 to a particular account.

The attacker captures this request and creates below request and embeds in a button saying "I Support Cause."

Since the session is authenticated and the request is coming through the bank website, the server would transfer $1000 dollars to the attacker.

Recommendation

1.     Mandate user's presence while performing sensitive actions.

2.     Implement mechanisms like CAPTCHA, Re-Authentication, and Unique Request Tokens.

Security Misconfiguration

Description

Security Configuration must be defined and deployed for the application, frameworks, application server, web server, database server, and platform. If these are properly configured, an attacker can have unauthorized access to sensitive data or functionality.

Sometimes such flaws result in complete system compromise. Keeping the software up to date is also good security.

Implication

·        Making use of this vulnerability, the attacker can enumerate the underlying technology and application server version information, database information and gain information about the application to mount few more attacks.

Vulnerable objects

·        URL

·        Form Fields

·        Input fields

Examples

1.     The application server admin console is automatically installed and not removed. Default accounts are not changed. The attacker can log in with default passwords and can gain unauthorized access.

2.     Directory Listing is not disabled on your server. Attacker discovers and can simply list directories to find any file.

Recommendations

1.     A strong application architecture that provides good separation and security between the components.

2.     Change default usernames and passwords.

3.     Disable directory listings and implement access control checks.

Comments

Popular posts from this blog

Hacker

Insecure Cryptographic Storage

How to Hack a Website: Online Example