All Projects → mvelazc0 → Defcon27_csharp_workshop

mvelazc0 / Defcon27_csharp_workshop

Writing custom backdoor payloads with C# - Defcon 27 Workshop

Programming Languages

csharp
926 projects

Projects that are alternatives of or similar to Defcon27 csharp workshop

Pwndrop
Self-deployable file hosting service for red teamers, allowing to easily upload and share payloads over HTTP and WebDAV.
Stars: ✭ 878 (+78.82%)
Mutual labels:  redteam, payloads
Payloadsallthethings
A list of useful payloads and bypass for Web Application Security and Pentest/CTF
Stars: ✭ 32,909 (+6602.44%)
Mutual labels:  redteam, payloads
Ttps
Tactics, Techniques, and Procedures
Stars: ✭ 335 (-31.77%)
Mutual labels:  redteam
Octopus
Open source pre-operation C2 server based on python and powershell
Stars: ✭ 449 (-8.55%)
Mutual labels:  redteam
0xsp Mongoose
a unique framework for cybersecurity simulation and red teaming operations, windows auditing for newer vulnerabilities, misconfigurations and privilege escalations attacks, replicate the tactics and techniques of an advanced adversary in a network.
Stars: ✭ 419 (-14.66%)
Mutual labels:  redteam
Burpcrypto
BurpCrypto is a collection of burpsuite encryption plug-ins, support AES/RSA/DES/ExecJs(execute JS encryption code in burpsuite).
Stars: ✭ 350 (-28.72%)
Mutual labels:  payloads
Foureye
AV Evasion Tool For Red Team Ops
Stars: ✭ 421 (-14.26%)
Mutual labels:  redteam
Pivotsuite
Network Pivoting Toolkit
Stars: ✭ 329 (-32.99%)
Mutual labels:  redteam
Gtfobins.github.io
GTFOBins is a curated list of Unix binaries that can be used to bypass local security restrictions in misconfigured systems
Stars: ✭ 6,030 (+1128.11%)
Mutual labels:  redteam
A Red Teamer Diaries
RedTeam/Pentest notes and experiments tested on several infrastructures related to professional engagements.
Stars: ✭ 382 (-22.2%)
Mutual labels:  redteam
Hershell
Hershell is a simple TCP reverse shell written in Go.
Stars: ✭ 442 (-9.98%)
Mutual labels:  redteam
Awesome Red Teaming
List of Awesome Red Teaming Resources
Stars: ✭ 4,223 (+760.08%)
Mutual labels:  redteam
Impost3r
👻Impost3r -- A linux password thief
Stars: ✭ 355 (-27.7%)
Mutual labels:  redteam
Wadcoms.github.io
WADComs is an interactive cheat sheet, containing a curated list of Unix/Windows offensive tools and their respective commands.
Stars: ✭ 431 (-12.22%)
Mutual labels:  redteam
Cobalt strike extension kit
Attempting to be an all in one repo for others' userful aggressor scripts as well as things we've found useful during Red Team Operations.
Stars: ✭ 345 (-29.74%)
Mutual labels:  redteam
Go Shellcode
Load shellcode into a new process
Stars: ✭ 456 (-7.13%)
Mutual labels:  redteam
Redteam Research
Collection of PoC and offensive techniques used by the BlackArrow Red Team
Stars: ✭ 330 (-32.79%)
Mutual labels:  redteam
Open Redirect Payloads
Open Redirect Payloads
Stars: ✭ 361 (-26.48%)
Mutual labels:  payloads
Emp3r0r
linux post-exploitation framework made by linux user
Stars: ✭ 419 (-14.66%)
Mutual labels:  redteam
Repo Supervisor
Scan your code for security misconfiguration, search for passwords and secrets. 🔍
Stars: ✭ 482 (-1.83%)
Mutual labels:  redteam

Writing custom backdoor payloads with C#

This workshop aims to provide attendees hands-on experience on writing custom backdoor payloads using C# for the most common command and control frameworks including Metasploit, Powershell Empire and Cobalt Strike. The workshop consists in 7 lab exercises; each of the exercises goes over a different technique that leverages C# and .NET capabilities to obtain a reverse shell on a victim Windows host. The covered techniques include raw shellcode injection, process injection, process hollowing, runtime compilation, parent pid spoofing, antivirus bypassing, etc. At the end of this workshop attendees will have a clear understanding of these techniques both from an attack and defense perspective.

Skill Level: Intermediate

Prerequisites: Basic to intermediate programming/scripting skills. Prior experience with C# helps but not required.

Materials: Laptop with virtualization software. A Windows 10 virtual machine and a Kali Linux Virtual Machine.

The "Writing custom back payloads with C#" workshop was first presented at Defcon 27.

Authors

Labs

Lab 1 : Hello World

The goal of this lab is to implement the typical Hello World example with C#. The first exercise uses .NETs Console class to print “Hello World” while the second uses .NETs Platform Invocation Services feature to import and call the Win32 Api MessageBox.

Lab 2 : Custom Meterpreter Stager

The goal of this lab is to write a custom Meterpreter stager with C# by leveraging the WebClient class to download meterpreter’s second stage and Win32 API functions to copy the second stage in memory and execute it.

Lab 3 : Raw Shellcode Injection

The goal of this lab is to write a custom binary that injects a pre-defined shellcode into memory and executes it. Metasploit’s msfvenom will be used to generate the shellcode and the same Win32 API calls used in Lab 2 will be used to perform the execution.

Lab 4 : Shellcode Obfuscation

The goal of this lab is to reduce detection of the custom payloads by signature based anti-malware. We can achieve this by obfuscating the shellcode generated by msfvenom using two common techniques: XOR and AES

Lab 5 : PowerShell without PowerShell.exe

The goal of this lab is to execute a Powershell script and avoid to use the powershell.exe binary by leveraging the .NET framework and C#. Using this technique, we will get a Powershell Empire agent.

Lab 6 : DLL Injection

The goal of this lab is to implement the DLL Injection technique using C# and obtain a reverse shell from a victim host. Using 3 different exercises, we will understand and implement the different steps for a successful injection.

Lab 7 : Process Hollowing

The goal of this lab is to understand and implement the Process Hollowing technique using C# technique to obtain a reverse shell on a victim host.

Lab 8 : Parent Process Spoofing

The goal of the final lab is to leverage C# to spawn a new process spoofing its parent process and inject shellcode to it to obtain a reverse shell.

Acknowledgments

Most of the labs on this workshop started from a Github repository/gist, a Stack Overflow code snippet or a Google search. Thank you to everyone who shares code for others to learn from.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].