Skip to content

Instantly share code, notes, and snippets.

@wideglide
wideglide / useful-commands.md
Last active December 27, 2018 01:41
oneliner tips

transferring files across the network, with progress

  • PUSH
tar cf - ./* | pv -pterb -s 1024M | ssh -o Compression=no -C user@host tar xf - -C /home/user/
  • PULL
@wideglide
wideglide / install_pxe.md
Last active July 16, 2017 23:25
CentOS 6 pxeboot

Install dependencies

yum install epel-release wget curl
yum -y intall tftp-server dhcp lighttpd

Configure web server

service lighttpd start
chkconfig lighttpd on
@wideglide
wideglide / rack_manage.md
Last active March 14, 2019 19:46
server management

ipmitool

Install / use ipmitool with CoreOS

core@localhost ~ $ sudo modprobe ipmi_si ipmi_devintf
core@localhost ~ $ toolbox --bind=/dev/ipmi0
[root@localhost ~]# dnf install ipmitool
[root@localhost ~]# ipmitool chassis power status

run command against multiple hosts, sudo with password required

#!/bin/bash

echo -n "current password [ENTER]:"
read PASS

for i in {1..64}; do
 ssh -t -oStrictHostKeyChecking=no 10.0.0.$i <

Keybase proof

I hereby claim:

  • I am wideglide on github.
  • I am wideglide (https://keybase.io/wideglide) on keybase.
  • I have a public key ASCAUQOs5tVMOC2GASAWkemCESRQ-lT55tkyxprpI3OBJAo

To claim this, I am signing this object:

@wideglide
wideglide / create_payload.py
Created April 1, 2018 04:15
Syscaller's Lament (swampctf-pwn)
from pwn import *
import sys
from struct import pack
# challenge specific
FILE = './syscaller'
SVR = 'chal1.swampctf.com'
PORT = 1800
# set up environ
@wideglide
wideglide / create_blank_ext2.md
Created April 4, 2018 15:26
Creating filesystems
  • Create 10MB file filled with NULL bytes
$ dd if=/dev/zero of=/tmp/blank_ext2.img bs=512 count=20480
20480+0 records in
20480+0 records out
10485760 bytes (10 MB, 10 MiB) copied, 0.132602 s, 79.1 MB/s
  • Create a EXT2 filesystem inside the blank file (default options).
@wideglide
wideglide / solve.py
Created May 1, 2018 02:47
solve.py template
#!/usr/bin/env python
from pwn import *
import argparse
from struct import pack
# challenge specific
FILE = './syscaller'
SVR = 'chal1.swampctf.com'
PORT = 1800
@wideglide
wideglide / raw_disk.vmdk
Created July 10, 2018 17:24
Use raw disk image as vmdk in VMWare Workstation / Player
version=1
encoding="UTF-8"
CID=fffffffe
parentCID=ffffffff
isNativeSnapshot="no"
createType="monolithicFlat"
RW 1 FLAT "cce4a5127f0ae2f86bd050a45badb85160597571.binary" 0
@wideglide
wideglide / BinDiffExport.idc
Created March 26, 2019 01:31
BinDiff scripts
#include <idc.idc>
static main() {
Batch(0);
Wait();
RunPlugin("zynamics_binexport_9", 2);
Exit(0);
}