NTLM cracking with --remove

cat .\hash.txt | .\cut.exe -d ":" "-f1,4" | Out-File -FilePath ntlm.txt -Encoding utf8

Script sort cracked NTLM

python3 hashes.txt cracked.txt

#!/usr/bin/env python

import sys

print("---start process---")

file_hashes = sys.argv[1]
file_cracked = sys.argv[2]

with open(file_hashes) as f:
    hashes = [line.rstrip() for line in f]

with open(file_cracked) as f:
    cracked = [line.rstrip() for line in f]

f = open("output.txt", "w")

for hash in hashes:
	for crack in cracked:
		if a[0] in hash:

The ouput.txt file is generated with all the NTLM hashes, including repetitions.

Finally, the top of the passwords can be see:

cat output.txt | sort | uniq -c | sort -nr
Get-Content .\output.txt | Group-Object | Sort-Object Count -Descending | Select-Object Name, Count

Create customized dic from rockyou

# grep -Ei 'batman|arkham|joker|alfred|bruce' /usr/share/wordlists/rockyou.txt > batman.txt
# wc -l batman.txt
5532 batman.txt

Password Profiling / Skweez && CEWL

.\skweez.exe https://xxxx/pt-pt https://xxx/pilotos -n 16 -m 1 -o teste.txt
cewl -m 6 -w megacorp-cewl.txt

Chartset custom hashcat

Hashcat methodology cracking

  • Cracking wordlist based

  • Cracking with Rules

  • Hybrid cracking: Wordlist + mask && mask + Wordlist.

Hint: use ?d (several ...) and ?s?d?d ..n

  • Brute-force cracking: ?sTarget?s?d?d?d?d (incremental 7 - 15)

  • Pure brute-force with chartset: (3) ?l?u ?3?3?3?3?3?3?3

Password analysis (Active Directory)

Bonus: run powershell script to get target groups ;)

#import powerview module!
#pick the target groups manually or filter *admin*
Get-DomainGroup -Properties name | Out-File -FilePath domaingroups.txt

#create target file with domain groups: groups.txt

#execute the script and change the vars!


foreach($group in Get-Content .\groups.txt) {
    if($line -match $regex){
        Write-Host "building group file: $group" -ForegroundColor red -BackgroundColor white 
        Get-DomainGroupMember $group | Select-Object -Property MemberDomain, MemberName, MemberObjectClass -ExpandProperty MemberName |  foreach {if($_.MemberObjectClass -eq "user"){$domain+$_.MemberName}} | Out-File -FilePath "$group.txt" -Encoding utf8

Write-Host "DPAT groups:"
Write-Host "python.exe .\ -n $workdir_files$dc_dump_file -c $workdir_files$cracked_file -g " -NoNewline
foreach($group in Get-Content .\groups.txt) {
    if($line -match $regex){
        If ((Get-Content "$group.txt")) {
          Write-Host " '$workdir_files$group.txt'" -NoNewline
Write-Host ""
Write-Host "Done! ;)" -ForegroundColor red -BackgroundColor white


Last updated