Skip to content

Instantly share code, notes, and snippets.

View tankmek's full-sized avatar
🏠
Working from home

Michael Edie tankmek

🏠
Working from home
View GitHub Profile
@tankmek
tankmek / jtrinstall.sh
Created December 27, 2017 02:16 — forked from goffinet/jtrinstall.sh
John the Ripper 1.8.0 Installation for Centos 7
#!/bin/bash
# Centos 7 John the Ripper Installation
yum -y install wget gpgme
yum -y group install "Development Tools"
cd
wget http://www.openwall.com/john/j/john-1.8.0.tar.xz
wget http://www.openwall.com/john/j/john-1.8.0.tar.xz.sign
wget http://www.openwall.com/signatures/openwall-signatures.asc
gpg --import openwall-signatures.asc
gpg --verify john-1.8.0.tar.xz.sign
@tankmek
tankmek / VSCMDLine.txt
Created December 27, 2017 17:01
Visual Studio Dev Environment for Exploits
#PreRequisites
##
## You will need about 15-20GB of free disk space
##
1. Download Visual Studio Community Edition
https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=Community&rel=15
2. Check the boxes for the following workloads:
[X] Universal Windows Platform Development
@tankmek
tankmek / UpgradeShell2TTY
Created January 7, 2018 15:36
allows you to use history and tab completion.
python -c 'import pty; pty.spawn("/bin/bash")'
CTRL-Z
$ stty -a (grab rows/columns)
$ fg
$ stty raw -echo
$ reset
$ export SHELL=bash
$ export TERM=xterm-256color
$ stty rows 94 columns 189
@tankmek
tankmek / CiscoIOSUpgrade
Last active January 21, 2018 16:19
I have a 3560G switch that came with IOS 12.2(25)SEB4 (c3560-ipservicesk9-mz.122-25.SEB4.bin).
show version
show flash:
copy tftp: flash:
show flash:
verify /md5 flash:c3560-ipservicesk9-mz.150-2.SE11.bin
show boot
configure terminal
boot system flash:c3560-ipservicesk9-mz.150-2.SE11.bin
exit
show boot
@tankmek
tankmek / qmail_freebsd.md
Created February 15, 2018 19:16
Notes for installing qmail + vpopmail in a freebsd jail.

*** DRAFT **** DRAFT *****

[Install ezjail]

ezjail-admin create mail 'lo2|127.0.0.3,bge0|xx.xx.33.90'
echo 'cloned_interfaces="lo2"' >>/etc/rc.conf
service netif cloneup
@tankmek
tankmek / Server2012
Created March 1, 2018 02:09
Snippets for managing a windows DC
# Settings up external NTP on DC
w32tm /query /source # If you get CMOS continue
net stop w32time
w32tm /config /syncfromflags:manual /manualpeerlist:”pool.ntp.org,0x1”
# Make your PDC a reliable time source for the clients.
w32tm /config /reliable:yes
net start w32time
# Wait a few minutes and it should update
w32tm /query /source # Validate
@tankmek
tankmek / sshd_config
Created June 3, 2018 20:50
More secure key exchange algorithms, ciphers and message authentication codes. Less secure choices are disabled. MITM could enable weak choices if not disabled.
## Better SSH Security
# @c0demech // Michael Edie
# If using the following key exchange protocol:
# diffie-hellman-group-exchange-sha256: Custom DH with SHA2
# run the following:
# ssh-keygen -G /tmp/moduli -b 4096
# ssh-keygen -T /etc/ssh/moduli -f /tmp/moduli
# Generate rsa key with:
# ssh-keygen -t rsa -b 4096 -f ssh_host_rsa_key < /dev/null
@tankmek
tankmek / ssh_config
Created June 3, 2018 20:55
More secure key exchange algorithms, ciphers and message authentication codes. Less secure choices are disabled. MITM could enable weak choices if not disabled.
# Manpage excerpt:
# Since the first obtained value for each parameter is used, more host-specific
# declarations should be given near the beginning of the file, and general defaults at the end.
Host *
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-ripemd160-etm@openssh.com,umac-128-etm@openssh.com
KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
@tankmek
tankmek / Slackware-LUKS-LVM
Created August 20, 2018 02:40
Notes on setting up LUKS/LVM before Slackware install.
# Create 100MB boot partition (Linux)
# Make the rest of the space one unit not bootable
## Make cryptanalysis harder
dd if=/dev/urandom of=/dev/sda2
# Setup luks container
#cryptsetup --verbose --cipher aes-xts-plain64:sha512 --key-size 512 --hash sha512 --iter-time 5000 luksFormat
cryptsetup -s 256 -y luksFormat /dev/sdx2
cryptsetup luksOpen /dev/sdx2 slackcrypt
# create physical volume
pvcreate /dev/mapper/slackcrypt
@tankmek
tankmek / kali-rolling-update
Created August 21, 2018 10:30
Quick reference for kali things
download OVA
apt update && apt -y full-upgrade
reboot
apt -y --reinstall install open-vm-tools-desktop fuse (If new kernel version)
reboot
# When key expires
wget -q -O - https://archive.kali.org/archive-key.asc | apt-key add