Skip to content

Instantly share code, notes, and snippets.

@suuhm
suuhm / msgapi_get_aad_sentinel.py
Last active June 26, 2024 08:24
Microsoft GraphAPI - Get Azure Ad Users and Sentinel Incidents
# -*- coding: utf-8 -*-
#
# Microsoft GraphAPI
# ------------------
# Get Azure Ad Users and Sentinel Incidents
#
# v0.1 - (C) 2024 by suuhm
#
@suuhm
suuhm / udp_punch-out.sh
Created May 31, 2024 16:09
UDP Hole Punching PoC for bash
#!/bin/bash
#
# UDP PUNCH-OUT! UDP-HOLE PUNCHING
# ---------------------------------
#
# local send: From: 1.1.1.1:13337 -> remote-ip:RANDOM
# remote send: From: remote-ip:RANDOM -> 1.1.1.1:13337
#
_use_udp_hp()
@suuhm
suuhm / ftp_av_scanner.sh
Last active April 19, 2024 09:19
FTP Download , Extracting files and Antivirus scan on linux
#!/bin/bash
#
# "========================="
# "FTP Directory Downloader "
# " ----------------------- "
# " Xtrtact & AV scanning "
# " ----------------------- "
# " (c) 2024 by suuhmer "
# "========================="
@suuhm
suuhm / get_ad_cert_infos.a.ps1
Last active April 12, 2024 14:28
Get Windows Active Directory and Certificate Information (powershell / batch versions)
# Requires the Active Directory module
Import-Module ActiveDirectory
Write-Host "************************************"
Write-Host "* Get Active Directory Information *"
Write-Host "* (C) 204 By suuhmer *"
Write-Host "************************************"
Write-Host ""
# List users
@suuhm
suuhm / win_fix_0x80073701.bat
Last active June 6, 2024 13:32
Windows Update fails with error code 0x80073701 fix - win 10 window server 2016-2019 etc.
@echo off
echo Get CBS.logs (sfc /scannow)
echo\
set "logPath=C:\Windows\Logs\CBS\CBS.log"
set "searchString=Failed to pin deployment while resolving Update"
for /f "tokens=*" %%a in ('findstr /c:"%searchString%" "%logPath%"') do (
set "errorLine=%%a"
)
@suuhm
suuhm / win_424_proxy.bat
Created February 20, 2024 08:29
Windows Setup Portforwarding 4to4 Proxy Tunnel
@echo off
SETLOCAL ENABLEEXTENSIONS
REM 424_tunnel script (c) 2024 suuhm
REM netsh interface ipv4 set interface "Ethernet" forwarding=enabled
REM netsh interface portproxy add v4tov4 listenaddress=lokal_IP listenport=9999 connectaddress=target_IP connectport=80
REM netsh interface portproxy show all
@suuhm
suuhm / hashcat_md5_crack.sh
Created February 7, 2024 00:19
Extract md5 hashes in text and use hashcat to crack with mask attack
#!/bin/bash
# hashes only:
#grep -Eo "\b[a-f0-9]{32}\b" hashes.txt > md5-hashes.txt
# Mails:Hashes extract from your textfile:
sed -nE "s/.*'([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})'.*'([a-f0-9]{32})'.*/\1:\2/p" your_text_file.txt > mail-md5.txt
# Crack hashes with usernames:
hashcat -a0 -m0 --username --potfile-path mail_md5.potfile mail-md5.txt /usr/share/wordlists/rockyou.txt.gz
@suuhm
suuhm / WLMS-Disabler.bat
Last active January 18, 2024 20:27
WLMS-Disabler : Disable and prevent the forced Shutdown on not licensed Windows Server and Client , Win 8 to win 11 , Server 2022 supported / https://github.com/suuhm/Powershell-Scripts-Collection
@echo off
SET mypath=%~dp0
echo %mypath:~0,-1%
pushd %~dp0
echo\
REM popd
REM !!! YOU NEED PSEXEC !!!
REM DOWNLOAD zip package incl psexec:
@suuhm
suuhm / virtualenv_pip_python.sh
Created January 9, 2024 16:13
PIP update / set virtual enviroment and get requierement.txt and install it
# PIP / VIRTUALENV
# ----------------
python -m pip install --upgrade pip || \
#
apt update && \
apt install python-pip python3-pip python3-virtualenv
# OLD: ( pip install virualenv )
virtualenv [--python=python3] project-XYZ
cd project-XYZ ; source bin/activate
#
@suuhm
suuhm / setup_openwrt_lxc_container_proxmox.sh
Last active September 8, 2024 20:01
Setup OpenWrt 23.05 LXC Container in Proxmox - Updated Version: 2024
#!/bin/bash
# Setting Up OpenWRT on a Virtual Machine with Proxmox
# Based on: https://community.bigbeartechworld.com/t/setting-up-openwrt-on-a-virtual-machine-with-proxmox/257
# Set your wished version:
export VER="23.05"
export ARCH="amd64"
export INDEX_URL="https://images.linuxcontainers.org/images/openwrt/$VER/$ARCH/default"
#export BUILDDATE=$(date -d "yesterday" '+%Y%m%d')