Skip to content

Instantly share code, notes, and snippets.

@BenGardiner
BenGardiner / README.md
Last active January 2, 2023 14:38
jupyter lab workspace for montrehack

Solving Zack Deveau's SNES NSec 2021 Challenges with radare2 and Jupyter Notebooks

Use files in this gist to make your own solve of these fun challenges by zdeveau! The extra challenge is that you must do it using only static analysis in radare2. To make things a bit easier on you we will use Jupyter (Labs) Notebooks.

Install the python (tested with python-3.10) packages you will need (a full tested pip freeze is in requirements.txt also):

pip3 install jupyterlab r2pipe
@BenGardiner
BenGardiner / a_snes_sequences_writeup.ipynb
Last active January 2, 2023 14:38
this a writeup for a pair of fun SNES challenges by Zack Deveau, kinda...
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@BenGardiner
BenGardiner / 0 - r2 can signal printing presentation.md
Last active January 2, 2023 14:38
r2 CAN signal printing workshop

patat: wrap: true ...

Extracting CAN Signals from OpenXC with Radare2

If you haven't yet: please build and install r2 from git now : git clone https://github.com/radare/radare2; cd radare2 ; ./sys/install.sh. And also pip install r2pipe.

Download the target binary file at https://bit.ly/2ZtEJSH This is a 'FORDBOARD' vi-firmware device; here's the datasheet for a LPC1768 https://bit.ly/2XHemb5

@BenGardiner
BenGardiner / Advent Calendar of Advanced Cyber Fun 2018 Writeup.md
Last active December 27, 2018 13:18
Advent Calendar of Advanced Cyber Fun 2018 Writeup

This is a writeup of the solutions to the Advent Calendar of Advanced Cyber Fun 2018. If you're not familiar, this is an advent-themed challenge so there was one new challenge each day from Dec 1st to Dec 24th. The challenges focused on exotic networking features. Usually, successfully connecting would win but sometimes challenge-response was necessary too.

The Advent Calendar of Advanced Cyber Fun 2018 was organized by @_takeshix and @lod108 and a big special thanks to them -- this was a ton of xmas fun!

Port 1

I'll quote the challenge description that they posted on https://xmas.rip here:

Sometimes it's hard to remember all of those silly port numbers. And there is this restriction of 65535 ports, but santa wanted to host this year's wishlist protocol on TCP 24122018! Wouldn't it be great to access services based on their name, and not their port number?! So Santa is hosting the wishlist service with the help of old school technology: RFC1078. Send him your wishlist!

@BenGardiner
BenGardiner / Writeup.md
Last active September 15, 2017 13:09
r2con `antir2` writeup
@BenGardiner
BenGardiner / cortesi-byteclass-pallete.py
Created May 26, 2017 04:17
get @cortesi's http://binvis.io byteclass pallete in @FireyFly's pixd -- export PIXD_COLORS="$(./cortesi-byteclass-pallete.py)"
#!/usr/bin/env python
import string
import sys
def getPoint(c):
if c == 0:
return [0, 0, 0]
elif c == 255:
return [255, 255, 255]
elif chr(c) in string.printable:
// Run in the JavaScript console of the hterm browser window
// Clear all existing settings - you probably don't want to do this.
// Preferences are now stored in "chrome.storage.sync" instead of
// "window.localStorage" so if you clear your preferences the changes
// will be propagated to other devices.
//mosh_client_.io.terminal_.prefs_storage.clear();
mosh_client_.io.terminal_.prefs_.resetAll();
mosh_client_.io.terminal_.prefs_.set('enable-bold', true);
@BenGardiner
BenGardiner / dry-run and verbose example
Created January 30, 2012 04:46
An example of how to do 'verbose' mode and a dry-run mode together
#!/bin/bash
function echo_and_exec()
{
echo "Executing $@" ; "$@"
}
function set_exec()
{
if [ -z "${DRYRUN}" ]; then