Skip to content

Instantly share code, notes, and snippets.

@xaitax
xaitax / mitmsslstrip2.sh
Last active Jan 30, 2021
MitM combined with SSLStrip2 defeating HSTS
View mitmsslstrip2.sh
#!/bin/bash
#
# @desc: MitM (Ettercap) & SSLStrip2 & dns2proxy
#
# Tool runs if sslstrip2 & dns2proxy have subfolders from
# where the script is run
#
# @required:
#
# - SSLStrip2 (https://github.com/LeonardoNve/sslstrip2)
@xaitax
xaitax / vmware_kernel_update.sh
Last active Nov 23, 2020
Script to make the latest Linux Kernel work with VMWare Workstation
View vmware_kernel_update.sh
#!/bin/bash
## Script to make the latest Linux Kernel work with VMWare Workstation
## Automated since it was too annoying to run the commands after each Kernel update
## Tested with Linux Kernel 5.9.8 & VMWare Workstation 16.1.0
## Alexander Hagenah (@xaitax)
VERSION=16.1.0
wget https://github.com/mkubecek/vmware-host-modules/archive/workstation-${VERSION}.tar.gz
@xaitax
xaitax / default
Last active Jan 9, 2020
Nginx SSL/TLS + LetsEncrypt Configuration For "A+" Qualys SSL Labs Rating
View default
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name mysite.com www.mysite.com;
rewrite ^ https://$host$request_uri? permanent;
}
server {
listen 443 ssl default_server http2;
@xaitax
xaitax / fix_vmware_kernel_3.11.sh
Created Sep 3, 2013
Linux Kernel 3.11: With it comes a kernel-level API change related to VFS. Specifically, struct file_operations no longer contains the function pointer readdir and vfs_readdir() which was defined in fs/readdir.c is now gone. They are both superseded by iterate and iterate_dir() respectively. Linux Kernel 3.10: mnet/vmblock patch for Kernel 3.10 …
View fix_vmware_kernel_3.11.sh
cd /tmp
curl -O http://www.primepage.de/stuff/vmware/vmblock-9.0.2-5.0.2-3.10.patch
curl -O http://www.primepage.de/stuff/vmware/vmnet-9.0.2-5.0.2-3.10.patch
curl -O http://www.primepage.de/stuff/vmware/vmblock.3.11.patch
cd /usr/lib/vmware/modules/source
tar -xvf vmblock.tar
tar -xvf vmnet.tar
patch -p0 -i /tmp/vmblock-9.0.2-5.0.2-3.10.patch
patch -p0 -i /tmp/vmnet-9.0.2-5.0.2-3.10.patch
cd vmblock-only
@xaitax
xaitax / Krack Attack (WPA2) Sample Code
Last active Mar 26, 2018
Krack Attack (WPA2) Sample Code
View Krack Attack (WPA2) Sample Code
#!/usr/bin/env python2
import logging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
from scapy.all import *
import sys, socket, struct, time, subprocess, atexit, select
from datetime import datetime
IEEE_TLV_TYPE_RSN = 48
IEEE_TLV_TYPE_FT = 55
@xaitax
xaitax / rbconfig.rb.diff
Created Jul 17, 2013
BackTrack 5 R3 Patch for Metasploit to work again
View rbconfig.rb.diff
root@bt:/opt/metasploit/ruby/lib/ruby/1.9.1/i686-linux# diff -Nur rbconfig.rb_old rbconfig.rb
--- rbconfig.rb_old 2013-04-14 19:58:02.394668232 +0400
+++ rbconfig.rb 2013-04-14 19:52:59.742676593 +0400
@@ -53,7 +53,7 @@
CONFIG["DLDLIBS"] = " -lc"
CONFIG["SOLIBS"] = ""
CONFIG["LIBRUBYARG_SHARED"] = "-Wl,-R -Wl,$(libdir) -L$(libdir) "
- CONFIG["LIBRUBYARG_STATIC"] = "-Wl,-R -Wl,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)-static"
+ CONFIG["LIBRUBYARG_STATIC"] = "-Wl,-R -Wl,$(libdir) -L$(libdir) "
CONFIG["LIBRUBYARG"] = "$(LIBRUBYARG_STATIC)"
@xaitax
xaitax / x360tool.sh
Created Jul 15, 2013
x360tool is designed for anyone who wants to check your(!) XBOX 360 game ISO with abgx360 for validity and to burn your(!) XBOX 360 game ISO to a DL DVD.
View x360tool.sh
#!/bin/bash
#
# @desc: Check http://primepage.de/x360tool/
#
# @name: x360tool(.sh)
#
# @author: Alexander Hagenah <ah@primepage.de>
# http://primepage.de
#
# @created: 09/29/2009
@xaitax
xaitax / bgrab.sh
Last active Dec 19, 2015
bgrab is a bash-written script to scan single hosts or network ranges for webserver banners. Those banners will be highlighted with BEL or color if matches a pregiven array of strings. It just makes use of `netcat' and includes logging functionalities. It was designed to scan for CVE-2013-2028 (nginx stack-based buffer overflow) vulnerability.
View bgrab.sh
#!/bin/bash
#
# @author: Alexander 'xaitax' Hagenah <ah@primepage.de>
# http://primepage.de
#
# @desc: HTTP Banner Grabber + Highlighting
#
# @created: 05/14/2013
#
@xaitax
xaitax / fix_vmware_3.10.sh
Created Jul 15, 2013
mnet/vmblock patch for Kernel 3.10 caused by create_proc_entry() removal in favor of proc_create().
View fix_vmware_3.10.sh
#!/bin/bash
cd /tmp
curl -O http://primepage.de/stuff/vmware/vmblock-9.0.2-5.0.2-3.10.patch
curl -O http://primepage.de/stuff/vmware/vmnet-9.0.2-5.0.2-3.10.patch
cd /usr/lib/vmware/modules/source
cp vmblock.tar vmblock_backup.tar
cp vmnet.tar vmnet_backup.tar
tar -xvf vmblock.tar
tar -xvf vmnet.tar
patch -p0 -i /tmp/vmblock-9.0.2-5.0.2-3.10.patch
View network jam
#!/usr/bin/env python
import logging
import sys
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
if len(sys.argv) != 5:
print ''
print 'arp.py Alexander Hagenah - ah@primepage.de'
print ''