Skip to content

Instantly share code, notes, and snippets.

View 0xdeadbeefJERKY's full-sized avatar

0xdeadbeefJERKY 0xdeadbeefJERKY

View GitHub Profile
@0xdeadbeefJERKY
0xdeadbeefJERKY / aws-setup-cloudtrail-investigation.sh
Last active July 21, 2023 07:02
Setup the necessary Athena components to analyze CloudTrail logs for incident response purposes
#!/bin/bash
# This script will create the necessary AWS Athena resources needed to conduct
# an investigation using CloudTrail logs. Note that the S3 bucket defined as the
# Athena query results output location must already exist and will _not_ be
# created by this script.
# Example:
# ./aws-setup-cloudtrail-investigation.sh \
# -c example-bucket-123/<PREFIX>/AWSLogs/<ACCOUNTID>/CloudTrail/<REGION> \
@0xdeadbeefJERKY
0xdeadbeefJERKY / boxstarter.ps1
Last active March 22, 2022 04:19 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# SYNOPSIS
# Configuring fresh installs of Windows is entirely too manual. Boxstarter scratches the
# "I wish I had a Brewfile for Windows" itch.
#
# Boxstarter script heavily inspired by the following (with some minor customizations):
# - https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f
# - https://github.com/treffynnon/Windows-Boxstarter-with-WSL-Ubuntu/blob/master/install.ps1
# - https://gist.github.com/CJKinni/de205822b0dddd2b18054fe7a29f72bc
# - https://gist.github.com/NickCraver/7ebf9efbfd0c3eab72e9
#
@0xdeadbeefJERKY
0xdeadbeefJERKY / ansible-directory-layout.sh
Created September 21, 2020 00:57
Simple bash script to configure the directory layout according to Ansible's official best practices. Note that the role sub-directories should be created using something like molecule, ansible-galaxy, etc.
#!/usr/bin/env bash
# Create inventory file(s)
touch production staging
# Create various directories
mkdir -p group_vars host_vars library module_utils filter_plugins roles
# Create main playbook
touch site.yml
# Sample "hello world" PowerShell script
Write-Host 'Hello, world!'
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDLcXYbMUpjdLesUlD464N7Uf/V6lJp5Zyrz32W4kv+WL2LKD+e8VBPxWDNXKEXodtu0jDTFTjzYWYmmPHFCBDqwNYe4ndXcJgryVtzRssATkzzPEjbX0Z4AFLQM4LIm7sdgmJWIVi9uXu1ufwUwIHC/mTx/kQp2jgjrH9gaEHBQvsyUfk3hOFHVKycNqsqs27V0+cQN5OTNplJrwJgWZYuYnVpyIe7HUTbg4KmTdWJcp7dd12RzLv/HQ1nLjiRi3iwlg5IUu7mgaYbMdiG39iQ25RqwS4GQ0D7Mc8vYA35eyEWSK/jy2tR6rSK/EAtg39VmkkQGCMbCw2AtjXNtzAjb+uhO2TM5oECX4H2jyIjTSlxxqru2zhLbTaJba/zw6I5U0hZOi3bZwQnFdKMNo2cGP+BCEllwrP80zi9Uj8mGGa1FiRa1WlKrJjRBfiS0Z6SegNJvxoxAfVeFfBwCVCvOiJ5p0T0q27Bf1tcRoS5m3arHe+TdjCLF6MVQauEJzoa1JWbtDuUgvcQPVmdc0xs2bicz08XL3L7Ph4ogjx0xHEIADAxuVh9SaZBhhGRKSJdtWqAuX/WosQnLRmFRmVK0pSTudHv9x7p90uQHJAqK6B2DJro7BgPmyiusTpZqIekBVdBwOXR6SbglS6tmp/LK0zyADbbcAlxy4OGKFwo3w==
@0xdeadbeefJERKY
0xdeadbeefJERKY / exampleRET.c
Created September 24, 2017 18:04
Simple C file explaining the execution of the 'ret' x86/x64 instruction
#include <stdio.h>
int main()
{
// call function and save the address
// pointing to the 'int varint = 0' line
// on the stack
printf("Hello world\n");
// once 'printf' is finished, pop
@0xdeadbeefJERKY
0xdeadbeefJERKY / pilot-flag.py
Created September 24, 2017 18:00
Python script to solve 'pilot' pwnable from CSAW CTF 2017 Quals
#!/usr/bin/python
from pwn import *
import argparse
parser = argparse.ArgumentParser(description='pwntools skeleton')
parser.add_argument('-l', action="store_true", default=False)
args = parser.parse_args()
# check if target is local binary or remote
if args.l: