Skip to content

Instantly share code, notes, and snippets.

View DavidBuchanan314's full-sized avatar
🌍
Hack the planet!

David Buchanan DavidBuchanan314

🌍
Hack the planet!
View GitHub Profile
@doughgle
doughgle / gist:e3a8c350dbf2370e69212f8b91fa4c88
Created November 20, 2017 15:26
Linux kernel 4.14 patch to disguise TracerPid in /proc/*/status
commit acc0182c3d3869802bc20c8bf4e04c3464936bcc
Author: Douglas Hellinger <[email protected]>
Date: Sun Nov 19 22:48:46 2017 +0800
Fix tracerPid=0 in /proc
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 6f6fc16..bcf470d 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@kgsws
kgsws / sdbhax.js
Last active January 22, 2020 19:41
sc.killAutoHandle();
function c32to8(data)
{
var len = data.length;
var ret = new Uint8Array(len * 4);
var offs = 0;
for(i = 0; i < len; i++)
{
@kirbyUK
kirbyUK / 6502_instructions.json
Created October 17, 2017 15:24
6502 instruction set in JSON
[
{
"bytes" : "2",
"description" : "Add with Carry",
"name" : "ADC",
"opcode" : "$69",
"mode" : "Immediate"
},
{
"opcode" : "$65",
@zachriggle
zachriggle / win.py
Created September 1, 2017 20:35
Example Exploit for ROP Emporium's ret2win Challenge Raw
from pwn import *
# Set up pwntools to work with this binary
elf = context.binary = ELF('ret2win')
# Enable verbose logging so we can see exactly what is being sent.
context.log_level = 'debug'
# Print out the target address
info("%#x target", elf.symbols.ret2win)
@jsimmons
jsimmons / link_map.c
Last active February 26, 2023 08:22
Linking The Hard Way
@tinogomes
tinogomes / DNS_TO_LOCALHOST.markdown
Last active March 25, 2025 08:05
Public DNS Pointing to localhost (127.0.0.1)

Available Public Wildcard DNS Domains pointing to localhost (127.0.0.1)

The best way to safely and securely use local domains pointing to 127.0.0.1 is to edit your local settings (/etc/hosts) and add your own settings. Keep in mind if you want to use subdomains, you need to enter all variations.

Example:

# Adding bottom of your current file /etc/hosts
################# MY LOCAL DOMAINS
127.0.0.1 local.com admin.local.com
127.0.0.1 domain1.com
@xero
xero / defcon
Created July 27, 2017 15:46
defcon shell ansi art

 this one goes out to all the {cr,sl,h}ackers... https://defcon.org
  .β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„  .β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  .β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  .β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  .β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  .β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„ β–ˆβ–ˆβ–ˆ
 : β–‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„ : β–‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ : β–‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ : β–‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ : β–‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ : β–‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
 : β–’β–’β–‘β–ˆ β–€β–ˆβ–ˆβ–ˆβ–ˆ : β–’β–’β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„ : β–’β–’β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ   : β–’β–’β–‘β–ˆβ–ˆβ–ˆβ–ˆ β–€β–€ : β–’β–’β–‘β–ˆβ–€β–€β–ˆβ–ˆβ–ˆβ–ˆ : β–’β–’β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
 : β–“β–’β–’β–‘  β–ˆ β–ˆ : β–“β–’β–’β–‘
#!/usr/bin/python3
"""
IMPORTANT - READ BEFORE CONTINUING:
1. This tool is only intended to repair machines that have been infected and never turned back on again. i.e. NO ENCRYPTION HAS HAPPENED YET
2. You should make a full disk backup before continuing. I am not responsible if this makes things worse.
3. This tool does not repair part of NTLDR which is corrupted by the malware (The second sector of the NTFS partition), you will need a secondary tool to do this.
@justecorruptio
justecorruptio / gif.py
Created June 8, 2017 09:44
gif encoder inspired by /DavidBuchanan314/gif-enc
from struct import pack
from random import sample
dist = lambda a, b: (a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2 + (a[2] - b[2]) ** 2
nn = lambda rgb, centers: min((dist(rgb, c), i) for i, c in enumerate(centers))[1]
class GIF(object):
def __init__(self, data, size):
self.size = size
self.data = data
@rflaperuta
rflaperuta / user_agent_listing.txt
Created February 12, 2017 22:20
List of user Agents - 2017
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/602.3.12 (KHTML, like Gecko) Version/10.0.2 Safari/602.3.12
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0
Mozilla/5.0 (Windows NT 6.1; WOW64;