
VFS per Git ab95cf51 - Alto - Locale - Privilegio residuo - hook CreateFileW SecurityImpersonation
abraxaslabs.tech · github.com/abraxas · @abraxas_null · [email protected] · vfs-hook-impersonate
Classe: Privilegio residuo Portata: Locale
VFS for Git master ab95cf51 (tag v2.0.26259.1) - Microsoft
Gli hook git nativi (read-object, virtual-filesystem, post-index-changed) aprono la pipe di mount per-enlistment con CreateFileW e dwFlagsAndAttributes = 0. Questo omette SECURITY_SQOS_PRESENT, quindi Windows imposta il client di default a SecurityImpersonation. La stessa ACL della pipe usata dal residuo #2 concede a BUILTIN\Users ReadWrite | CreateNewInstance.
Un secondo utente locale può creare un'istanza extra o fare squatting su \\.\pipe\GVFS_<ENLISTMENT>, ImpersonateNamedPipeClient, e scrivere come la vittima.
| ID | nessuna CVE al momento |
| Classe | Privilegio residuo (impersonificazione named-pipe) |
| Portata | Locale |
| CWE | CWE-284, CWE-300 |
| CVSS | Alto: 7.1 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N |
| Prodotto | VFS for Git |
| Affetto | master ab95cf51d6ffd0ee0e2feae7180078fe9ecbbb3a (anche attuale rispetto alla release v2.0.26259.1). Solo Windows. |
| Auth | Locale. La vittima ha un enlistment GVFS. L'attaccante è un qualsiasi principal BUILTIN\Users. La vittima esegue git in seguito. |
| Licenza | GNU Affero GPL v3.0 |
| Lab | Solo 127.0.0.1. how=gadget (nessuna VM Windows live / VFS for Git installato). |
Questo è locale. Non è SYSTEM. Automount nel residuo #4 è una pipe diversa (GVFS.Service.pipe). Dehydrate/unmount su questa stessa pipe di mount è il residuo #2.
La vittima ha un enlistment GVFS. L'attaccante è un qualsiasi principal BUILTIN\Users. La vittima esegue git in seguito (status, checkout, qualsiasi cosa che attivi gli hook VFS).
| Privilegio | Metodo / sink | Cosa concede | Recon / integrità / disponibilità | Provato in lab o dedotto |
|---|---|---|---|---|
| Impersonificare la vittima e scrivere nel suo profilo | Istanza extra / squat \\.\pipe\GVFS_C_\REPOS\FOO; hook CreateFileW flags=0; ImpersonateNamedPipeClient; creare %USERPROFILE%\VFS-HOOK-IMPERSONATE-WITNESS | Scrivere come l'UID della vittima | Integrità | Provato in lab su un gadget. Il proprietario del witness è l'uid della vittima. I flag di default sono SecurityImpersonation. L'uid dell'attaccante non può scrivere in quella home senza impersonificazione |
| Mantenere git funzionante dopo lo squat | Rispondere S|\x03 a MPL|1 così GVFS.VirtualFileSystemHook non si blocca | Git continua | Disponibilità del git della vittima | Provato in lab. Hook reply_ok sia sul percorso vulnerabile che su quello patchato |
| Indovinare il nome della pipe dalla root dell'enlistment | GetGVFSPipeName risale dalla CWD a .gvfs, CharUpper, : -> _, prefisso \\.\pipe\GVFS_ | Nome IPC indovinabile | Recon | Provato in lab. C:\Repos\Foo\src -> \\.\pipe\GVFS_C_\REPOS\FOO |
| Rettargettare la pipe senza vincere l'istanza live | Piantare una directory src\.gvfs tracciata così la risalita si lega a un nome diverso | Squatting senza gareggiare con il mount | Integrità | Dedotto da common.windows.cpp risalita. Il lab ha usato il .gvfs dell'enlistment reale |
Rispondere a DLO / PICN oltre che a MPL | Stessa pipe, ReadObjectHook / PostIndexChangedHook | Mentire sugli oggetti / skip-worktree | Integrità | Dedotto. Il lab ha inviato solo MPL|1 |
Crashare l'hook con un S\x03 di due byte | VirtualFileSystemHook messageLength -= 2 poi -= 1 va in underflow e fwrite di ~4GiB | Crash / lettura OOB | Disponibilità | Dedotto da main.cpp 69-90. Non è l'oracolo. Non distribuire quel crash |
Chiusi qui: SYSTEM (il mount è l'utente dell'enlistment). RCE remoto non autenticato. VM Windows live / VFS for Git installato (questo lab è un gadget delle funzioni copiate).
Residui dello stesso pin: vfs-quote-breakout, vfs-mount-dehydrate, vfs-clone-acl, vfs-service-sid, vfs-install-cwd.
Ho fissato VFSForGit master ab95cf51 dopo il merge del 2026-09-28. Gli hook nativi CreateFileW con flags 0. Windows quindi va di default a SecurityImpersonation. La pipe di mount permette già a Users l'istanza extra. Questo è il residuo.
Vicoli ciechi già registrati: trattarlo come residuo #2 dehydrate (stessa ACL, sink diverso: token, non MoveDirectory); dichiarare SYSTEM; distribuire l'underflow da 4GiB come oracolo. Teatro. Windows nativo mancava, quindi il lab è un gadget di quelle funzioni. I socket Unix sostituiscono le named pipe.
python3 vfs-hook-impersonate-Abraxas-Labs.py
oppure
cd lab
./run.sh
Gadget HTTP su 127.0.0.1:19670. Copia GetGVFSPipeName, i flag di CreatePipeToGVFS, l'ACL CreateNewInstance di Users, e il protocollo hook MPL|1 / S|. Un client patchato con identificazione SQOS non scrive il witness. L'ultima riga usa how=gadget.
SUCCESS vfs-hook-impersonate how=gadget createfile-flags=0 impersonation=SecurityImpersonation extra-instance=yes owner=victim patched-sqos-ident-no-write=yes VFS-HOOK-IMPERSONATE-WITNESS
Sull'hook CreateFileW passare SECURITY_SQOS_PRESENT | SECURITY_IDENTIFICATION. Limitare CreatePipeByName al SID del proprietario dell'enlistment più LocalSystem. Rimuovere CreateNewInstance per Users. Verificare i limiti delle lunghezze di risposta dell'hook.
ab95cf51d6ffd0ee0e2feae7180078fe9ecbbb3acommon.windows.cpp CreatePipeToGVFSWindowsPlatform.cs CreatePipeByNameGNU Affero GPL v3.0. Vedi LICENSE. Solo lab su loopback. Nessuna garanzia.