GithubHelp home page GithubHelp logo

anthrax3 / sharpattack-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gavz/sharpattack

0.0 1.0 0.0 7.27 MB

A simple wrapper for C# tools

License: BSD 3-Clause "New" or "Revised" License

C# 100.00%

sharpattack-1's Introduction

SharpAttack

SharpAttack is a console for certain things I use often during security assessments. It leverages .NET and the Windows API to perform its work. It contains commands for domain enumeration, code execution, and other fun things.

Commands

=== SharpAttack Commands ===
Here are the commands available to you

Command                       Description
-------                       -----------
Help                          Displays Help
Exit                          Quits SharpAttack
DcomExec                      Executes a command against a remote machine through DCOM objects
DumpProcess                   Dumps the memory of a given process
FindLocalAdmin                Checks a list of computers to see if the current account has administrative
                              access to the endpoint
GetDomainComputer             Returns information about a domain computer.
GetDomainGroup                Returns information about a domain group.
GetDomainUser                 Returns information about a domain user.
GetLoggedOnUsers              Returns a list of users logged into a machine
GetSystem                     Attempts to impersonate NT AUTHORITY\SYSTEM
ImpersonateProcess            Impresonates the user that owns a given process
Kerberoast                    Returns a list of SPNs associated with user accounts
PowerShell                    Executes a PowerShell command without powershell.exe and attempts to evade
                              logging.
RevToSelf                     Reverts back to the original token for this process
WhoAmI                        Answers some really deep questions
WmiExec                       Executes a command against a remote machine over WMI

Building

SharpAttack is distributed as source code. Binaries will not be made available. To build SharpAttack:

  1. Clone the repo with git clone --recursive https://github.com/jaredhaight/SharpAttack
  2. Build with a recent version of Microsoft's Visual Studio. The free, community edition will work fine.
    • BEFORE YOU BUILD From the \SharpAttack\SharpSploit folder, run msbuild /t:restore to restore its packages. (Honestly I dont think it has packages, by Visual Studio disagrees)
    • Make sure that when you build the project, you're targeting the version of .NET thats appropriate for your needs.
    • Your build should result in a copy of SharpAttack.exe and SharpSploit.dll
  3. You can use Microsoft's ILMerge to merge SharpSploit.dll with the SharpAttack executable into a single file (.\ILMerge.exe SharpAttack.exe SharpSploit.dll /out:.\SharpAttackBundle.exe).
    • The only DLL that needs to be bundled with SharpAttack is SharpSploit. Any other DLLs can be ingnored.
    • Make sure to delete any pdb files before doing this else you'll get errors.

Using SharpAttack

SharpAttack can be used as a standalone console or from the command line. To use SharpAttack from the command line, simply run sharpattack.exe followed by the command you'd like to run. For example:

.\SharpAttack.exe PowerShell Get-Date

If your parameter has spaces in it, wrap it in quotes (example: SharpAttack.exe powershell "get-date; echo woot").

Some parameters accepts lists (mainly the ComputerName and IPAddress params). These should be entered as comma seperated values with no spacing (example: -ComputerName target1,target2,target3)

The help command lists what commands are available and what they do. You can also run help <command> to get help with a specific command and see its parameters.

Where possible, SharpAttack tries to use positional parameters (For example, powershell get-date works as well as powershell -command get-date).

SharpAttack also works with Cobalt Strikes execute-assembly, just as it would on the command line. This does require that the SharpSploit library be trimmed down a bit, which I do by removing Mimikatz.cs from the SharpSploit project before compiling.

Thanks

SharpAttack is built on top of Cobbr's incredible SharpSploit Project. SharpAttack is basically an easy way to interact with SharpSploit.

sharpattack-1's People

Contributors

jaredhaight avatar

Watchers

 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.