Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jbarcia on github.
  • I am josephbarcia (https://keybase.io/josephbarcia) on keybase.
  • I have a public key whose fingerprint is 4700 BEC7 8292 C129 B57B 6CCF 3C65 8F3B BB27 3BE5

To claim this, I am signing this object:

@jbarcia
jbarcia / Get-DownloadedPEHashes.ps1
Created August 11, 2016 14:26 — forked from et0x/Get-DownloadedPEHashes.ps1
Get the hashes of all exe / dll files downloaded from the internet. Checks for the Zone.Identifier ADS and ensures the value is 3.
function Get-DownloadedPEHashes
{
[CmdletBinding()]
Param(
[Parameter(Mandatory=$true, Position=0)]
[String]$Path,
[Switch]$Recursive = $true
)
if (!$Path.EndsWith('\'))
#!/usr/bin/env ruby
# -*- coding: binary -*-
#
# Poison a system's NetBIOS resolver for the WPAD name (not BadTunnel)
#
# Usage: ruby netbios-brute-local.rb <evil-wpad-server> <target-ip> <target-port> <pps>
# Contact: x[at]hdm.io
# License: https://opensource.org/licenses/BSD-2-Clause
#
#!/usr/bin/env ruby
# -*- coding: binary -*-
#
# Poison a system's NetBIOS resolver for the WPAD name from outside NAT (not BadTunnel)
#
# Usage: ruby netbios-brute-nat.rb <evil-wpad-server> <pps>
# Contact: x[at]hdm.io
# License: https://opensource.org/licenses/BSD-2-Clause
#
@jbarcia
jbarcia / evil.cs
Created September 17, 2016 18:17
Execute a DLL via Regsvr32
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using RGiesecke.DllExport;
namespace Export
{
class Test
{
#!/bin/bash
# update apt-get
export DEBIAN_FRONTEND="noninteractive"
sudo apt-get update
# remove previously installed Docker
sudo apt-get purge lxc-docker*
sudo apt-get purge docker.io*
@jbarcia
jbarcia / SQL Server UNC Path Injection Cheatsheet
Created November 10, 2016 13:54 — forked from nullbind/SQL Server UNC Path Injection Cheatsheet
SQL Server UNC Path Injection Cheatsheet
This is a list of SQL Server commands that support UNC path [injections] by default.
The injections can be used to capture or replay the NetNTLM password hash of the
Windows account used to run the SQL Server service. The SQL Server service account
has sysadmin privileges by default in all versions of SQL Server.
Note: This list is most likely not complete.
-----------------------------------------------------------------------
-- UNC Path Injections Executable by the Public Fixed Server Role
-----------------------------------------------------------------------
@jbarcia
jbarcia / Invoke-Kerberoast.ps1
Created December 14, 2016 14:34
Invoke-Kerberoast.ps1
<#
Invoke-Kerberoast.ps1
Author: Will Schroeder (@harmj0y), @machosec
License: BSD 3-Clause
Required Dependencies: None
Credit to Tim Medin (@TimMedin) for the Kerberoasting concept and original toolset implementation (https://github.com/nidem/kerberoast).
Note: the primary method of use will be Invoke-Kerberoast with various targeting options.
@jbarcia
jbarcia / pshell_template_embedded_script.xml
Created December 21, 2016 13:00 — forked from xorrior/pshell_template_embedded_script.xml
MSBuild Powershell Script XML template
<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 pshell.xml -->
<!-- Author: Casey Smith, Twitter: @subTee -->
<!-- License: BSD 3-Clause -->
<PropertyGroup>
<FunctionName Condition="'$(FunctionName)' == ''">None</FunctionName>
<Cmd Condition="'$(Cmd)' == ''">None</Cmd>
</PropertyGroup>
<Target Name="Hello">
@jbarcia
jbarcia / CertificateSubjectToPEGrouping.ps1
Created December 31, 2016 03:59 — forked from mattifestation/CertificateSubjectToPEGrouping.ps1
Can you trust everything that's signed on your host? This might help you begin to answer that question.
# Get-SystemDriver requires the ConfigCI module on Win10 Enterprise
# This will collect all signer information for all PEs in C:\
# This will take a while!!!
$Signers = Get-SystemDriver -ScanPath C:\ -UserPEs
# Associate the subject name of each certificate to the file/signer info
# so we can correlate the two.
$CertSubjectMapping = $Signers | % {
$Signer = $_