Skip to content

Instantly share code, notes, and snippets.

View sinmygit's full-sized avatar

marks sinmygit

  • Taiwin Tec ltd
  • tai
View GitHub Profile
@sinmygit
sinmygit / RegRunner.cs
Created November 28, 2015 05:53
Executes Encrypted File From Registry
using System;
using System.IO;
using System.Text;
using Microsoft.Win32;
using System.IO.Compression;
using System.EnterpriseServices;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
@sinmygit
sinmygit / katz.cs
Created November 28, 2015 05:54
Execute Mimikatz Inside of RegSvcs or RegAsm - .NET utilities Proof of Concept
using System;
using System.IO;
using System.Text;
using System.IO.Compression;
using System.EnterpriseServices;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
/*
@sinmygit
sinmygit / signer.ps1
Last active November 28, 2015 05:54
Create a Self-Signed Executable - Without Makecert.exe
function Invoke-CreateCertificate([string] $certSubject, [bool] $isCA)
{
$CAsubject = $certSubject
$dn = new-object -com 'X509Enrollment.CX500DistinguishedName'
$dn.Encode( 'CN=' + $CAsubject, $dn.X500NameFlags.X500NameFlags.XCN_CERT_NAME_STR_NONE)
#Issuer Property for cleanup
$issuer = 'Mycrosft'
$issuerdn = new-object -com 'X509Enrollment.CX500DistinguishedName'
$issuerdn.Encode('CN=' + $issuer, $dn.X500NameFlags.X500NameFlags.XCN_CERT_NAME_STR_NONE)
# Create a new Private Key
@sinmygit
sinmygit / rev_http.cs
Created November 28, 2015 05:59
InstallUtil - Download And Execute Reverse_HTTP Payload
using System;
using System.Net;
using System.Configuration.Install;
using System.Runtime.InteropServices;
/*
Author: Casey Smith, Twitter: @subTee
License: BSD 3-Clause
Step One:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\csc.exe /out:revshell.exe rev_http.cs
@sinmygit
sinmygit / iukl.cs
Created November 28, 2015 05:59
InstallUtil Keylogger/MouseClick Recorder - Stores Logs in [Documents\Klog-Logs]
using System;
using System.IO;
using System.Diagnostics;
using System.Windows.Forms;
using System.Configuration.Install;
using System.Runtime.InteropServices;
//KeyStroke Mouse Clicks Code
/*
* https://code.google.com/p/klog-sharp/
*/
@sinmygit
sinmygit / netkatz.cs
Created November 28, 2015 06:01
Prototype - x86
using System;
using System.IO;
using System.Net;
using System.Text;
using System.IO.Compression;
using System.Collections.Generic;
using System.Configuration.Install;
using System.Runtime.InteropServices;
@sinmygit
sinmygit / Invoke-MimikatzSharp.cs.ps1
Created November 28, 2015 06:01
Invoke-Mimikatz.cs.ps1 Invokes x86 or x64 Mimiktaz Inside of PowerShell Process
$Source = @"
using System;
using System.IO;
using System.Text;
using System.IO.Compression;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
@sinmygit
sinmygit / execalc.cs
Created November 28, 2015 06:02
Module Initializer ShellCode Example
using System;
using System.Net;
using System.Diagnostics;
using System.Reflection;
using System.Configuration.Install;
using System.Runtime.InteropServices;
/*
Author: Casey Smith, Twitter: @subTee
License: BSD 3-Clause
@sinmygit
sinmygit / netkatz.cs
Created November 28, 2015 06:04
Downloads and Executes Mimikatz In Memory From GitHub
using System;
using System.IO;
using System.Net;
using System.Text;
using System.IO.Compression;
using System.Collections.Generic;
using System.Configuration.Install;
using System.Runtime.InteropServices;
@sinmygit
sinmygit / shellcode.js
Created November 28, 2015 06:05
Execute ShellCode Via Jscript.NET
import System;
import System.Runtime.InteropServices;
import System.Reflection;
import System.Reflection.Emit;
import System.Runtime;
import System.Text;
//C:\Windows\Microsoft.NET\Framework\v2.0.50727\jsc.exe Shellcode.js
//C:\Windows\Microsoft.NET\Framework\v4.0.30319\jsc.exe Shellcode.js