Skip to content

Instantly share code, notes, and snippets.

@Erreinion
Erreinion / Kali Linux xrdp on AWS.txt
Created January 12, 2017 11:06
Setting up xrdp on Kali Linux 2016.2 on AWS
Setting up xrdp on Kali Linux 2016.2 on AWS
AWS has an AMI for Kali 2016.2, but being remote, you need VNC or RDP to access the graphical tools.
VNC is easy to set up but very restrictive. RDP is harder to set up, but easier to use. These are the instructions I use to set up xrdp.
I use this config so that I connect to the Kali VM through an Apache Guacamole RDP proxy. This keeps Kali behind the firewall and in my pentesting lab. Guacamole also allows me to access the Kali box on SSH or RDP via a web interface from anywhere and any device.
OS: Kali Linux 2016.2
AMI: Updated 19 Oct 2016
@Erreinion
Erreinion / HTMLClipboard.py
Last active November 24, 2023 22:35
HTMLClipboard with updates for Python 3. Includes exception handling for locked clipboard. Improvement of: http://code.activestate.com/recipes/474121/
"""
Created on Sep 24, 2013
@author: RandomHardcoreJerks
Requires pywin32
original: http://code.activestate.com/recipes/474121/
# HtmlClipboard
@Erreinion
Erreinion / ldap_query_users.ps1
Created March 10, 2015 21:07
Powershell script to query LDAP (AD) for users. Accomplished without the ActiveDirectory plug-in from Quest.
# LDAP Query
# Look for all people. Excludes the DISABLED OU
$Searcher = New-Object DirectoryServices.DirectorySearcher
$Searcher.SearchRoot = 'LDAP://CN=Users,DC=example,DC=com'
$Searcher.Filter = '(&(objectCategory=person))'
$res = $Searcher.FindAll() | Sort-Object path
foreach ($usrTmp in $res)
{
@Erreinion
Erreinion / phishing.txt
Last active August 2, 2022 02:03
Phishing Workshop
Free security aweareness material
https://free.thesecurityawarenesscompany.com/
Free Phishing Tools:
https://getgophish.com/
https://github.com/trustedsec/social-engineer-toolkit/
https://github.com/pentestgeek/phishing-frenzy
https://github.com/securestate/king-phisher
https://github.com/tatanus/SPF
https://phishme.com/pm-free
@Erreinion
Erreinion / Roll20_macros.md
Last active May 15, 2019 12:41
Roll20 macros

Roll20 D&D 5e Macros

I run Roll20 D&D 5e games in a hybrid online/in-person scenario. This means that I'm running a small 13" screen so that I do not have so much of a physical barrier between me and my players who are physically present.

My challenge has been to manage all the multiple windows required to run encounters. Specifically, all the monster ("mob") character sheets. I read the sheets beforehand, but I need something that I can easily access and trigger no matter how many different kinds of mobs are in the encounter. More than 3 character sheets is too much.

My solution is to call the different sections of the character sheets from macros and display them in chat. I also have a macro to quickly roll for checks.

The annoying bit is that the macros have to work for every mob, and mobs can have different numbers of traits and actions. And macros do not have the notion of an iterator to be able to only call those traits/actions that exist. That means there needs to be error-handling for when a mac

Verifying my Blockstack ID is secured with the address 1E459j1HagdfPdEuCkbrxvez7b2Vo6wvys https://explorer.blockstack.org/address/1E459j1HagdfPdEuCkbrxvez7b2Vo6wvys
@Erreinion
Erreinion / Hping3 Packet Grenade
Last active October 30, 2017 07:31
Firewall testing script using hping3
# Packet Grenade
# Feb 13, 2015
# Lists of targets
set pinglist [list www.google.com www.facebook.com]
set httplist [list www.google.com www.facebook.com]
set httpslist [list www.google.com www.facebook.com]
set ftplist [list]
set sshlist [list alt.org thebes.openshells.net]
@Erreinion
Erreinion / daemon.py
Created March 14, 2017 13:57 — forked from josephernest/daemon.py
Daemon for Python
# From "A simple unix/linux daemon in Python" by Sander Marechal
# See http://stackoverflow.com/a/473702/1422096
#
# Modified to add quit() that allows to run some code before closing the daemon
# See http://stackoverflow.com/a/40423758/1422096
#
# Joseph Ernest, 2016/11/12
import sys, os, time, atexit
from signal import signal, SIGTERM
#Exchange 2010
Set-CASMailbox -Identity <user> -OwaEnabled $false
Set-CASMailbox -Identity <user> -EwsEnabled $false
Set-CASMailbox -Identity <user> -EcpEnabled $false
Set-CASMailbox -Identity <user> -MapiEnabled $false
Set-CASMailbox -Identity <user> -MapiBlockOutlookRpcHttp $true
Set-CASMailbox -Identity <user> -EwsAllowOutlook $false
@Erreinion
Erreinion / gist:6147743
Last active December 20, 2015 14:38
Example of 'private' function in Python. _ = don't expose, __ = hide. http://stackoverflow.com/a/70900/1060378
class Foo(object):
def __init__(self):
self.__baz = 42
def foo(self):
print self.__baz
class Bar(Foo):
def __init__(self):
super(Bar, self).__init__()
self.__baz = 21