• Stars
    star
    249
  • Rank 162,987 (Top 4 %)
  • Language
    C#
  • Created over 2 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Fully modular persistence framework

PersistAssist

PersistAssist is a fully modular persistence framework written in C#. All persistence techniques contain a cleanup method which will server to remove the persistence aside from the persistence code. This is a WIP so there are many empty classes, the main object of this project initially was to build out a fully modular framework meant to make adding new features as simple as inheriting a class and adding the code.

Author - Victor Suarez (@Gr1mmie)

Compiling

PersistAssist will not have pre-compiled binaries so you'll have to compile the code manually. To do this open up the solution file and select "Release" and the desired arch in the build menu and hit start.

Usage

To view the help menu, use PersistAssist.exe -h

 ______                  __       __   _______             __       __
|   __ .-----.----.-----|__.-----|  |_|   _   .-----.-----|__.-----|  |_
|    __|  -__|   _|__ --|  |__ --|   _|       |__ --|__ --|  |__ --|   _|
|___|  |_____|__| |_____|__|_____|____|___|___|_____|_____|__|_____|____|
   Author: @Grimmie (@FortyNorthSec)
      Ver: v0.2

Usage: PersistAssist.exe -t [technique] -<extra options>
Provide the persist technique and what to do with the technique (persist, cleanup, display info)
To list all available persistence techiques, use PersistAssist.exe -l
  -t, --technique=VALUE      Persistence technique to use
  -a, --action=VALUE         Action to perform
  -s, --search=VALUE         Keyword to search for
      --cmd, --command=VALUE Command to use as payload
      --rk, --rootkey=VALUE  Root key for registry operations
      --sk, --subkey=VALUE   Sub key for registry operations
      --kv, --keyvalue=VALUE Value to assign regirsty key
      --rc, --registrycontext=VALUE
                             Context to write reg key to (options: hkcu or hklm)
      --tn, --taskname=VALUE Task name to set for MSBuild operations
      --pl, --payload=VALUE  Payload to substitute into template
      --fp, --filepath=VALUE Path to file/directory to target
      --dp, --duplicatepath=VALUE
                             Path to duplicate file times from, modified all
                               timestamps
      --ts, --timestamp=VALUE
                             Specify M(odified), A(ccessed), or C(reated)
                               timestamp. Use ALL to target all timestamps
      --nt, --newtime=VALUE  Specify a new date to change specified timestamp to
      --un, --username=VALUE Specify username for credCheck
      --pw, --passwd=VALUE   Specify password for credCheck
      --efq, --eventFilterQuery=VALUE
                             EventFilter query for WMI event subscription
      --efn, --eventFilterName=VALUE
                             EventFilter name for WMI event subscription
      --ecn, --eventConsumerName=VALUE
                             EventConsumer name for WMI event subscription
      --efv, --eventConsumerValue=VALUE
                             EventConsumer value for WMI event subscription
  -q, --query=VALUE          Query to run
      --dn, --domain=VALUE   Specify current domain
  -p, --persist              Execute specified techique
  -c, --cleanup              Clean up specified technique
  -l, --list                 List available techniques
      --lm, --listmodule=VALUE
                             List available techniques from specified module
                               category
  -i, --info                 Displays information on a specified technique
  -h, --help                 show this message and exit

To list the available modules, use PersistAssist.exe -l

 ______                  __       __   _______             __       __
|   __ .-----.----.-----|__.-----|  |_|   _   .-----.-----|__.-----|  |_
|    __|  -__|   _|__ --|  |__ --|   _|       |__ --|__ --|  |__ --|   _|
|___|  |_____|__| |_____|__|_____|____|___|___|_____|_____|__|_____|____|
   Author: @Grimmie (@FortyNorthSec)
      Ver: v0.2

[*] Available modules:

Persistence:
============
Registry:
        GenericRegAdd - Add any arbitrary registry key
        RunKeys - Registers a RunKey on either HKLM or HKCU
MSBuild:
        InlineTasks - Deploys MSBuild InlineTask based payload. Drops file to disk
        OverrideTask - Deploys MSBuild OverrideTask based persistence. Drops file to disk and requires admin access
AccountOperations:
WMI:
Misc:
        PSProfile - Backdoors PowerShell profile files
        StartupFolder - Drops a shortcut to a startup path

Tradecraft:
===========
        SvcList - Lists services on a machine
        Creds - Cred operations
        FileRead - Reads a file in memory to get around having to download files for reading
        NetList - basically ipconfig
        ProcList - Lists running processes
        RegList - Lists contents of specified registry key
        SchList - Lists scheduled tasks on a machine
        TimeStomp - Modifies file and directory time stamps. Does not modify Entry timestamp
        WMIQuery - Run an arbitrary WMI Query
        Compile - Standalone utility to compile exes based on C# payloads included in the framework

Payloads:
=========
CSharp:
        HelloWorld - hola mundo
        MsgBox - Displays a MessageBox
        PopCalc - pops calc
        PopCalcAPI - Pops calc via the API
VBA:

To list only modules belonging to a specific category, use -lm. i.e listing out all the available Tradecraft modules: PersistAssist.exe -lm Tradecraft

 ______                  __       __   _______             __       __
