Skip to content

Instantly share code, notes, and snippets.

@wirepair
wirepair / demo_scene_shellcode.c
Created January 24, 2015 05:19
old ass shellcode that would spawn a demo and take over the screen.
/* UNOPTIMIZED shellcode with horrible notes that probably don't make any sense because i've effed with the */
/* code so much. I'll fix it in v2 :D */
/* -wirepair & galt */
#include <stdio.h>
#include <winsock.h>
#define my_hash(a,b) __asm _emit a __asm _emit b
#define my_winst(a,b,c,d,e,f,g,h) __asm _emit a __asm _emit b __asm _emit c __asm _emit d __asm _emit e __asm _emit f __asm _emit g __asm _emit h
#define my_app(a,b,c,d,e,f) __asm _emit a __asm _emit b __asm _emit c __asm _emit d __asm _emit e __asm _emit f
@wirepair
wirepair / ff os cmd exec
Created October 9, 2013 05:05
Run a OS command from a firefox plugin or from Error Console
Either put into a plugin or open error console to test: (Ctrl+Shift+J) -> paste -> click 'Evaluate'
Enjoy,
@_wirepair
linux:
var file=Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);file.initWithPath("/usr/bin/gcalctool");var process=Components.classes["@mozilla.org/process/util;1"].createInstance(Components.interfaces.nsIProcess);process.init(file);process.run(false, null, 0);
Windows:
var file=Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsIFile);file.initWithPath("C:\\windows\\system32\\calc.exe");file.launch();
or
@wirepair
wirepair / gist:5720064
Created June 6, 2013 08:14
IDAPython script to get Data Ref's for a variable and print out function, address ref'd and whether read/write,
from idautils import *
from idc import *
from idaapi import *
ea = ScreenEA()
for xref in XrefsTo(ea, 0):
ref_type = ""
if xref.type == dr_W:
ref_type = "W"
elif xref.type == dr_R: