Windows Credentials Protections
Credentials Protections
Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Learn & practice GCP Hacking:
HackTricks Training GCP Red Team Expert (GRTE)
WDigest
Protokali ya WDigest, iliyozinduliwa na Windows XP, imeundwa kwa ajili ya uthibitishaji kupitia Protokali ya HTTP na imewezeshwa kwa default kwenye Windows XP hadi Windows 8.0 na Windows Server 2003 hadi Windows Server 2012. Mpangilio huu wa default unapelekea hifadhi ya nywila katika maandiko ya wazi kwenye LSASS (Huduma ya Mamlaka ya Usalama wa Mitaa). Mshambuliaji anaweza kutumia Mimikatz ili kuchota hizi akidi kwa kutekeleza:
Ili kuwasha au kuzima kipengele hiki, funguo za rejista UseLogonCredential na Negotiate ndani ya HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurityProviders\WDigest lazima ziwe zimewekwa kuwa "1". Ikiwa funguo hizi hazipo au zimewekwa kuwa "0", WDigest ime zimwa:
LSA Protection
Kuanzia na Windows 8.1, Microsoft iliboresha usalama wa LSA ili kuzuia usomaji wa kumbukumbu zisizoidhinishwa au sindikizo la msimbo na michakato isiyoaminika. Uboreshaji huu unakwamisha utendaji wa kawaida wa amri kama mimikatz.exe sekurlsa:logonpasswords
. Ili kuwezesha ulinzi huu ulioimarishwa, thamani ya RunAsPPL katika HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\LSA inapaswa kubadilishwa kuwa 1:
Bypass
Inapowezekana kupita ulinzi huu kwa kutumia Mimikatz driver mimidrv.sys:
![](https://book.hacktricks.xyz/~gitbook/image?url=https%3A%2F%2F3018635170-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FCtGnfY5n0YCGcWtBkgwe%252Fuploads%252Fgit-blob-61a8163694d8c54367f14739b39b547bf53f70b0%252Fmimidrv.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=cd0dd7cd&sv=1)
Credential Guard
Credential Guard, kipengele ambacho ni maalum kwa Windows 10 (Enterprise na Education editions), kinaongeza usalama wa akidi za mashine kwa kutumia Virtual Secure Mode (VSM) na Virtualization Based Security (VBS). Kinatumia nyongeza za virtualisasi za CPU kutenga michakato muhimu ndani ya nafasi ya kumbukumbu iliyo salama, mbali na ufikiaji wa mfumo wa uendeshaji mkuu. Kutengwa huku kunahakikisha kwamba hata kernel haiwezi kufikia kumbukumbu katika VSM, kwa ufanisi ikilinda akidi kutokana na mashambulizi kama pass-the-hash. Local Security Authority (LSA) inafanya kazi ndani ya mazingira haya salama kama trustlet, wakati mchakato wa LSASS katika OS kuu unafanya kazi kama mwasiliani tu na LSA ya VSM.
Kwa kawaida, Credential Guard haifanyi kazi na inahitaji kuamshwa kwa mikono ndani ya shirika. Ni muhimu kwa kuongeza usalama dhidi ya zana kama Mimikatz, ambazo zinakabiliwa na uwezo wao wa kutoa akidi. Hata hivyo, udhaifu bado unaweza kutumiwa kupitia kuongeza Security Support Providers (SSP) za kawaida ili kukamata akidi katika maandiko wazi wakati wa majaribio ya kuingia.
Ili kuthibitisha hali ya uanzishaji wa Credential Guard, funguo ya rejista LsaCfgFlags chini ya HKLM\System\CurrentControlSet\Control\LSA inaweza kukaguliwa. Thamani ya "1" inaonyesha uanzishaji na UEFI lock, "2" bila lock, na "0" inaashiria haijawashwa. Ukaguzi huu wa rejista, ingawa ni kiashiria kizuri, si hatua pekee ya kuamsha Credential Guard. Mwongozo wa kina na skripti ya PowerShell ya kuamsha kipengele hiki zinapatikana mtandaoni.
Kwa ufahamu wa kina na maelekezo juu ya kuwezesha Credential Guard katika Windows 10 na uanzishaji wake wa kiotomatiki katika mifumo inayofaa ya Windows 11 Enterprise na Education (toleo 22H2), tembelea nyaraka za Microsoft.
Maelezo zaidi juu ya kutekeleza SSPs za kawaida kwa ajili ya kukamata akidi yanapatikana katika hiki kiongozi.
RDP RestrictedAdmin Mode
Windows 8.1 na Windows Server 2012 R2 zilileta vipengele vingi vipya vya usalama, ikiwa ni pamoja na Restricted Admin mode kwa RDP. Hali hii ilipangwa kuboresha usalama kwa kupunguza hatari zinazohusiana na pass the hash mashambulizi.
Kawaida, unapounganisha na kompyuta ya mbali kupitia RDP, akidi zako zinahifadhiwa kwenye mashine lengwa. Hii inatoa hatari kubwa ya usalama, hasa unapokuwa ukitumia akaunti zenye mamlaka ya juu. Hata hivyo, kwa kuanzishwa kwa Restricted Admin mode, hatari hii inapunguzwa kwa kiasi kikubwa.
Wakati wa kuanzisha muunganisho wa RDP kwa kutumia amri mstsc.exe /RestrictedAdmin, uthibitishaji wa kompyuta ya mbali unafanywa bila kuhifadhi akidi zako kwenye hiyo. Njia hii inahakikisha kwamba, katika tukio la maambukizi ya programu hasidi au ikiwa mtumiaji mbaya atapata ufikiaji wa seva ya mbali, akidi zako hazitakuwa hatarini, kwani hazihifadhiwi kwenye seva.
Ni muhimu kutambua kwamba katika Restricted Admin mode, juhudi za kufikia rasilimali za mtandao kutoka kwenye kikao cha RDP hazitatumia akidi zako binafsi; badala yake, utambulisho wa mashine unatumika.
Kipengele hiki kinatoa hatua muhimu mbele katika kulinda muunganisho wa desktop ya mbali na kulinda taarifa nyeti zisifichuliwe katika tukio la uvunjaji wa usalama.
![](https://book.hacktricks.xyz/~gitbook/image?url=https%3A%2F%2F3018635170-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FCtGnfY5n0YCGcWtBkgwe%252Fuploads%252Fgit-blob-45b944cab6ecc51bb53a67599aba23cbafc053ca%252FRAM.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=96c93ac1&sv=1)
Kwa maelezo zaidi tembelea rasilimali hii.
Cached Credentials
Windows inalinda akidi za kikoa kupitia Local Security Authority (LSA), ikisaidia michakato ya kuingia kwa kutumia itifaki za usalama kama Kerberos na NTLM. Kipengele muhimu cha Windows ni uwezo wake wa kuhifadhi kuingia kwa kikoa kumi za mwisho ili kuhakikisha watumiaji wanaweza kuendelea kufikia kompyuta zao hata kama kikundi cha kudhibiti kikoa kiko offline—faida kwa watumiaji wa laptop ambao mara nyingi wako mbali na mtandao wa kampuni yao.
Idadi ya kuingia zilizohifadhiwa inaweza kubadilishwa kupitia funguo maalum za rejista au sera ya kikundi. Ili kuona au kubadilisha mipangilio hii, amri ifuatayo inatumika:
Access to these cached credentials is tightly controlled, with only the SYSTEM account having the necessary permissions to view them. Administrators needing to access this information must do so with SYSTEM user privileges. The credentials are stored at: HKEY_LOCAL_MACHINE\SECURITY\Cache
Mimikatz can be employed to extract these cached credentials using the command lsadump::cache
.
For further details, the original source provides comprehensive information.
Protected Users
Membership in the Protected Users group introduces several security enhancements for users, ensuring higher levels of protection against credential theft and misuse:
Credential Delegation (CredSSP): Hata kama mipangilio ya Sera ya Kundi kwa Ruhusu kuhamasisha akiba ya kawaida imewezeshwa, akiba ya maandiko ya kawaida ya Watumiaji Waliohifadhiwa haitahifadhiwa.
Windows Digest: Kuanzia Windows 8.1 na Windows Server 2012 R2, mfumo hautahifadhi akiba ya maandiko ya kawaida ya Watumiaji Waliohifadhiwa, bila kujali hali ya Windows Digest.
NTLM: Mfumo hautahifadhi akiba ya maandiko ya kawaida ya Watumiaji Waliohifadhiwa au kazi za upande mmoja za NT (NTOWF).
Kerberos: Kwa Watumiaji Waliohifadhiwa, uthibitishaji wa Kerberos hautazalisha DES au RC4 keys, wala hautahifadhi akiba ya maandiko ya kawaida au funguo za muda mrefu zaidi ya upatikanaji wa Tiketi ya Kutoa Tiketi (TGT) ya awali.
Offline Sign-In: Watumiaji Waliohifadhiwa hawatakuwa na mthibitishaji wa akiba ulioundwa wakati wa kuingia au kufungua, ikimaanisha kuwa kuingia bila mtandao hakusaidiwi kwa akaunti hizi.
These protections are activated the moment a user, who is a member of the Protected Users group, signs into the device. This ensures that critical security measures are in place to safeguard against various methods of credential compromise.
For more detailed information, consult the official documentation.
Table from the docs.
Windows Server 2003 RTM | Windows Server 2003 SP1+ | Windows Server 2012, Windows Server 2008 R2, Windows Server 2008 | Windows Server 2016 |
Account Operators | Account Operators | Account Operators | Account Operators |
Administrator | Administrator | Administrator | Administrator |
Administrators | Administrators | Administrators | Administrators |
Backup Operators | Backup Operators | Backup Operators | Backup Operators |
Cert Publishers | |||
Domain Admins | Domain Admins | Domain Admins | Domain Admins |
Domain Controllers | Domain Controllers | Domain Controllers | Domain Controllers |
Enterprise Admins | Enterprise Admins | Enterprise Admins | Enterprise Admins |
Enterprise Key Admins | |||
Key Admins | |||
Krbtgt | Krbtgt | Krbtgt | Krbtgt |
Print Operators | Print Operators | Print Operators | Print Operators |
Read-only Domain Controllers | Read-only Domain Controllers | ||
Replicator | Replicator | Replicator | Replicator |
Schema Admins | Schema Admins | Schema Admins | Schema Admins |
Server Operators | Server Operators | Server Operators | Server Operators |
Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Learn & practice GCP Hacking:
HackTricks Training GCP Red Team Expert (GRTE)
Last updated