SharePoint on premise is on fire đŸ”„

đŸ”„ SharePoint on Premise is on Fire

CVE‑2025‑53770 & CVE‑2025‑53771 — RCE + Spoofing | Exploitation active par plusieurs groupes APT

Résumé rapide

Score CVSS : 9.8 (Critique)

Impact : RCE non authentifiée + vol des clés MachineKey (persistences sessions)

Versions impactées : SharePoint Server 2016 / 2019 / Subscription Edition

IoCs : AccÚs anormal à /_layouts/15/ToolPane.aspx, création de webshells .aspx, usage de PsExec/Impacket

MITRE ATT&CK : T1078 (Valid Accounts), T1505 (Server Software Component), T1059 (Command Execution)

DĂ©tails Techniques de l’Exploit

  • CVE-2025-53771 (Spoofing) : Contournement d’authentification via header Referer sur /ToolPane.aspx.
  • CVE-2025-53770 (RCE) : DĂ©sĂ©rialisation non sĂ©curisĂ©e menant Ă  l’exĂ©cution de code arbitraire.
  • Vol des MachineKeys : Permet de forger des cookies/session valides et maintenir un accĂšs.
  • Post-Exploitation : DĂ©ploiement de webshells, exĂ©cution de Mimikatz, latĂ©ralisation via PsExec et Impacket.

Chronologie des ÉvĂ©nements

Date ÉvĂ©nement
Mai 2025Présentation de ToolShell (Pwn2Own Berlin)
9 juillet 2025Patch initial Microsoft (CVE‑2025‑49704/49706)
7‑18 juillet 2025Exploitation active des variantes
19 juillet 2025Publication des CVE‑2025‑53770/53771
20‑21 juillet 2025Patchs urgents pour toutes les versions on‑premise

Recommandations & Actions Immédiates

⚠ Si votre serveur SharePoint est exposĂ© : ConsidĂ©rez-le comme compromis tant qu’il n’est pas patchĂ© et auditĂ©.

  • Appliquer immĂ©diatement les patchs KB5002768 / KB5002754 / KB5002760
  • Changer les clĂ©s ASP.NET MachineKey et redĂ©marrer IIS
  • Activer AMSI + Microsoft Defender Antivirus
  • Analyser les journaux IIS pour ToolPane.aspx
  • Rechercher les webshells .aspx dans C:\inetpub\wwwroot\wss\

Commandes de Détection

# PowerShell
Get-WinEvent -LogName "Microsoft-IIS-Logging" | Where-Object { $_.Message -match "ToolPane.aspx" -and $_.Message -match "Referer:" }

# KQL - Microsoft Sentinel
AppRequests
| where Url contains "/_layouts/15/ToolPane.aspx"
| where HttpHeaders has "Referer"
| summarize count() by bin(TimeGenerated,1h), SourceIP

# YARA
rule Suspicious_ASPX_Webshell {
    strings:
        $cmd1 = "System.Diagnostics.Process"
        $cmd2 = "ExecuteNonQuery"
    condition:
        any of ($cmd*) and filesize < 200KB
}
    

PoC Simplifié (Go - Lab uniquement)

package main
import ("fmt"; "net/http"; "io/ioutil")
func main() {
    target := "http://sharepoint.local/_layouts/15/ToolPane.aspx"
    req, _ := http.NewRequest("GET", target, nil)
    req.Header.Set("Referer", "http://spoofed.local") // Bypass auth
    resp, _ := http.DefaultClient.Do(req)
    body, _ := ioutil.ReadAll(resp.Body)
    fmt.Printf("Status: %s\n%s", resp.Status, body)
}
    
⚠ Important : Ce PoC est destinĂ© uniquement aux environnements de test autorisĂ©s.

Sources & Références

Commentaires

Posts les plus consultés de ce blog

Chemins relatifs et absolus sous Linux : explication claire + mémo pratique

Nibbleblog - Pentesting HTB walkthrough