Skip to content

Instantly share code, notes, and snippets.

View mgeeky's full-sized avatar
💭
Wanna sip a sencha?

Mariusz Banach mgeeky

💭
Wanna sip a sencha?
  • Binary-Offensive.com
  • Poland
  • X @mariuszbit
View GitHub Profile
@mgeeky
mgeeky / WMI_persistence_template.ps1
Created August 22, 2017 22:45
Fileless WMI persistence payload template (CommandlineEventConsumer, __IntervalTimerInstruction trigger, w/ registry payload storage)
# Step #1 - Prep payload
$Hive = 'HKLM'
$PayloadKey = 'SOFTWARE\PayloadKey'
$PayloadValue = 'PayloadValue'
$TimerName = 'PayloadTrigger'
$EventFilterName = 'TimerTrigger'
$EventConsumerName = 'ExecuteEvilPowerShell'
switch ($Hive) {
'HKLM' { $HiveVal = [UInt32] 2147483650 }
@mgeeky
mgeeky / dummy-web-server.py
Created July 21, 2016 11:46 — forked from bradmontgomery/dummy-web-server.py
a minimal http server in python. Responds to GET, HEAD, POST requests, but will fail on anything else.
#!/usr/bin/env python
"""
Very simple HTTP server in python.
Usage::
./dummy-web-server.py [<port>]
Send a GET request::
curl http://localhost
@mgeeky
mgeeky / web-server.rb
Created July 21, 2016 11:45 — forked from Integralist/web-server.rb
Create basic Web Server in Ruby (using WEBrick)
#!/usr/bin/env ruby
require "webrick"
=begin
WEBrick is a Ruby library that makes it easy to build an HTTP server with Ruby.
It comes with most installations of Ruby by default (it’s part of the standard library),
so you can usually create a basic web/HTTP server with only several lines of code.
The following code creates a generic WEBrick server on the local machine on port 1234,
@mgeeky
mgeeky / eternalblue_merge_shellcode.py
Created June 25, 2017 02:26 — forked from worawit/eternalblue_merge_shellcode.py
Windows x64 and x86 kernel shellcode for eternalblue exploit
# This file has no update anymore. Please see https://github.com/worawit/MS17-010
import sys
from struct import pack
if len(sys.argv) < 4:
print('Usage: {} sc_x86 sc_x64 sc_out'.format(sys.argv[0]))
sys.exit()
sc_x86 = open(sys.argv[1], 'rb').read()
sc_x64 = open(sys.argv[2], 'rb').read()
@mgeeky
mgeeky / pe-aware-split.py
Last active April 23, 2018 10:55 — forked from DiabloHorn/pe-aware-split.py
Split file while preserving PE format
#!/usr/bin/env python
# DiabloHorn https://diablohorn.com
# blank out bytes taking into account the PE file format
# input file: base64 malware.exe | rev > enc.txt
import sys
import os
#pip install pefile
import pefile
import argparse
import logging
@mgeeky
mgeeky / PowerView-2.0-tricks.ps1
Created December 18, 2018 15:22 — forked from HarmJ0y/PowerView-2.0-tricks.ps1
PowerView-2.0 tips and tricks
# NOTE: the most updated version of PowerView (http://www.harmj0y.net/blog/powershell/make-powerview-great-again/)
# has an updated tricks Gist at https://gist.github.com/HarmJ0y/184f9822b195c52dd50c379ed3117993
# get all the groups a user is effectively a member of, 'recursing up'
Get-NetGroup -UserName <USER>
# get all the effective members of a group, 'recursing down'
Get-NetGroupMember -GoupName <GROUP> -Recurse
# get the effective set of users who can administer a server
@mgeeky
mgeeky / all.txt
Created January 6, 2019 19:55 — forked from jhaddix/all.txt
all wordlists from every dns enumeration tool... ever. Please excuse the lewd entries =/
This file has been truncated, but you can view the full file.
.
..
........
@
*
*.*
*.*.*
🐎
@mgeeky
mgeeky / PowerView-3.0-tricks.ps1
Created December 19, 2018 17:18 — forked from HarmJ0y/PowerView-3.0-tricks.ps1
PowerView-3.0 tips and tricks
# PowerView's last major overhaul is detailed here: http://www.harmj0y.net/blog/powershell/make-powerview-great-again/
# tricks for the 'old' PowerView are at https://gist.github.com/HarmJ0y/3328d954607d71362e3c
# the most up-to-date version of PowerView will always be in the dev branch of PowerSploit:
# https://github.com/PowerShellMafia/PowerSploit/blob/dev/Recon/PowerView.ps1
# New function naming schema:
# Verbs:
# Get : retrieve full raw data sets
# Find : ‘find’ specific data entries in a data set
@mgeeky
mgeeky / Rulz.py
Last active January 28, 2019 09:13 — forked from monoxgas/Rulz.py
#!/usr/bin/env python3
# Rulz.py
# Author: Nick Landers (@monoxgas) - Silent Break Security
import os
import sys
import argparse
import re
import binascii
import codecs
[skin]
description=Ajnasz Blue Theme. Midnight Commander skin from Ajnasz.
[Lines]
horiz=─
vert=│
lefttop=┌
righttop=┐
leftbottom=└
rightbottom=┘