Skip to content

Instantly share code, notes, and snippets.

View cetaSYN's full-sized avatar

cetaSYN cetaSYN

View GitHub Profile
@cetaSYN
cetaSYN / zip_string_bruter.py
Created October 23, 2019 23:15
Use the output of the command `strings` as a wordlist to bruteforce a password-protected zip file
#!/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 December 2, 2019 03:11
Exfils data while masquerading as Google's QUIC protocol.
#!/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 December 2, 2019 03:16
Overwrites matching logs in a single read/write pass while maintaining date and aliasing some log-reading tools
#!/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 January 25, 2020 18:34
Communicate between subnets by leveraging mDNS DNS-SD TXT records and mDNS reflection
#!/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 February 4, 2020 17:38
SANS Holiday Hack 2019 Dormitory Keypad Solver
# 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 February 4, 2020 17:38
SANS Holiday Hack 2019 Objective 3 - Password Spray
# 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 January 7, 2020 04:35
SANS Holiday Hack 2019 Objective 4 - Determine Technique
#!/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 January 8, 2020 03:51
SANS Holiday Hack 2019 Objective 5 - Determine Compromised System
#!/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 March 9, 2020 00:51
Displays all users you follow that have not had activity (tweet/rt) within a specified number of days, sorted by least-recent.
#!/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 December 2, 2019 02:55
Casts a YouTube video to multiple Google Cast devices within a multicast domain.
#!/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