Skip to content

Instantly share code, notes, and snippets.

@tanaka-geek
tanaka-geek / script.py
Last active May 14, 2021 06:03
checks if /_vti_bin/_vti_aut/author.dll exists on the website. it's just a script that I wrote for fun
#!/usr/bin/python3
import requests
import re
rhost=''
if len(rhost) == 0:
print("Specify IP in rhost @line 6")
exit
@tanaka-geek
tanaka-geek / getclsid.ps1
Created August 22, 2020 09:44
get clsid for Juicy Potato - Copy Script from Ohpe Juciy Potato Project
<#
This script extracts CLSIDs and AppIDs related to LocalService.DESCRIPTION
Then exports to CSV
#>
$ErrorActionPreference = "Stop"
# Importing some requirements
. .\utils\Join-Object.ps1
@tanaka-geek
tanaka-geek / bruteforce.py
Last active August 30, 2020 07:38
Simple Password Brute Force Script.py
import requests
import sys
#POST FORM password brute force script
#Requirements are @location, @bad_chars, @df and hf for data and headers respectively
#
# The flow of program is 1 Do you have valid connection? check_connection()
# 2 Open each file of usernames, passwords to brute force with
# 3 Brute Foce brute_force()
@tanaka-geek
tanaka-geek / bufferoverflow-template.py
Last active May 9, 2021 13:18
OSCP Buffer Overflow Template Script
#!/usr/bin/python3
import socket
host = "127.0.0.1"
port = 1337
overflow = 'A' * 64
eip = ''
paddings = ''
@tanaka-geek
tanaka-geek / krb5tgs_parse.sh
Created January 31, 2021 22:12
Copy the resultant of "Invoke_Kerberoast.ps1" to $1.txt and it will parse the text into crackable form for hashcat -a 0 -m 13100
#!/bin/bash
if [ $# -eq 0 ]
then
echo "Usage: ./tgsparse.sh hash.txt"
exit
fi
cat $1 | tr -d ' ' | grep -vP '(SamAccountName|DistinguishedName|ServicePrincipalName|TicketByteHexStream)' | grep -a -e '[^\ ]\{16,\}' | tr -d '\n' | sed -z 's/Hash:/\n\n/g' > "$1.parsed"
@tanaka-geek
tanaka-geek / ssh-mass-checker.sh
Last active March 26, 2022 17:38
sshpass and sudo afterward, sed motd and restart the service
#!/bin/bash
SUDO_PWD="passwd"
ROOT_USER="user"
SERVER="$1"
if [ $# -eq 0 ]
then
echo "Usage: ./checkssh.sh 192.168.181.1"
exit
@tanaka-geek
tanaka-geek / badchars.py
Last active May 15, 2021 12:27
badchar list for python
"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
@tanaka-geek
tanaka-geek / offset-finder.sh
Created February 24, 2021 19:47
This is for 32bits based offset detection with msf-pattern_offset -q ""
#!/bin/bash
if [ $# -eq 0 ]
then
echo "No arguments supplied"
exit 1
fi
w=$1
@tanaka-geek
tanaka-geek / win7-vm-activate.cmd
Last active March 3, 2022 05:32
Windows 7 Enterprise Activation : fixed the path that wmic can't be found
@echo off
cd /d %windir%\system32&cscript //nologo slmgr.vbs /upk >nul&cscript //nologo slmgr.vbs /cpky >nul&C:\Windows\System32\wbem\wmic os | findstr /I "enterprise" >nul
if %errorlevel% EQU 0 (cscript //nologo slmgr.vbs /ipk 33PXH-7Y6KF-2VJC9-XBBR8-HVTHH >nul&cscript //nologo slmgr.vbs /ipk YDRBP-3D83W-TY26F-D46B2-XCKRJ >nul&cscript //nologo slmgr.vbs /ipk C29WB-22CC8-VJ326-GHFJW-H9DH4 >nul) else (cscript //nologo slmgr.vbs /ipk FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4 >nul&cscript //nologo slmgr.vbs /ipk MRPKT-YTG23-K7D7T-X2JMM-QY7MG >nul&cscript //nologo slmgr.vbs /ipk W82YF-2Q76Y-63HXB-FGJG9-GF7QX >nul)
set i=1
:server
if %i%==1 set KMS_Sev=kms7.MSGuides.com
if %i%==2 set KMS_Sev=kms8.MSGuides.com
if %i%==3 set KMS_Sev=kms9.MSGuides.com
if %i%==4 goto unsupported
cscript //nologo slmgr.vbs /skms %KMS_Sev% >nul&echo.&echo.
@tanaka-geek
tanaka-geek / bof-template.py
Last active March 10, 2021 07:40
Template of python script for bufferoverflow
import socket, time, sys
ip = "192.168.1.1"
port = 1024
prefix = ""
offset = 1000
overflow = "A" * offset
retn = "" # EIP
padding = ""
payload = ""