This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# POC HH.exe - Device Guard bypass | |
# Oddvar Moe - https://msitpros.com | |
# Code execution with HH.exe / CHM files | |
# Code to generate CHM was borrowed from: | |
# https://raw.githubusercontent.com/samratashok/nishang/master/Client/Out-CHM.ps1 | |
#https://gist.githubusercontent.com/api0cradle/95ae3c7120f16255d94088bd8959f4b2/raw/fa25b85e85bbb64c5cf021adf92b125357086a6f/GenerateCHM_1.0.ps1 | |
$Outputpath = "C:\hhpoc" | |
#Create the table of contents for the CHM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Install Docker | |
``` | |
# install the backported kernel | |
$ sudo apt-get update | |
$ sudo apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring | |
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
$ sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Build recursive hash of files in directory tree in hashdeep format. | |
Hashdeep format description: | |
http://md5deep.sourceforge.net/start-hashdeep.html | |
hashdeep.py differences from original hashdeep: | |
- if called without arguments, automatically starts to build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
''' Not my script, found on the Internet, and rediscovered on my hard drive | |
''' | |
import sys | |
def cidr_to_regex(cidr): | |
ip, prefix = cidr.split('/') | |
base = 0 | |
for val in map(int, ip.split('.')): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# One-liners (or one'ish-liners) | |
# | |
### CONVERT a hex file to hex string | |
# for_testing$ echo -n "DEADBEEFDEADBEEF" > tmp | |
File.open("tmp", "rb") {|f| [f.read].pack("H*")} | |
# => "\xDE\xAD\xBE\xEF\xDE\xAD\xBE\xEF" | |
### CONVERT to base64 (note .encode and .strict_encode can have different results) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- encoding: UTF-8 -*- | |
# | |
# sample django HTTP proxy | |
# | |
import urlparse | |
import requests | |
import logger |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# codigo tomado de: | |
# http://preshing.com/20110926/high-resolution-mandelbrot-in-obfuscated-python | |
# ajusta el tamaño en la linea doce. | |
_ = ( | |
255, | |
lambda | |
V ,B,c | |
:c and Y(V*V+B,B, c | |
-1)if(abs(V)<6)else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PS1="\[\033[34m\]\w\[\033[35m\]\`ruby -e \"print (%x{git branch 2> /dev/null}.split(/\n/).grep(/^\*/).first || '').gsub(/^\* (.+)$/, '(\1)')\"\`\[\033[00m\]> " |