|   __ .-----.----.-----|__.-----|  |_|   _   .-----.-----|__.-----|  |_
|    __|  -__|   _|__ --|  |__ --|   _|       |__ --|__ --|  |__ --|   _|
|___|  |_____|__| |_____|__|_____|____|___|___|_____|_____|__|_____|____|
   Author: @Grimmie (@FortyNorthSec)
      Ver: v0.2

Tradecraft:
==========
        SvcList - Lists services on a machine
        Creds - Cred operations
        FileRead - Reads a file in memory to get around having to download files for reading
        NetList - basically ipconfig
        ProcList - Lists running processes
        RegList - Lists contents of specified registry key
        SchList - Lists scheduled tasks on a machine
        TimeStomp - Modifies file and directory time stamps. Does not modify Entry timestamp
        WMIQuery - Run an arbitrary WMI Query
        Compile - Standalone utility to compile exes based on C# payloads included in the framework

Persistence contains that available techniques that can be used, the tradecraft modules serve as utility functions to perform various operations, and the payload modules contain paylaods that can be used for various persistence tasks though are currently only available for the OverrideTask module.

To return information on a module, use PersistAssist.exe -t [technique] -i

Name:     OverrideTask
Desc:     Deploys MSBuild OverrideTask based persistence. Drops file to disk and requires admin access
Usage:
        Persist: PersistAssist.exe -t OverrideTask -p -tn [task name] -pl [payload]
        Cleanup: PeristAssist.exe -t OverrideTask -c -tn [task name]
Category: MSBuild
Author:

More Repositories

1

EyeWitness

EyeWitness is designed to take screenshots of websites, provide some server header info, and identify default credentials if possible.
Python
4,899
star
2

C2concealer

C2concealer is a command line tool that generates randomized C2 malleable profiles for use in Cobalt Strike.
Python
987
star
3

WMImplant

This is a PowerShell based tool that is designed to act like a RAT. Its interface is that of a shell where any command that is supported is translated into a WMI-equivalent for use on a network/remote machine. WMImplant is WMI based.
PowerShell
798
star
4

Just-Metadata

Just-Metadata is a tool that gathers and analyzes metadata about IP addresses. It attempts to find relationships between systems within a large dataset.
Python
623
star
5

Egress-Assess

Egress-Assess is a tool used to test egress data detection capabilities
PowerShell
610
star
6

GraphStrike

Cobalt Strike HTTPS beaconing over Microsoft Graph API
C
539
star
7

EXCELntDonut

Excel 4.0 (XLM) Macro Generator for injecting DLLs and EXEs into memory.
Python
498
star
8

WMIOps

This repo is for WMIOps, a powershell script which uses WMI for various purposes across a network.
PowerShell
381
star
9

EDD

Enumerate Domain Data
C#
312
star
10

CIMplant

C# port of WMImplant which uses either CIM or WMI to query remote systems
C#
196
star
11

AutoFunkt

Python script for automating the creation of serverless cloud redirectors from Cobalt Strike malleable C2 profiles
Python
189
star
12

Jigsaw

Hide shellcode by shuffling bytes into a random array and reconstruct at runtime
Python
173
star
13

AggressorAssessor

Aggressor scripts for phases of a pen test or red team assessment
Python
171
star
14

hot-manchego

Macro-Enabled Excel File Generator (.xlsm) using the EPPlus Library.
C#
140
star
15

jargon

Python
114
star
16

Screenshooter

C# program to take a full size screenshot or a recording of the user's desktop. Takes in 0-3 flags
C#
83
star
17

DigDug

Python
66
star
18

FunctionalC2

A small POC of using Azure Functions to relay communications. Feel free to add additional functionality beyond this POC!
Python
66
star
19

What-The-F

This repo hosts a poc of how to execute F# code within an unmanaged process
C++
64
star
20

SqlClient

POC for .NET mssql client for accessing database data through beacon
C#
59
star
21

MiddleOut

A small .NET compression utility
C#
54
star
22

Hasher

Hasher is designed to be a tool that allows you to quickly hash plaintext strings, or compare hashed values with a plaintext locally. Not meant to crack passwords, but designed for local checks.
Python
48
star
23

GPPDeception

This script generates a groups.xml file that mimics a real GPP to create a new user on domain-joined computers
PowerShell
44
star
24

rstools

Python
39
star
25

Chromatophore

Utilities for obfuscating shellcode
C
38
star
26

RandomScripts

Scripts for public use that we've randomly written, or have updated from other people's work.
Shell
36
star
27

ProxmarkWrapper

A wrapper around the Proxmark3 client that will alert the user of specific events
Python
29
star
28

CLM-Base64

This project provides Base64 encoding and decoding functionality to PowerShell within Constrained Language Mode
PowerShell
22
star
29

SharpCollectionTemplate

PowerShell
13
star
30

Delta-Encoder

Python
12
star
31

CredCheck

.NET wrapper around LogonUserA to test creds
C#
10
star
32

RansomwareTalks

code for ransomware talks
C#
8
star
33

CUDA-Installation-Script

Quick and dirty installation script for CUDA drivers on Ubuntu 18.04 LTS to save a bit of time.
Shell
3
star