Skip to content

Instantly share code, notes, and snippets.

@zwned
zwned / OSX_Lion_NTFS_support
Created December 17, 2011 03:04
NTFS Support Mac OSX Lion
brew install fuse4x
brew install ntfs-3g
sudo brew link ntfs-3g
sudo cp -rfX /usr/local/Cellar/fuse4x-kext/0.8.13/Library/Extensions/fuse4x.kext /System/Library/Extensions
sudo chmod +s /System/Library/Extensions/fuse4x.kext/Support/load_fuse4x
sudo mv /sbin/mount_ntfs /sbin/mount_ntfs.orig
sudo touch /sbin/mount_ntfs
@zwned
zwned / ESX_NTP_Config
Created December 22, 2011 13:08
ESX NTP configuration in a nutshell
cat << EOF | tee /etc/sysconfig/clock
ZONE="US/Eastern"
UTC=false
ARC=false
EOF
rm -f /etc/localtime
ln -s /usr/share/zoneinfo/US/Eastern /etc/localtime
cat << EOF | tee /etc/ntp.conf
@zwned
zwned / CuckooMon.py
Created January 3, 2012 01:23
Monitor folder for malware, submit to cuckoobox
#!/usr/bin/env python
import sys, time, os, shelve, hashlib
from cuckoo.core.db import CuckooDatabase
MALWARE_DIR = "/Users/zwned/Dropbox/malware/"
SLEEP_TIME = 60
HISTORY_FILE = "cuckooMon_hist"
@zwned
zwned / GITS-constructicon
Created January 30, 2012 13:00
Shmoocon
IHDR
bKGD
pHYs
IDATx
vZq7
5k~h
... cut for brevity.
w{u7
@zwned
zwned / ctf.stri.pe
Created February 27, 2012 15:06
ctf.stri.pe
<?php
function random_string($max = 20){
$chars = "abcdefghijklmnopqrstuvwxwz0123456789";
for($i = 0; $i < $max; $i++){
$rand_key = mt_rand(0, strlen($chars));
$string .= substr($chars, $rand_key, 1);
}
return str_shuffle($string);
}
@zwned
zwned / ctf.stri.pe level1
Created February 27, 2012 17:30
ctf.stri.pe level1
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
printf("Current time: ");
fflush(stdout);
system("date");
return 0;
}
@zwned
zwned / ctf.stri.pe level02
Created February 27, 2012 17:31
ctf.stri.pe level02
#include <stdio.h>
int main(int argc, char **argv)
{
printf("Congratulations on making it to level02!\n");
printf("Point your browser to http://ctf.stri.pe/level02.php for the next challenge.\n");
}
@zwned
zwned / ctf.stri.pe level03
Created February 27, 2012 17:34
ctf.stri.pe level03
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#define NUM_FNS 4
typedef int (*fn_ptr)(const char *);
int to_upper(const char *str)
@zwned
zwned / ctf.stri.pe level04
Created February 27, 2012 17:36
ctf.stri.pe level04
#include <stdio .h>
#include <string .h>
#include <stdlib .h>
void fun(char *str)
{
char buf[1024];
strcpy(buf, str);
}
@zwned
zwned / ctf.stri.pe level05
Created March 4, 2012 23:06
ctf.stri.pe level05
cat /levels/level05
#!/usr/bin/env python
import logging
import json
import optparse
import os
import pickle
import random
import re
import string