{"id":7403,"date":"2022-04-29T12:21:40","date_gmt":"2022-04-29T12:21:40","guid":{"rendered":"https:\/\/webdev.securin.xyz\/?p=7403"},"modified":"2023-04-05T12:33:46","modified_gmt":"2023-04-05T19:33:46","slug":"account-takeover-series-3-account-takeover-through-insecure-direct-object-reference","status":"publish","type":"post","link":"https:\/\/webdev.securin.xyz\/articles\/account-takeover-series-3-account-takeover-through-insecure-direct-object-reference\/","title":{"rendered":"Account Takeover Series 3: Account Takeover through Insecure Direct Object Reference"},"content":{"rendered":"

What is Insecure Direct Object Reference?<\/h2>\n

Insecure Direct Object Reference or IDOR occurs when the application trusts the user input and takes sensitive action or shows sensitive information based on the same. This can be abused by an attacker to take sensitive action or dig out sensitive information from a victim\u2019s account.<\/p>\n

When an IDOR vulnerability is present in an application’s reset password functionality, the vulnerability can be exploited to update the user’s password, thus taking over the account of the victim user.<\/p>\n

Vulnerable Application:<\/strong> Road<\/a><\/p>\n

Attack Scenario:<\/strong> Marty is an attacker and he wants to take over the application\u2019s admin account. The admin\u2019s email id is previously known (admin@sky.thm).<\/p>\n

Steps to Reproduce<\/h2>\n
    \n
  1. \n

    Log in to the application as the user Marty. Go to the reset user page and fill in the new password.<\/p>\n<\/li>\n<\/ol>\n

    <\/p>\n

     <\/p>\n

      \n
    1. \n

      Additionally, the user’s email address is provided to the application in the request.<\/p>\n<\/li>\n<\/ol>\n

      <\/p>\n

        \n
      1. \n

        The supplied email id can be edited by the attacker to any desired value. Let us change the email to the admin\u2019s email: admin@sky.thm, and pass the request.<\/p>\n<\/li>\n<\/ol>\n

        <\/p>\n

          \n
        1. \n

          Next, you can see that the application responds successfully.<\/p>\n<\/li>\n<\/ol>\n

          <\/p>\n

            \n
          1. \n

            Log out and try to login through the newly created credentials, admin@sky.thm:1234. Observe that the application shows a successful response and the attacker is logged in.<\/p>\n<\/li>\n<\/ol>\n

            <\/p>\n

            <\/p>\n

            Mitigation<\/h2>\n
              \n
            1. \n

              The most common and easy method of prevention against IDOR is to not rely solely upon the user input. There should be a validation for the same in the backend logic.<\/p>\n<\/li>\n

            2. \n

              Strict access control should be enforced to limit the reference of objects outside of the intended permission.<\/p>\n<\/li>\n<\/ol>\n

              Related Blogs<\/h2>\n

              What is Account Take Over Attack (ATO)?<\/a><\/p>\n

              ATO Attack Series 1: Cross-Site Request Forgery Account Takeover<\/a><\/p>\n

              ATO Attack Series 2: Account Takeover through Password Reset Poisoning<\/a><\/p>\n

               <\/p>\n

              Start Protecting your Credentials Today! Get in touch with CSW for Red Teaming and VMaaS services.<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"

              Insecure Direct Object Reference or IDOR occurs when the application trusts the user input and takes sensitive action or shows sensitive information based on the same.<\/p>\n","protected":false},"author":14,"featured_media":7404,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[80,127],"tags":[],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/webdev.securin.xyz\/wp-json\/wp\/v2\/posts\/7403"}],"collection":[{"href":"https:\/\/webdev.securin.xyz\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webdev.securin.xyz\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webdev.securin.xyz\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/webdev.securin.xyz\/wp-json\/wp\/v2\/comments?post=7403"}],"version-history":[{"count":2,"href":"https:\/\/webdev.securin.xyz\/wp-json\/wp\/v2\/posts\/7403\/revisions"}],"predecessor-version":[{"id":11716,"href":"https:\/\/webdev.securin.xyz\/wp-json\/wp\/v2\/posts\/7403\/revisions\/11716"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webdev.securin.xyz\/wp-json\/wp\/v2\/media\/7404"}],"wp:attachment":[{"href":"https:\/\/webdev.securin.xyz\/wp-json\/wp\/v2\/media?parent=7403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webdev.securin.xyz\/wp-json\/wp\/v2\/categories?post=7403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webdev.securin.xyz\/wp-json\/wp\/v2\/tags?post=7403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}