Category Archives

Archive of posts published in the category: Windows

Reordered code after compilation

Can one line of code in C# JIT compile into two different blocks of code in the same program? This sounds a little tricky but in fact is very easy and happens pretty often. Consider the following code: using System; namespace Reordering {…

Custom memory allocation in C# Part 7 — Stack allocation once again

This is the seventh part of the Custom memory allocation series. For your convenience you can find other parts in the table of contents in Part 1 — Allocating object on a stack We know how to allocate object on a stack, however,…

Concurrency Part 6 – Abandoned mutex

This is the sixth part of the Concurrency series. For your convenience you can find other parts in the table of contents in Part 1 – Mutex performance in .NET Let’s start with the following code: using System; using System.Threading; namespace AbandonedMutex {…

Concurrency Part 5 – WinAPI mutex

This is the fifth part of the Concurrency series. For your convenience you can find other parts in the table of contents in Part 1 – Mutex performance in .NET Last time we called WinAPI through P/Invoke, today we are going to call…

Concurrency Part 4 – .NET with P/Invoke

This is the fourth part of the Concurrency series. For your convenience you can find other parts in the table of contents in Part 1 – Mutex performance in .NET We have already seen a mutex in C# but last time it happened…

Concurrency Part 3 – Java mutex via JNI

This is the third part of the Concurrency series. For your convenience you can find other parts in the table of contents in Part 1 – Mutex performance in .NET Last time we saw file lock in Java which we can use on…

Concurrency Part 2 – Java file lock

This is the second part of the Concurrency series. For your convenience you can find other parts in the table of contents in Part 1 – Mutex performance in .NET Today we explore system-wide lock in Java 1.8.0_161 on Windows 10 x64. There…

Concurrency Part 1 – Mutex performance in .NET

This is the first part of the Concurrency series. For your convenience you can find other parts using the links below: Part 1 — Mutex performance in .NET Part 2 — Java file lock Part 3 — Java mutex via JNI Part 4…

.NET Inside Out Part 8 — Handling Stack Overflow Exception in C# with VEH

This is the eighth part of the .NET Inside Out series. For your convenience you can find other parts in the table of contents in Part 1 – Virtual and non-virtual calls in C# Today we are going to swallow Stack Overflow Exception…

DLL Injection Part 7 — Injecting Java code

This is the seventh part of the DLL Injection series. For your convenience you can find other parts in the table of contents in Part 1 – Registry We already injected native code into target, managed code into default application domain, and managed…

Transaction Scope time limit in ADO.NET

In ADO.NET there is a hard-coded system-wide limit for transaction set to 10 minutes. You cannot change it just like that in your web.config or App.config. You can change it in machine.config though. First, where are the machine configs? For 32 Bits: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machie.config…

DLL Injection Part 6 — Injecting managed code into specific App Domain

This is the sixth part of the DLL Injection series. For your convenience you can find other parts in the table of contents in Part 1 – Registry In Part 4 we saw how to inject managed DLL and execute some code in…

DLL Injection Part 5 — Hacking Minesweeper

This is the fifth part of the DLL Injection series. For your convenience you can find other parts in the table of contents in Part 1 – Registry In previous posts of this series we saw how to inject DLLs in different ways.…

DLL Injection Part 4 — Injecting managed DLL

This is the fourth part of the DLL Injection series. For your convenience you can find other parts in the table of contents in Part 1 – Registry Las time we saw how to inject DLL into target process using remote threads. However,…

DLL Injection Part 3 — Creating remote thread

This is the third part of the DLL Injection series. For your convenience you can find other parts in the table of contents in Part 1 – Registry We already know how to inject a DLL into process using registry or hooks. With…

DLL Injection Part 2 — Hooks

This is the second part of the DLL Injection series. For your convenience you can find other parts in the table of contents in Part 1 – Registry Last time we saw how to inject DLL using registry. Today we are going to…

DLL Injection Part 1 — Registry

This is the first part of the DLL Injection series. For your convenience you can find other parts using the links below : Part 1 — Registry Part 2 — Hooks Part 3 — Creating remote thread Part 4 — Injecting managed DLL…

Error 0x0000007B during native boot

Windows 7 Ultimate introduced interesting feature – native boot to system installed in Virtual Hard Disk (VHD). It works like this: we create virtual drive, install operating system in it (by using ordinary installer or by applying image), configure boot manager and add…