Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace BlockDllTest
{
class Program
{
static void Main(string[] args)
{
@decay88
decay88 / NetLoader.cs
Created August 7, 2020 01:55 — forked from Arno0x/NetLoader.cs
Partial rewrite of @Flangvik NetLoader. Supports proxy with authentication, XOR encrypted binaries, multiple arguments passing to binary.
/*
Author: Arno0x0x, Twitter: @Arno0x0x
Completely based on @Flangvik netloader
This partial rewrite of @Flangvik Netloader includes the following changes:
- Allow loading of an XOR encrypted binary to bypass antiviruses
To encrypt the initial binary you can use my Python transformFile.py script.
Example: ./transformFile.py -e xor -k mightyduck -i Rubeus.bin -o Rubeus.xor
using Microsoft.Win32.SafeHandles;
using System;
using System.ComponentModel;
/// <summary>
/// Static core class providing tools for manipulating threads.
/// </summary>
public static class ThreadCore
{ #region GetThreadContext
/// <summary>
@decay88
decay88 / # Useful C# References.md
Created March 9, 2020 14:54
C# Useful References

Useful C# References

@decay88
decay88 / GetFunctionPointer.cs
Created March 9, 2020 14:46 — forked from harujoh/GetFunctionPointer.cs
関数ポインタと呼ばれし者たちの墓
using System;
using System.IO;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace ConsoleApp60
{
class Program
@decay88
decay88 / DelegateFactory.cs
Created March 6, 2020 17:04
DelegateFactory.cs
using System;
using System.Reflection;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
namespace Westwind.Utilities
{
@decay88
decay88 / invoker.cs
Created March 6, 2020 16:52
Invoker.cs
public class Invoker : DynamicObject, IDynamicMetaObjectProvider{
Type InstanceType
public Invoker(object instance)
{
Initialize(instance);
}
protected void Initialize(object instance)
public static string ToString(this byte[] bytes)
{
char[] chars = new char[bytes.Length / sizeof(char)];
Buffer.BlockCopy(bytes, 0, chars, 0, bytes.Length);
return new string(chars);
}
public static byte[] ToByteArray(this string @string)
{
byte[] bytes = new byte[@string.Length * sizeof(char)];
using System;
using System.IO;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace ConsoleApp60
{
class Program
public class TypeTarget<T>
{
public T ToCreateInstance(params object[] parameters)
{
return ConstructorInvoke<T>.UsingPrivateConstructor(parameters);
}
public StaticSetter<T> Set(string memberName)
{
return new StaticSetter<T>(memberName);