Skip to content

Instantly share code, notes, and snippets.

View darkarnium's full-sized avatar
💭
🔥

Peter darkarnium

💭
🔥
View GitHub Profile
@darkarnium
darkarnium / .config
Created February 10, 2018 17:28
MIPS BE - Qemu Debug Build
CONFIG_MODULES=y
CONFIG_HAVE_DOT_CONFIG=y
CONFIG_TARGET_malta=y
CONFIG_TARGET_malta_be=y
CONFIG_TARGET_malta_be_Default=y
CONFIG_HAS_SUBTARGETS=y
CONFIG_TARGET_BOARD="malta"
CONFIG_TARGET_ARCH_PACKAGES="malta_mips"
CONFIG_DEFAULT_TARGET_OPTIMIZATION="-Os -pipe -mno-branch-likely -mips32 -mtune=mips32"
CONFIG_CPU_TYPE="mips32"
@darkarnium
darkarnium / DataSourceVMware.py
Last active March 7, 2018 11:11
Rough implementation of a data-source which uses vSphere / VMware VMX guestinfo for cloud-init.
''' Provides a VMware VMX backed Data Source for Cloud-Init. '''
import yaml
from time import sleep
from base64 import b64decode
from subprocess import check_output
from subprocess import CalledProcessError
from cloudinit import log as logging
@darkarnium
darkarnium / lede-vdsl-bridge
Last active March 29, 2020 17:26
LEDE VDSL bridge for BT VDSL on VRX220
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config dsl 'dsl'
option annex 'b'
config interface 'xdsldp'
@darkarnium
darkarnium / lede-pppoe-dialer
Last active March 29, 2020 17:27
LEDE PPPoE dialer for BT VDSL on QCA8337
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option vid '1'
@darkarnium
darkarnium / NVRAMHammer.c
Last active March 17, 2019 13:43
NVRAM shim to allow certain embedded binaries to be used with QEMU - intended for use with LD_PRELOAD.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/file.h>
/* From acosTypes. */
#ifndef BOOL
#define BOOL int
#endif
@darkarnium
darkarnium / EnumerateIam.md
Last active May 19, 2024 20:31
A quick and VERY dirty IAM enumeration tool.

Enumerate IAM

The following code will attempt to enumerate operations that a given set of AWS AccessKeys can perform.

Usage

Usage: enumerate-iam.py [OPTIONS]

  IAM Account Enumerator.
@darkarnium
darkarnium / SpotFleets.md
Last active September 26, 2022 08:16
A quick and dirty AWS EC2 Spot Fleet requestor

SpotFleets

The following code will request an AWS SpotFleet with the specified parameters.

Credentials

By default credentials will be located using boto3's built-in enumeration mechanism. The easiest way to ensure that credentials are available is to either use environment variables, or ensure there is a ~/.aws/credentials file for the user running this script.

Required Code Changes

@darkarnium
darkarnium / idapy-cpp-demangle.py
Created January 23, 2017 01:18
A trivial IDAPy script to dump and demangle all C++ functions
import idautils
for mangled in idautils.Functions():
demangled = idc.Demangle(
str(idaapi.get_func_name(mangled)),
idc.GetLongPrm(idc.INF_SHORT_DN)
)
if demangled is not None:
print "{} => {}".format(mangled, demangled)
@darkarnium
darkarnium / unpack.py
Last active May 26, 2019 00:47
Quick and dirty XOR routine for encrapted strings with a known key (eg. Mirai table.c entries)
#!/usr/bin/env
import sys
import pprint
import struct
if len(sys.argv) < 2:
print 'Usage: unpack.py <VALUE> [<KEY>]'
sys.exit(-1)
try:
@darkarnium
darkarnium / populate_sesshu.py
Created December 5, 2016 04:11
Populate Sesshu wish Alexa Top 1,000,000 sites.
#!/usr/bin/env python
import tqdm
import json
import click
import boto3
import multiprocessing
def request(target, plugin='http_robots'):