Skip to content

Instantly share code, notes, and snippets.

@blark
blark / poet.rb
Last active August 29, 2015 14:06
smbexec poet.rb replacement with bug fix for UTF-8
require 'lib_smb'
require 'thread'
require 'timeout'
require 'logger'
require 'open3'
class Poet
include Utils
# Error classes for account issues
@blark
blark / error.php
Created December 14, 2015 20:23
Phishing error page
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="10; url=welcome.php" />
<meta charset="utf-8">
<title>Password Error</title>
<style>
::-moz-selection {
background: #b3d4fc;
text-shadow: none;
@blark
blark / phishing.ipynb
Created December 14, 2015 22:25
Phishing with iPython Notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@blark
blark / llmnr-listen.py
Last active December 24, 2015 20:49
Simple LLMNR listener.
import socket
ALL = "0.0.0.0"
LLMNR_ADDR = "224.0.0.252"
LLMNR_PORT = 5355
def hexPretty(firstB, lastB):
return ''.join('%02x' % b for b in data[firstB:lastB])
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
@blark
blark / llmnr-improved.py
Last active December 25, 2015 20:39
LLMNR listener round 2
import socket
import struct
import datetime
ALL = "0.0.0.0"
LLMNR_ADDR = "224.0.0.252"
LLMNR_PORT = 5355
# Setup network stuff
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
@blark
blark / .tmux.conf
Created October 13, 2016 03:03
Tmux configuration file
######################
### DESIGN CHANGES ###
######################
# panes
set -g pane-border-fg black
set -g pane-active-border-fg brightred
## Status bar design
# status line
Xft.antialias: true
Xft.hinting: true
Xft.rgba: rgb
Xft.hintstyle: hintfull
Xft.dpi: 220
URxvt.depth: 32
URxvt.buffered: True
URxvt.tabbed.autohide: yes

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@blark
blark / wincore-cygwin
Last active May 18, 2017 04:44 — forked from abelboldu/wincore-cygwin
install cygwin in HyperV/windows server core from powershell cmd to enable sshd
echo Enabling firewall rule...
netsh advfirewall firewall add rule name="SSHd" dir=in action=allow protocol=TCP localport=22
echo Downloading cygwin installer...
$client = new-object System.Net.WebClient
$client.DownloadFile( "https://www.cygwin.com/setup-x86_64.exe", "c:\windows\temp\setup-x86_64.exe" )
.\Windows\Temp\setup-x86_64.exe
@blark
blark / PowerView-2.0-tricks.ps1
Created June 15, 2017 21:25 — forked from HarmJ0y/PowerView-2.0-tricks.ps1
PowerView-2.0 tips and tricks
# 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
Get-NetLocalGroup -Recurse SERVER.domain.local
# retrieve all the computers a GPP password applies to