Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modify IDOR plugin so that attacker's session executes all requests #11

Closed
domanchi opened this issue Sep 12, 2019 · 1 comment
Closed
Labels
enhancement New feature or request

Comments

@domanchi
Copy link
Contributor

Issue

Currently, to determine whether an endpoint is susceptible to IDOR, we execute the last request with the attacker's session. This differs from Microsoft's original paper, which suggests that all requests in the sequence must be executed by the attacker, before testing for IDOR.

Reproduction Steps

Upon further analysis, the (flawed) assumption with the current approach is that API calls do not have additional side effects. In other words, we assume that if developers perform authorization checks on a resource, they do it right. Given this, the counter example is straight forward:

@ns.route('/create')
class CreateResource(Resource):
    def post(self):
        current_user.has_created_resource = True
        return Fidget.create()

@ns.route('/get/<id>')
class GetResource(Resource):
    def get(self, id):
        if not current_user.has_created_resource:
            abort(401)

        return Fidget.get(id=id)

In this mock example, our current approach will fail to identify a flawed authorization check. However, if we get the attacker's session to try all requests first, this will be properly identified.

@domanchi domanchi added the enhancement New feature or request label Sep 13, 2019
@OiCMudkips
Copy link
Contributor

We will need to consider #7 and #20 during this issue's implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants