GithubHelp home page GithubHelp logo

mvelazc0 / purplesharp Goto Github PK

View Code? Open in Web Editor NEW
757.0 31.0 105.0 973 KB

PurpleSharp is a C# adversary simulation tool that executes adversary techniques with the purpose of generating attack telemetry in monitored Windows environments

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

C# 100.00%
adversary-simulation detection-engineering controls-validation purple-team

purplesharp's Introduction

Hi there ๐Ÿ‘‹

I'm Mauricio. Currently, I'm a security researcher at Microsoft. My areas of focus include detection engineering, threat hunting and adversary simulation.

I (ocassionally) maintain a blog at https://medium.com/@mvelazco/.

I have presented and hosted workshops at conferences including BlackHat Arsenal, Defcon, DerbyCon, BSides, X33fcon, BruCON, Splunk .conf, SANS, MITRE ATT&CKcon, and others. Most of these can be found here: Talks-Presentations.

You can also find me on Twitter and LinkedIn.


purplesharp's People

Contributors

mvelazc0 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

purplesharp's Issues

Error while running single technique id on local system

Hi @mvelazc0 ,

how are you?

can you please help me out is there any assembly need to load in PowerShell before executing the purple sharp? Because when I run purplesharp.exe /t technique-id, I am getting object reference not set error. Please find the attached error snapshot.

Please suggest
C2DCDE17-1E0F-4352-8347-A4561B05496B

Network path not found

Hi @mvelazc0 ,

I don't know why but, each time I try to execute a remote technique playbook, I have this problem :

image

All my machines are in the same network (AD Server, Windows Target and operator endpoint why PurpleSharp), I checked the network settings and tried without Windows Defender. But every time it doesn't work. Have you ever encountered this problem or know where it could come from?

Here is my playbook configuration :

image

Run tests on localhost

Is it possible to run the tests against localhost?

C:\malware>PurpleSharp_x64.exe /t 1218.011 /rhost localhost /ruser neo /d DESKTOP-8ERPDM5
Password for DESKTOP-8ERPDM5\neo:

[+] Uploading and executing the Scout on \\localhost\C$\Windows\Temp\Scout.exe

Unhandled Exception: System.Management.ManagementException: User credentials cannot be used for local connections
   at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
   at System.Management.ManagementScope.InitializeGuts(Object o)
   at System.Management.ManagementScope.Initialize()
   at System.Management.ManagementObject.Initialize(Boolean getObject)
   at System.Management.ManagementObject.InvokeMethod(String methodName, Object[] args)
   at PurpleSharp.Lib.RemoteLauncher.wmiexec(String rhost, String executionPath, String cmdArgs, String domain, String username, String password)
   at PurpleSharp.Program.ExecuteRemoteTechniquesSerialized(CommandlineParameters cmd_params)
   at PurpleSharp.Program.Main(String[] args)

I can't find an example in the documentation.

purplesharp is detected as malware

I compiled purplesharp and tried it but my Microsoft defender report it as:
'Lilac' malware was detected on one endpoint
is that a normal behavior?

why

Why do I always prompt that my account or password is incorrect when I use purplesharp?
The remote local account password is correct

Current build errors - Scout.exe - Could not load file or assembly 'Newtonsoft.Json"

Hello,

I am building from the current main branch using Visual Studio 2019, I add the Newtonsoft.Json package and the tool builds ok and outputs the exe and dll into the build directory which runs ok but when I run it against another machine the scout.exe file is created and attempts to run but the process does not appear and the the purplesharp console shows the message:

[+] Uploading and executing the Scout on \testmachine\C$\Windows\Temp\Scout.exe
[+] Connecting to the Scout ...

If I attempt to run that scout.exe on the client machine I get this error:

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
at PurpleSharp.Program.Main(String[] args)

If I place the NewtownSoft dll in the same directory as the Scout file it launches ok but then when attempting to test a technique the file downloads the FirefoxInstaller file and then hangs waiting on communication.

I don't see this behavior with the August 2020 release. Am I incorrectly building the application? I appreciate the tool and for taking a look at this.

Thanks,

Ron

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.