Giter Club home page Giter Club logo

credswissarmy's Introduction

CredSwissArmy

This script is designed to identify if credentials are valid, invalid, or local admin valid credentials within a domain network and will also check for local admin. It works by attempting to mount C$ on each server using different credentials.

The Perl script also accepts NTLM hashes and uses pass-the-hash to confirm them.

WARNING: Careful running a domain account against multiple servers. If the Active Directory environment is setup to lockout accounts, you can easily accidentally lock a domain account by having too many invalid login attempts. Always test a domain account with one server to see if it is a valid password before attempting across multiple servers to check for local admin

Requirements:

  • For "CredSwissArmy.pl":

    • Kali
    • Perl
    • smbclient (should be default in kali)
    • pth-smbclient (should be default in kali)
  • For "Invoke-CredSwissArmy.pl":

    • Windows
    • Powershell 2.0+

Basic Usage:

  • For "CredSwissArmy.pl":

    • ./CredSwissArmy.pl -a <account or file> -s <server or file> -o <output_file>
    • ./CredSwissArmy.pl -a <account or file> -s <server or file> -o <output_file> --ntlm
  • For "Invoke-CredSwissArmy.ps1":

    • Invoke-CredSwissArmy -Hosts '10.10.10.10','10.20.30.40' -Credentials 'testdomain\raikia:hunter2','test\user:pass'
    • Invoke-CredSwissArmy -Hosts '10.10.10.10','10.20.30.40' -Credentials 'testdomain\raikia:hunter2','test\user:pass' | Tee C:\temp\output.txt

Examples:

  • For "CredSwissArmy.pl":

    • ./CredSwissArmy.pl -a 'testdomain\raikia:hunter2' -s 10.10.10.10 -o results.txt
    • ./CredSwissArmy.pl -a accounts.txt -s 10.10.10.10. -o results.txt
    • ./CredSwissArmy.pl -a 'testdomain\raikia:hunter2' -s servers.txt -o results.txt
    • ./CredSwissArmy.pl -a accounts.txt -s servers.txt -o results.txt
    • ./CredSwissArmy.pl -a 'testdomain\raikia:6608e4bc7b2b7a5f77ce3573570775af' -s 10.10.10.10 -o results.txt --ntlm
    • ./CredSwissArmy.pl -a accounts.txt -s servers.txt -o results.txt --ntlm
  • For "Invoke-CredSwissArmy.ps1":

    • Invoke-CredSwissArmy -Hosts '10.10.10.10','10.20.30.40' -Credentials 'testdomain\raikia:hunter2','test\user:pass'
    • Invoke-CredSwissArmy -Hosts '10.10.10.10','10.20.30.40' -Credentials 'testdomain\raikia:hunter2','test\user:pass' | Tee C:\temp\output.txt

Example output file (only for "CredSwissArmy.pl"):

   10.10.10.10,testdomain\admin,password,LOCAL ADMIN! Valid
   10.10.10.10,testdomain\randomuser,password,Valid
   10.10.10.10,testdomain\randomuser2,password,Invalid Creds

Help to show all available options:

  • ./CredSwissArmy.pl -h
  • Invoke-CredSwissArmy -?

ARGUMENTS for "CredSwissArmy.pl"

  • -a, --accounts <word/file>
    > A word or file of user credentials to test. Usernames are accepted in the form of 'DOMAIN\USERNAME:PASSWORD' ('DOMAIN' is optional) (Username:Password delimiter is configurable)

  • -s, --servers <word/file>
    > A word or file of servers to test against. Each credential will be tested against each of these servers by mounting attempting to mount "C$"

Other Options for "CredSwissArmy.pl"

  • -v, --valid
    > Only print valid credentials (those with valid usernames/passwords). Will print both local admins and those with valid users.

  • -i. --invalid
    > Only print invalid credentials (those with invalid username/password pairs).

  • -o, --output <file>
    > Print results to a file

  • --delimiter
    > Change the delimiter of the output file. Default is ","

  • -d, --debug > Print out debugging messages

  • -p, --passdelimiter
    > Change the delimiter between the account username and password. Default is ":"

  • --formatoutput <string> > Change the output format to the screen in PRINTF format (default: "%-35s %-35s %-35s %-35s\n")

You can supply either a single account/server via commandline, or
give a filename with multiple values separated by a new line
  • --ntlm > Treat the passwords as NTLM hashes and attempt to pass-the-hash with them

Contact Information

Feel free to contact me with any changes or feature requests!

credswissarmy's People

Contributors

raikia avatar

Watchers

 avatar  avatar  avatar

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.