Adam Furmanek
Hacking C# from the inside - how to do anything in NET
#1about 6 minutes
Avoiding dynamic dispatch with static method invocation
Bypass polymorphism by generating intermediate language (IL) with the `call` instruction instead of `callvirt` to invoke a specific base class method.
#2about 4 minutes
How to await async void methods in C#
Implement a custom `TaskScheduler` and `SynchronizationContext` to enable awaiting `async void` methods and properly handle their exceptions.
#3about 14 minutes
Running raw machine code from a C# byte array
Explore two methods for executing machine code: using the `Marshall` API for managed delegates or by manually overwriting a method's body with a CPU jump instruction.
#4about 4 minutes
Hijacking methods by modifying metadata or machine code
Explore two techniques for method hijacking: either by overwriting the function pointer in the method descriptor or by injecting a jump instruction into the method's machine code.
#5about 6 minutes
Use case: Running an application on a different desktop
Apply method hijacking to the `CreateProcess` API by intercepting a constructor to specify a target desktop, a feature not exposed by the standard .NET API.
#6about 2 minutes
Use case: Handling unhandled exceptions on a thread
Prevent application crashes by hijacking the `Thread` constructor to automatically wrap the thread's starting logic in a try-catch block.
#7about 4 minutes
Handling the uncatchable StackOverflowException
Catch a `StackOverflowException` by using a WinAPI vectored exception handler to save and restore CPU registers, allowing the application to continue safely.
Related jobs
Jobs that call for the skills explored in this talk.
IGEL Technology GmbH
Bremen, Germany
Senior
C++
Powershell
Matching moments
04:19 MIN
A live demo of a typosquatting attack in .NET
How your .NET software supply chain is open to attack : and how to fix it
04:09 MIN
Introduction to developer-first security and CTFs
Capture the Flag 101
01:57 MIN
Presenting live web scraping demos at a developer conference
Tech with Tim at WeAreDevelopers World Congress 2024
01:51 MIN
A developer's journey through programming languages
Coffee with Developers - Martyn Kilbryde
04:13 MIN
Q&A: SynchronizationContext, tooling, and challenges
Asynchronicity and multithreading in C#
04:54 MIN
Why developers are a prime target for attackers
You click, you lose: a practical look at VSCode's security
02:01 MIN
Using AI to write an exploit as a non-developer
Let’s write an exploit using AI
02:35 MIN
Overview of modern C# community-loved features
Modern C#: A Dive into the Community's Most Loved new Features.
Featured Partners
Related Videos
C# 13 Unleashed: Live Demos of my Top 10 Cutting-Edge Features!
Ambesh Singh & Sachin Kumar
Exploring the Latest Features of .NET and C# by Building a Game
Rainer Stropek
Building a Compiler with C#
Florian Rappl
Tips, tricks and quirks in .NET
Paweł Łukaszuk
5 features that help you get the most out of C# 10
Louëlla Creemers
Down the Oregon Trail with Functional C#
Simon Painter
Programming secure C#/.NET Applications: Dos & Don'ts
Sebastian Leuer
Turbocharged: Writing High-Performance C# and .NET Code
Steve Gordon
Related Articles
View all articles



From learning to earning
Jobs that call for the skills explored in this talk.

Code Healers LLC
Hinesville, United States of America
Remote
€30-40K
Intermediate
Senior
.NET
React
JavaScript
+2



RecruitmentRevolution.com
Manchester, United Kingdom
Remote
£45-65K
Intermediate
CSS
HTML
REST
+5

Client Server
Sunderland, United Kingdom
Remote
£40-50K
Redis
React
Docker
+5

Access Softek
Remote
Intermediate
API
GIT
Unit Testing
Microservices
+1



ictjobs.ch
Remote
Intermediate
CSS
GIT
Blazor
ASP.NET
+1