Skip to content

Instantly share code, notes, and snippets.

@th3gundy
th3gundy / expose.sh
Created September 20, 2022 14:33 — forked from Shawyeok/expose.sh
Expose docker container port to specific IP addresses only
# For example, I have a redis container, I want it only serve for specific IP addresses: 172.31.101.37, 172.31.101.38
$ docker run -d -p 6379:6379 redis:2.8
# After start redis container, the iptables looks like this:
$ iptables -t filter -nL
Chain DOCKER (1 references)
target prot opt source destination
ACCEPT tcp -- 0.0.0.0/0 172.17.0.2 tcp dpt:6379
# Get the IP address of redis container
@th3gundy
th3gundy / main.py
Created August 5, 2022 15:27 — forked from usualsuspect/main.py
Undentified Python bot
import subprocess, socketio
from enum import Enum
import requests
from time import sleep
from PIL import ImageGrab
import os
from datetime import datetime, timedelta
from pynput.keyboard import Listener
allowed_methods = {
'get','post','put','options','delete','patch','head'}
@th3gundy
th3gundy / change_vmid.sh
Created April 20, 2022 12:46
Proxmox change virtual machine ID
oldVMID=111
newVMID=999
# change node name with yours
sed -i "s/$oldVMID/$newVMID/g" /etc/pve/nodes/security/qemu-server/$oldVMID.conf
mv /etc/pve/nodes/security/qemu-server/$oldVMID.conf /etc/pve/nodes/security/qemu-server/$newVMID.conf
mv /vm-storage/images/$oldVMID/ /vm-storage/images/$newVMID/
cd /vm-storage/images/$newVMID/
ls
@th3gundy
th3gundy / windows_hardening.cmd
Created May 14, 2020 16:24 — forked from mackwage/windows_hardening.cmd
Script to perform some hardening of Windows OS
:: Windows 10 Hardening Script
:: This is based mostly on my own personal research and testing. My objective is to secure/harden Windows 10 as much as possible while not impacting usability at all. (Think being able to run on this computer's of family members so secure them but not increase the chances of them having to call you to troubleshoot something related to it later on). References for virtually all settings can be found at the bottom. Just before the references section, you will always find several security settings commented out as they could lead to compatibility issues in common consumer setups but they're worth considering.
:: Obligatory 'views are my own'. :)
:: Thank you @jaredhaight for the Win Firewall config recommendations!
:: Thank you @ricardojba for the DLL Safe Order Search reg key!
:: Thank you @jessicaknotts for the help on testing Exploit Guard configs and checking privacy settings!
:: Best script I've found for Debloating Windows 10: https://github.com/Sycnex/Windows10Debloater
:
@th3gundy
th3gundy / c99-nl.py
Created April 6, 2020 07:08 — forked from si9int/c99-nl.py
Automates https://subdomainfinder.c99.nl | Usage: python3 c99-nl.py <domain.com> | Requirements: pip3 install bs4
#!/usr/bin/env python3
# v.0.2 | twitter.com/si9int
import requests, sys
from bs4 import BeautifulSoup as bs
domain = sys.argv[1]
subdomains = []
def get_csrf_params():
csrf_params = {}
@th3gundy
th3gundy / CVE-2020-8515.go
Created March 30, 2020 10:24 — forked from 0xsha/CVE-2020-8515.go
CVE-2020-8515: DrayTek pre-auth remote root RCE
package main
/*
CVE-2020-8515: DrayTek pre-auth remote root RCE
Mon Mar 30 2020 - 0xsha.io
Affected:
@th3gundy
th3gundy / ssl-check.py
Last active April 15, 2022 19:51 — forked from gdamjan/ssl-check.py
Python script to check on SSL certificates
# -*- encoding: utf-8 -*-
# requires a recent enough python with idna support in socket
# pyopenssl, cryptography and idna
from OpenSSL import SSL
from cryptography import x509
from cryptography.x509.oid import NameOID
import idna
from socket import socket
@th3gundy
th3gundy / web-servers.md
Created January 18, 2020 09:13 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@th3gundy
th3gundy / scanio.sh
Last active December 20, 2019 12:04 — forked from haccer/scanio.sh
PoC script to mass-locate vulnerable subdomains using results from Rapid7's Project Sonar
#!/bin/bash
# Usage : ./scanio.sh <save file>
# Example: ./scanio.sh cname_list.txt
# Premium
function ech() {
spinner=( "|" "/" "-" "\\" )
while true; do
for i in ${spinner[@]}; do
echo -ne "\r[$i] $1"
@th3gundy
th3gundy / cve-2019-6340.py
Created February 25, 2019 06:58 — forked from leonjza/cve-2019-6340.py
CVE-2019-6340
#!/usr/bin/env python3
# CVE-2019-6340 Drupal <= 8.6.9 REST services RCE PoC
# 2019 @leonjza
# Technical details for this exploit is available at:
# https://www.drupal.org/sa-core-2019-003
# https://www.ambionics.io/blog/drupal8-rce
# https://twitter.com/jcran/status/1099206271901798400