The Windows client authentication process consists of many different modules that perform the entire logon, retrieval, and verification processes. In addition, there are many different and complex authentication procedures on the Windows system, such as Kerberos authentication. The Local Security Authority (LSA) is a protected subsystem that authenticates users and logs them into the local computer. In addition, the LSA maintains information about all aspects of local security on a computer. It also provides various services for translating between names and security IDs (SIDs).
Source: HackTheBox
Local interactive logon is performed by the interaction between the logon process (WinLogon), the logon user interface process (LogonUI), the credential providers, LSASS, one or more authentication packages, and SAM or Active Directory.
Winlogon is a trusted process responsible for managing security-related user interactions. These include:
Launching LogonUI to enter passwords at login
Changing passwords
Locking and unlocking the workstation
Attacking SAM
The Security Accounts Manager (SAM) is a database file in Windows operating systems that stores users’ passwords. It can be found in the C:\Windows\System32\config directory. The SAM file is encrypted using a locally stored key. The key is stored in the registry at HKEY_LOCAL_MACHINE\Security\SAM\Domains\Account.
Dumping LSA Secrets Remotely
Dumping SAM Database remotely
Cracking Hashes
We can crack NTLM hashes using both hashcat and john. Below are examples for each tool:
Using hashcat:
Using john:
Dumping and Attacking LSASS
To dump the LSASS process, use Task Manager:
The dump file will be saved in the following location:
C:\Users\<loggedonuser>\AppData\Local\Temp
Transferring Files through Shares
Create a share folder named CompData:
Move the LSASS dump to the share folder:
To extract credentials from the dump, use pypykatz:
Attacking Active Directory & NTDS.dit
Active Directory (AD) is widely used in enterprise networks. Understanding how to attack AD environments is essential since many organizations use it to manage Windows systems.
Creating a Custom List of Usernames or Passwords
If you collect names from a website:
Ben Williamson
Bob Burgerstein
Jim Stevenson
You can generate username and password lists as follows: