Skip to content

Instantly share code, notes, and snippets.

Avatar

cetaSYN cetaSYN

View GitHub Profile
@cetaSYN
cetaSYN / zip_string_bruter.py
Created Oct 23, 2019
Use the output of the command `strings` as a wordlist to bruteforce a password-protected zip file
View zip_string_bruter.py
#!/usr/bin/env python3
import zipfile
import argparse
import subprocess
parser = argparse.ArgumentParser()
parser.add_argument('target')
parser.add_argument('stringsfile')
parser.add_argument('output')
args = parser.parse_args()
@cetaSYN
cetaSYN / quic_rx.py
Created Dec 2, 2019
Exfils data while masquerading as Google's QUIC protocol.
View quic_rx.py
#!/usr/bin/env python3
"""
File Name: quic_rx.py
Author: cetaSYN
Created Date: 4 May 18
Revised Date: 9 May 18
Recieves data from quic_tx.py, masqueraded as Google's QUIC protocol.
"""
@cetaSYN
cetaSYN / termite.py
Created Dec 2, 2019
Overwrites matching logs in a single read/write pass while maintaining date and aliasing some log-reading tools
View termite.py
#!/usr/bin/env python
'''
File Name: termite.py
Author: cetaSYN
Created Date: 20 Apr 18
Python Version: 2.7
Matches logs using regular expressions then overwrites the matching lines.
Overwrite operation occurs in same pass as read, and overwrites with \x00
@cetaSYN
cetaSYN / mdns_comm.py
Last active Jan 25, 2020
Communicate between subnets by leveraging mDNS DNS-SD TXT records and mDNS reflection
View mdns_comm.py
#!/usr/bin/env python3
__author__ = 'cetaSYN'
import argparse
import queue
import signal
import socket
import sys
import threading
@cetaSYN
cetaSYN / dorm_pad.py
Last active Feb 4, 2020
SANS Holiday Hack 2019 Dormitory Keypad Solver
View dorm_pad.py
# SANS Holiday Hack 2019 Dormitory Keypad Solver
from itertools import product
# https://stackoverflow.com/questions/46841968/fastest-way-of-testing-if-a-number-is-prime-with-python
def is_prime(n):
if n & 1 == 0:
return False
d= 3
while d * d <= n:
@cetaSYN
cetaSYN / password_spray.py
Last active Feb 4, 2020
SANS Holiday Hack 2019 Objective 3 - Password Spray
View password_spray.py
# SANS Holiday Hack 2019 Objective 3 - Password Spray
# Dependency: python-evtx
import Evtx.Evtx as evtx
import Evtx.Views as e_views
import re
target_fields = ['EventID','TimeCreated','Computer','LogonType','TargetUserName','IpAddress']
output = []
with evtx.Evtx('Security.evtx') as log:
@cetaSYN
cetaSYN / lsass.py
Created Jan 7, 2020
SANS Holiday Hack 2019 Objective 4 - Determine Technique
View lsass.py
#!/usr/bin/env python3
# SANS Holiday Hack 2019 Objective 4 - Determine Technique
import json
from datetime import datetime, timedelta
def pprint(s):
return json.dumps(json.loads(str(s).replace('"', '\\"').replace("'", '"')), indent=2)
@cetaSYN
cetaSYN / find_port.py
Created Jan 8, 2020
SANS Holiday Hack 2019 Objective 5 - Determine Compromised System
View find_port.py
#!/use/bin/env python3
# SANS Holiday Hack 2019 Objective 5 - Determine Compromised System
import dateutil.parser
from datetime import timedelta, datetime
from os import listdir
from os.path import isfile, join
import pprint
@cetaSYN
cetaSYN / dead_birds.py
Created Mar 9, 2020
Displays all users you follow that have not had activity (tweet/rt) within a specified number of days, sorted by least-recent.
View dead_birds.py
#!/usr/bin/env python3
import datetime
import tweepy
def main():
# https://developer.twitter.com/en/apply-for-access
consumer_key = "<add>"
consumer_secret = "<add>"
@cetaSYN
cetaSYN / allcast_cli.py
Created Dec 2, 2019
Casts a YouTube video to multiple Google Cast devices within a multicast domain.
View allcast_cli.py
#!/usr/bin/env python3
####################################################################################
# allcast_cli.py #
# Casts a specified YouTube video to Google Cast devices within a subdomain. [CLI] #
####################################################################################
from zeroconf import ServiceBrowser, Zeroconf
from time import sleep
from argparse import ArgumentParser