Windefender has improved greatly over time.
- Default, blocks
Powerview
Built-in powershell cmdlet to check Defender status: Get-MpComputerStatus - look at RealTimeProtectionEnabled

- An application whitelist is a list of approved software applications or executables that are allowed to be present and run in a system.
- Goal is to protect env from malware and unapproved software.
- Created by Microsoft.
- Granular control over executables, scripts, windows installer files, dlls, packaged apps, and packed app installers.
- Common for orgs to block cmd.exe and powershell.exe / write access to certain directories
- This is all bypassable!
- Orgs focus on blocking the
PowerShell.exeexecutable but forget about other PowerShell executable locations: https://www.powershelladmin.com/wiki/PowerShell_Executables_File_System_Locations- i.e.
%SystemRoot%\SysWOW64\WindowsPowerShell\v1.0\powershell.exeor thePowerShell_ISE.exeversion.
- i.e.
Viewing AppLocker policiy using Get-AppLockerPolicy cmdlet
Get-AppLockerPolicy -Effective | select -ExpandProperty RuleCollections
Powershell constrained language mode https://devblogs.microsoft.com/powershell/powershell-constrained-language-mode/ Locks down many features needed to use powershell effectively such as:
- Blocking COM objects
- Only allowing approved .NET types
- XAML based workflows
- Powershell classes
- more... To check if you are in a constrained powershell session, or in a full language mode:
$ExecutionContext.SessionState.LanguageMode
LAPS
Microsoft Local Admin Password Solution - used to randomize and rotate local administrator passwords on Windows hosts, preventing lateral movement
- Possible to enumerate what dom users can read laps pw set for machines iwth laps installed, and what machines do not have laps installed
- LAPSToolkit https://github.com/leoloobeek/LAPSToolkit facilitates this w/ several funcs.
- Parsing
ExtendedRightsfor all computers withLAPSenabled, showing groups specifically delegated to read LAPS passwords (often protected groups) - An acct that has joined a computer to a domain receives
All Extended Rightsover that host, and this right gives that account the ability to read passwords.
- Parsing
- Enumeration may show a user account that can read the LAPS password on a host. This can help us target specific AD users who can read LAPS passwords.
Find-LAPSDelegatedGroups
We can also use
Find-AdmPwdExtendedRights
- Checks rights on each computer with LAPS enabled for any groups with read access and users with
all extended rights- users with
all extended rightscan read LAPS passwords and may be less protected than users in delegated groups, so this is worth checking for.
- users with
Furthermore checking:
Get-LAPSComputers
- Function used to search for computers that have LAPS enabled when passwords expire and even the randomized passwords in cleartext, if our user has access.