Introductory C# for Red Team

Accessing the Windows API and Syscalls

What you will learn

Understand basic C# syntax

Understand Platform Invoke (Pinvoke)

Understand Dynamic Invocation (Dinvoke) and its capabilities

Understand Direct/Indirect syscalls and how to use them from C#

Understand the benefits/drawbacks of each technique


Interested in working with the Windows API? Do you like C#? Want to learn how to harness the function’s that you’ll need to create your own payloads? This is the course for anybody who said yes to any of the above. Getting into red team payload development isn’t easy; while there are a lot of extremely technical and educational resources accessible, it’s hard to get started. My journey began with C# so I have curated the things I’ve learned in the form of this course to help streamline the process of getting into payload development. The goal is to get all of these techniques/concepts that you might have heard before and have their usages, benefits, and drawbacks make more sense.

Why C#? C# is a nice language to get started with, especially with a weak or no programming background. The syntax isn’t extremely difficult, and it has some pretty powerful capabilities which we will explore in this course. Its usages go beyond just working with the Windows API, but that will be the focus of this course. The material from this course may be applicable to payload development in other languages too; while the language is C#, most of the concepts aren’t exclusive to the language.




whoami and the course


Variables, Data Types, Structs
Boolean Conditions, Loops
Functions, Classes

Windows API

Windows API
Managed vs Unmanaged code
Pinvoke and Marshalling Data Structures
Dinvoke: Dynamic Invocation
Dinvoke: Manual Mapping


What are syscalls?
Direct Syscalls: Dinvoke’s GetSyscallStub
Direct Syscalls: SharpHellsGate
Indirect Syscalls and Freshycalls

Extra sections

Abusable RWX space in .NET

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
100% Free SEO Tools - Tool Kits PRO

Check Today's 30+ Free Courses on Telegram!