Monthly Archives: March 2018

Archive of posts published in the specified Month

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…

.NET Inside Out Part 7 — Generating Func from a bunch of bytes in C#

This is the seventh 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# In Capturing thread creation to catch exceptions we generated…

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…

VBS script to send an HTTP request

Another post with little script: Set o = CreateObject(“MSXML2.XMLHTTP”) o.open “GET”, “https://page.com”, False o.setRequestHeader “Header”, “Header value” ‘ Ignore certs (I bet you want to know how to do it) ‘ 2 stands for SXH_OPTION_IGNORE_SERVER_SSL_CERT_ERROR_FLAGS ‘ 13056 means ignore all server side cert…

VBS script to check if workstation is locked

Well, here it is: Function IsWorkstationLocked( computer ) Dim wmi : Set wmi = GetObject(“winmgmts://” & computer & “/root/cimv2”) Dim logonScreenCount : logonScreenCount = wmi.ExecQuery (“SELECT * FROM Win32_Process WHERE Name = ‘LogonUI.exe'”).Count IsWorkstationLocked = (logonScreenCount > 0) End Function Dim o If…