Skip to content

Instantly share code, notes, and snippets.

@cube0x0
cube0x0 / poc.py
Created June 3, 2019 14:06
poc for exploiting java serialization with ysoserial when encryption is enabled
#!/usr/bin/python3
import hashlib
import os
import argparse
import base64
import pyDes
import gzip
import hmac
import requests
function Get-DPAPIBlobs {
<#
.SYNOPSIS
Author: Cube0x0
License: BSD 3-Clause
.DESCRIPTION
Enumerate DPAPI blobs and masterkeys
#>
[CmdletBinding()]
Param()
#https://rohnspowershellblog.wordpress.com/2013/03/19/viewing-service-acls/
Add-Type @"
[System.FlagsAttribute]
public enum ServiceAccessFlags : uint
{
QueryConfig = 1,
ChangeConfig = 2,
QueryStatus = 4,
EnumerateDependents = 8,
Start = 16,
popup credentials {
item "Export As Owned" {
callback($1);
}
}
sub callback {
local('$template')
$template = "Invoke-Neo4jQuery -Query \"MATCH (n:User) WHERE n.name = 'REPLACEME' SET n.owned = True\" ";
foreach $cred (credentials()) {