Skip to content

Instantly share code, notes, and snippets.

View akhil-reni's full-sized avatar
👋
sup?

Akhil Reni akhil-reni

👋
sup?
View GitHub Profile
version: "3.7"
services:
redis:
image: redis:latest
container_name: superset_cache
restart: unless-stopped
volumes:
- redis:/data
db:
@akhil-reni
akhil-reni / office_enum.py
Created September 14, 2022 06:10
User enumeration for O365 users
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import logging
from ipaddress import IPv4Address
from random import getrandbits
import requests
logger = logging.getLogger()
from strobes_intel_client.main import client
response = client("CVE-2019-11477")
print(response.zeroday)
pip install strobes-intel-client
@akhil-reni
akhil-reni / parse_mvn_log4j.py
Last active December 12, 2021 11:19
Parse MVN dependency for Log4j2
from xml.etree import ElementTree
import re
from packaging import version
pattern = "\{(.*?)\}"
def stripNs(el):
if el.tag.startswith("{"):
el.tag = el.tag.split('}', 1)[1] # strip namespace
@akhil-reni
akhil-reni / enumerate.py
Created November 11, 2021 05:58
Domain enumeration for Azure
from urllib.request import urlopen, Request
import xml.etree.ElementTree as ET
domain = input("Enter your target: \n")
body = """<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:exm="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:ext="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<a:Action soap:mustUnderstand="1">http://schemas.microsoft.com/exchange/2010/Autodiscover/Autodiscover/GetFederationInformation</a:Action>
<a:To soap:mustUnderstand="1">https://autodiscover-s.outlook.com/autodiscover/autodiscover.svc</a:To>
@akhil-reni
akhil-reni / gcelery.py
Created October 28, 2021 04:41
Making Django ORM Gevent safe inside celery
from gevent import monkey
from psycogreen.gevent import patch_psycopg
monkey.patch_all(httplib=False)
patch_psycopg()
import mainApp.celery
from mainApp.celery import app
@akhil-reni
akhil-reni / gist:bec9900d8d3607598301aa82136c0cd3
Created September 17, 2021 12:14
Fargate ECS metadata response
{
"Cluster": "arn:aws:ecs:ap-south-1:redacted:cluster/temp",
"TaskARN": "arn:aws:ecs:ap-south-1:redacted:task/temp/ae92c046a2c348d888897f8a85da9bec",
"Family": "nginx",
"Revision": "13",
"DesiredStatus": "RUNNING",
"KnownStatus": "RUNNING",
"Containers": [
{
"DockerId": "ae92c046a2c348d888897f8a85da9bec-2531612879",
from mainAPI.models import Organization, OrganizationMember, User, Asset, Bug, CWE, CVE, Package, Mobile, Web, Code, Port, Cloud, Endpoint, Network, AssetHealth, Team, Permissions
import numpy as np
import random
import pandas as pd
import os
class Dummy:
def __init__(self):
self.create_organization()
@akhil-reni
akhil-reni / check_cve.py
Last active July 5, 2020 11:32
Check CVE-2020-5902 on a list of IPs
import requests
import logging
from concurrent.futures import ThreadPoolExecutor
import asyncio
from urllib3.exceptions import InsecureRequestWarning
# Suppress only the single warning from urllib3 needed.
requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning)