The greatest effect ofoverwriting files isachieved bycreating aweb shell inpublicly accessible directories. ICT&Strategy S.r.l.
Such requests are logged byEWS. The service mustbe preconfigured for ittowork properly, and israrely used. Lelevata diffusione di Exchange e la sua esposizione alla rete Internet significano che molte organizzazioni che utilizzano un server Exchange on-premises sono potenzialmente a rischio.
Exchange Control Panel (ECP) aweb interface toadminister Exchange components: manage mailboxes, create various policies tomanage mail traffic, connect new mail servers, etc. It will not run-on PowerShell 2. Ithas several advantages due toits encapsulation inHTTP, Alternative transport protocol used bythe Outlook client and mobile devices, Transmission protocol for mail onTCP/IP networks, Application layer protocols for email access, Protocol for data exchange with Active Directory service, Anopen protocol used tostore and retrieve data from ahierarchical directory structure, The Security log stores all events (process starts-ups, successful/unsuccessful logins, etc.)
Per utilizzare lo script, necessario scaricarlo dalla pagina GitHub dellanalista e memorizzarlo in /usr/share/nmap/scripts, e poi lanciare il comando nmap script http-vuln-exchange come spiegato nei suoi tweet in proposito. Gruppo DIGITAL360 - Codice fiscale 05710080960 - P.IVA 05710080960 - 2022 ICT&Strategy. The screenshot below shows anexample ofthis request tothe EWS API using aSOAP request toget the last 10emails from the [emailprotected] mailbox. China Chopper: Changing virtual directory settings for OAB (Default Web Site). The main components ofthe MSExchange server and the links between them are shown inthe diagram below. Inpractice, this CVE was used asapayload after authentication was bypassed using the CVE-2021-26855vulnerability. Inthis way, all emails from any given email account can bedownloaded from the server without authentication. The attacker can then retrieve the SID ofthe targeted user bysending anHTTP request toMAPI. Exchange Web Services (EWS) anAPI toprovide various applications with access tomailbox components. Given the MSExchanges 24-year history, the complexity ofits architecture, its location onthe perimeter, and the increased interest initamong security researchers, wecan assume that the number ofvulnerabilities found inthe popular mail server will only increase over time. MSExchange architecture Wewill show how touse standard operating system events and Exchange logs todetect ProxyLogon, both inreal time, using proactive threat hunting approaches, and attacks that have already happened inthe past. This vulnerability can also beused inconjunction with SSRF (CVE-2021-26858). This attack vector isnoless dangerous than downloading aweb shell toaserver. Inoltre, poich sono in corso ulteriori verifiche per confermare o meno leffettiva compromissione del sistema, lazienda consiglia in via precauzionale di effettuare il cambio della password dellaccount e-mail. Ad aggravare la faccenda, il fatto che le vulnerabilit in Microsoft Exchange sono state attivamente sfruttate per almeno due mesi prima che le patch di sicurezza fossero disponibili. Part 1.
CVE-2021-26855 makes iteasy todownload any users email, just byknowing their email address. The FQDN ofthe mail server obtained inthe previous step isspecified inacookie named X-BEResource. Unified Messaging, which allows voice messaging and other telephony features (the role isnot available onversion 2019servers). The response from the server will contain abase64 representation ofthe original email message.
Amalicious file may becreated asapayload onthe file system, such asareverse shell inthe autostart directory oraweb shell inone ofthe IIS directories. Using the Microsoft.Exchange.UM.UMCore.dll library. I Trend 2022 per lUC&C: come rendere smart la comunicazione aziendale. Inresponse, the server returns two cookies named ASP.NET_SessionId and msExchEcpCanary that the attacker can use for any future ECP requests. Email isoften used totransmit sensitive information such aspayment orders, configuration files, credentials orinstructions for connecting toVPN servers, etc.
With Burp Suite wespecify the command ofinterest inthe POST parameter a. The most typical usage of this script is to check all Exchange servers and save the reports, The attacker must then reset the virtual directory and specify the path toafile onthe server where the current virtual directory settings should besaved asabackup. After resetting, the file towhich the virtual directory backup will besaved will contain the web shell specified inthe previous step. The CVE-2021-26855 vulnerability allows anexternal attacker tosend anarbitrary HTTP request that will beredirected tothe specified internal service from the mail server computer account. Outlook Web Access (OWA) aweb interface for mailbox access and management (read/send/delete mail, edit calendar, etc.). ProxyLogon isthe name ofCVE-2021-26855 (SSRF) vulnerability that allows anexternal attacker tobypass the MSExchange authentication mechanism and impersonate any user. The new version ofthe Microsoft.Exchange.UM.UMCore.dll library (after installing the update) has many additional checks onthe incoming object types before the deserialisation process. Antonio Blescia sottolinea come queste vulnerabilit, catalogate con gli identificativi siano state eseguite in catena permettendo agli attaccanti di ottenere accessi illegittimi a diversi server Exchange on-premise esposti su Internet. without aninternet connection.
Un dato significativo in quanto, finora, le vulnerabilit ProxyLogon sono state gi sfruttate attivamente da almeno cinque gruppi di cyber criminali: tra questi, il pi attivo e anche il primo ad aver sfruttato le falle di sicurezza Hafnium, un nuovo gruppo di attacco sponsorizzato dallo stato cinese il cui obiettivo era quello di esfiltrare dati in modo persistente allinterno delle infrastrutture colpite. Kevin Beaumont, analista Microsoft Senior Threat Intelligence, ha creato uno script Nmap che pu essere utilizzato per eseguire la scansione di una rete alla ricerca di server Microsoft Exchange potenzialmente vulnerabili. Ifwelook atthe start events ofthe processes, wecan see the execution ofour command inthe IIS work process, which runs the cmd.exe command line interpreter with the corresponding arguments. If PowerShell 3 is present, the script can be run on Exchange 2010. The main components ofExchange and their brief descriptions are given below: All ofthe components described above function asapplications onthe Microsoft IIS web server. Attackers can use the information obtained from compromised email correspondence for phishing mailings and other cybercrimes. Puoi esprimere il tuo consenso cliccando su ACCETTA TUTTI I COOKIE.
Antonio Blescia, a proposito delle remediation, oltre allimportanza di agire in modo tempestivo per applicare tutte le patch di sicurezza relative a Microsoft Exchange, suggerisce di perimetrare le connessioni verso le porte 80 e 443 utilizzate da Microsoft Exchange, abilitare Credential Guard(ove possibile) sul server su cui viene offerto il servizio di Exchange e dotarsi di una tecnologia comportamentale in grado di riconoscere potenziale creazione di file sospetti su server, come webshell e lo spwan di processi child da processi anomali. The log contains events that record the execution ofPowerShell script blocks, pipelines and modules, The log contains information about control actions applied tothe Exchange components. CVE-2021-26855: vulnerabilit di tipo Server-Side Request Forgery (SSRF) che permetterebbe a un attaccante di mandare, richieste HTTP e autenticarsi sul server Exchange; CVE-2021-26857: vulnerabilit del sottosistema di de-serializzazione nel Unified Messaging service, che potrebbe permettere, sotto talune condizioni, agli attaccanti di eseguire codice arbitrario con diritti dellutente SYSTEM sul server Exchange. Offline Address Book (OAB) anoffline address book service onthe Exchange server that allows Outlook users tocache the contents ofthe Global Address List (GAL) and access iteven when not connected toExchange. La terza e la quarta vulnerabilit, identificate rispettivamente come CVE-2021-26858e CVE-2021-27065, hanno permesso agli attaccanti di effettuare la scrittura di file in qualsiasi locazione del file system sul server Exchange. Executing commands using adownloaded web shell.
Exploiting this vulnerability requires that the Unified Messaging role beinstalled and configured onthe Exchange server. Detection ofthis activity will bedescribed inmore detail inone ofour upcoming articles. Finally, having obtained the users SID, the attacker can authenticate themselves onthe server byposing asthe administrator bysending aspecially crafted POST request to /ecp/proxyLogon.ecp. This isquite easy todowith the standard operating system and Exchange server log events athand. The exploitation requires atleast two MSExchange servers inthe attacked infrastructure. The problem iscontained inthe Base64Deserialize method ofthe CommonUtil class, and the class itself inthe Microsoft.Exchange.UM.UMCommon namespace ofthe Microsoft.Exchange.UM.UMCommon.dll library. Dalle analisi condotte dagli specialisti Microsoft, risultano essere esposte ad attacco le seguenti versioni installate on-premises di Exchange: Microsoft specifica come tutte le vulnerabilit siano state risolte nel blocco di aggiornamenti rilasciato il 2 Marzo per la versione on-premise.
Transport, which isresponsible for managing mail traffic. blog post, Determining if a zip file is a valid part of an installed There are nopublicly available PoCs orother sources detailing its exploitation. Aprotocol used byclients, including mobile clients, toaccess Exchange components for mail, calendaring, address book, etc. Successful exploitation ofCVE-2021-27065 allows amalicious file tobeuploaded toanExchange server using the ECP interface, which can then beused asaweb shell. Letus save the configuration as test.aspx file in C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\ecp\auth. Weuse cookies (files that store information about your visits tothe website) topersonalise our services and toimprove your browsing experience. The next step istoobtain the LegacyDN and the email accountID bymaking anHTTP request toAutodiscover. togain access toconfidential information incorporate emails, tolaunch amalicious mailing from the victim companys addresses toinfiltrate the infrastructure ofanother organisation, tocompromise user accounts with the use ofExchange components (successful bruteforce attack ordetection ofcredentials inemail correspondence) toinfiltrate the companys network via one ofthe corporate services, togain foothold into the company network (e.g. utilizzo del gestore di archivi compressi 7-zip per esfiltrare informazioni sensibili. Discovering new vulnerabilities inthe Exchange server and new attacks are just amatter oftime, soitisimportant tonot only protect your mail servers properly, but also tocollect and monitor important security events inadvance. Letus try toexecute the command using the downloaded web shell.
CVE-2021-26857is not actually part ofthis chain, asitleads tocode execution onthe server and does not require other vulnerabilities tobeexploited beforehand. Instead, attackers exploit the CVE-2021-26855, CVE-2021-26858 and CVE-2021-27065 vulnerability chain, which also allows remote arbitrary code execution onthe mail server but iseasier toexploit. Lavviso di sicurezza di Microsoft segnala le seguenti vulnerabilit (fonte: CSIRT nazionale): Secondo il Microsoft Threat Intelligence Center (MTIC), il gruppo HAFNIUM formato da attaccanti cinesi sponsorizzati dallo Stato ed esegue le sue operazioni fuori dal suolo cinese principalmente utilizzando Server Privati Virtuali (VPS) in affitto negli Stati Uniti e sempre sul suolo americano risiedono la maggioranza delle vittime da cui tenta di esfiltrare informazioni. It also has a progress bar and some performance tweaks to make the CVE-2021-26855 test run much faster. Since the attacker can specify the service towhich anarbitrary HTTP request istoberedirected, this SSRF vulnerability can beexploited indifferent ways. Inthis way, the vulnerability allows the attacker tobypass the authentication mechanism ofthe Exchange server and perform the request with the highest privileges. An administrator should review the files to Cosa fare per migliorare lanalisi dei contenuti abbassando i costi operativi? La catena di accatto utilizzata dal gruppo Hafnium, una volta ottenuta lesecuzione di codice sul server Exchange, si basa principalmente su queste macro-fasi: Con lo scopo di eludere gli attuali indicatori di compromissione, altri gruppi criminali stanno cambiando la catena di attacco, ove possibile, continuando il lavoro di compromissione e backdooring di server. Si consiglia di verificare gli indicatori sopra citati e di richiedere un controllo approfondito, da parte di societ specializzate, nel caso in cui il proprio server Exchange dovesse essere utilizzato on-premise. Le aziende hanno dunque bisogno di supporto di tecnici e di intelligence in grado di determinare se sono state colpite e in che misura, e, soprattutto, neutralizzare lattacco e chiudere gli aggressori fuori dalle proprie reti. Dalle analisi delle TTPs (tattiche, tecniche e procedure) del gruppo Hafnium si deducono capacit di attacco sofisticate e altamente qualificate. Inorder tomake requests tothe ECP, afull session must beestablished inthe ECP. Accordingly, arule todetect this activity can beasfollows: event_log_source:'IIS' AND cs-method:'POST' AND cs-uri-stem:'/ecp/proxyLogon.ecp' AND cs-username end with:'$'. Le aziende che utilizzano un server Exchange on-premises dovrebbero verificare la corretta applicazione delle patch ai device Exchange e assicurarsi che gli aggiornamenti siano andati a buon fine. Un profiling dettagliato del gruppo Hafnium stato reso disponibile da Microsoft nella pagina dedicata. Nel caso venga utilizzato Microsoft Defender ATP, si consiglia di eseguire le seguenti query kusto sul proprio portale Microsoft Defender ATP for Endpoint: DeviceFileEvents| where InitiatingProcessFileName == UMWorkerProcess.exe and FileName != CacheCleanup.bin and FileName !endswith .txt and FileName !endswith .LOG and FileName !endswith .cfg and FileName !=cleanup.bin, ProcessEvents| where InitiatingProcessFileName == UMWorkerProcess.exe and FileName !in(wermgr.exe, WerFault.exe), DeviceProcessEvents| where InitiatingProcessFileName == UMWorkerProcess.exe and FileName !in(wermgr.exe, WerFault.exe)| summarize count() by FileName.