Skip to content

Instantly share code, notes, and snippets.

@scrapbird
scrapbird / label_syscalls.py
Created July 3, 2018 04:26
24b89e36e12166f613edb61909d1192dbd918c2eac45d3a75a588ec24a4e2a36 scripts
#!/usr/bin/env python
import r2pipe, sys, os, json
if len(sys.argv) < 2:
print "Please supply the hit number"
os.exit(1)
r2 = r2pipe.open ()
@scrapbird
scrapbird / r21337patch.py
Created November 7, 2017 04:05
Applies an x64dbg .1337 patch file to a binary in radare2. Call with: #!pipe ./r21337patch.py /path/to/patch.1337
#!/usr/bin/env python
import r2pipe
import sys
r2 = r2pipe.open()
# r2 base address
delta = 0x400000
@scrapbird
scrapbird / monitor.py
Last active November 3, 2017 01:07
Automatically take an AMI of any machines that aren't responding in an elastic load balancer
import datetime
import time
import boto3
from botocore.exceptions import ClientError
elb_client = boto3.client('elb')
ec2_client = boto3.client('ec2')
@scrapbird
scrapbird / tracetohere.py
Last active October 31, 2017 08:29
r2pipe script to trace all possible paths to current address by graphing xrefs
#!/usr/bin/env python
import r2pipe
from anytree import Node, RenderTree
r2 = r2pipe.open()
here = int(r2.cmd("s"), 16)
print "Here: ", hex(here)

Keybase proof

I hereby claim:

  • I am scrapbird on github.
  • I am scrapbird (https://keybase.io/scrapbird) on keybase.
  • I have a public key whose fingerprint is F6AA 63DE FF6D EA54 CFDB 5A9A 270B 9215 E28C F89F

To claim this, I am signing this object:

@scrapbird
scrapbird / ropasaurus.py
Last active July 2, 2017 04:24
Solution to ropasaurus rex challenge
#!/usr/bin/env python
from pwn import *
#c = remote('localhost', 2323)
c = process('./ropasaurusrex-85a84f36f81e11f720b1cf5ea0d1fb0d5a603c0d')
command = 'touch dongs'
write = 0x804830C
#!/usr/bin/env python
import r2pipe
r2 = r2pipe.open('http://192.168.100.64:1337')
def cont():
print(r2.cmd('dc'))
@scrapbird
scrapbird / ecs-cluster-restart.py
Created February 1, 2017 06:57
This python script will restart every task running in an AWS ECS cluster, keeping all environment overrides and command args the same.
#!/usr/bin/env python
import sys
import boto3
from botocore.exceptions import ClientError
def newTask(group, overrides, taskDefinitionArn):
t = {}
t['group'] = group
t['overrides'] = overrides