• Post category:StudyBullet-9
  • Reading time:6 mins read


Build your own hacking tools with C#

What you will learn

Learn C# Basics

Learn how to build tools with C#

Learn how to enumerate Active Directory using C#

Automate tasks using C#

Learn some Powershell tools

Learn WinAPI with C#

Enumerate LSASS using WinAPI

Learn PE File Format

Description

This course teaches you all the way from fundamentals of C# to invoke WinAPI withΒ  C#. C# is Microsoft developed language which can be used for multiple purposes. C# gives almost all access to windows components including WinAPI via PInvoke. This course also teaches how to build your own C2 Server with Python Flask as backend and C2 agent. Features include Client connection manager, File explorer, Registry Explorer, etc. More features of C2 will be added from time to time. We will see how to code a traditional reverse shell with C2 which by default bypasses Constrained Language Mode. Next we will see some privilege escalation techniques. Next we will enumerate Active Directory with C# and build our own automation tools. We will write tools that automate Kerberoasting, DCSync capable users, Delegation Attacks and much more. We will write a simple loader that loads .NET executables in memory and executes them. Next we will see how to use WinAPI functions in C# and write tools for Shellcode Injection, DLL Injection, Debugging checks, Backdooring of PE Files and much more. We will also see the structure of PE File format.

No programming or Activedirectory experience required.


Get Instant Notification of New Courses on our Telegram channel.


This course explains all the theory necessary to get started into building your own tools.

English
language

Content

Introduction

Introduction

C# Basics

Environment Setup and Hello World
Variables and Operators
Reading User Input
Loops
Arrays
Functions

Python C2 Server

Sockets and Multithreading
Flask basics
Linking Sockets and web interface
Bidirectional File Transfer
Multithreaded keylogger

C# Reverse Shell

Coding a reverse shell in C#

LDAP Enumeration

LDAP Enumeration with ldapsearch

Privilege Escalation

Finding Unquoted Service paths
Finding Writable Files

Automating Active Directory Enumeration

Finding ASREP Roastable users
Finding Nested groups
Finding DCSync capable users
Finding Unconstrained Delegation users
Kerberos Constrained Delegation Attack
Resource based Constrained Delegation

.NET Loader

Simple .NET Loader

Persistence

AdminSDHolder Persistence via C#

WinAPI with C#

MessageBoxW and GetUserNameW
Structures and Unions
NetShareEnumW – Enumerating network shares
GetTokenInformation – Checking our elevation privilege
Listing All token privileges
Enabling all assigned token privileges – AdjustTokenPrivilege
Simple Shellcode runner
Shellcode Injection in remote process
Storing shellcode in .rsrc resources section
DLL Injection
Finding DLLs and their Base addresses in a process
Checking if Process is attached to debugger or not
Detaching the debugger from process using NtRemoveProcessDebug
Backdooring PE Files

PE File Format

DOS Header, DOS Stub, Signature, File Header

HackTheBox Walkthroughs

Hackthebox – SAUNA