Skip to content

Instantly share code, notes, and snippets.

@trietptm
trietptm / gist:da563fdfc0232287a7e1
Created August 20, 2014 12:48
Security, Reverse, Hacking: WinDbg and IDA to Improved Code Flow Analysis http://sec-mode.blogspot.com/2012/09/windbg-and-ida-to-improved-code-flow.html
# Windbg log parser IDApython script
# Author: Matthew Graeber
# Modify: ipfans
# Update:
# v0.1:
# Initialized. (Matthew Graeber)
#
# v0.2:
# 1) fix indent;
@oleavr
oleavr / example.js
Last active June 9, 2016 23:19
Interceptor context example
'use strict';
Module.enumerateExports('libssl.so', {
onMatch(e) {
if (e.type === 'function')
Interceptor.attach(e.address, createHook(e.name, e.address));
},
onComplete() {
}
});
@matthewfl
matthewfl / order-align.patch
Created January 8, 2015 07:23
patch for the linux kernel to change the way alignments for large memory request from pci devices are handled
diff -Naur linux-3.10.0-123.13.2.el7.mfl.x86_64/drivers/pci/setup-bus.c linux-3.10.0-123.13.2.el7.mfl.x86_64-patched/drivers/pci/setup-bus.c
--- linux-3.10.0-123.13.2.el7.mfl.x86_64/drivers/pci/setup-bus.c 2014-12-12 16:14:08.000000000 -0800
+++ linux-3.10.0-123.13.2.el7.mfl.x86_64-patched/drivers/pci/setup-bus.c 2015-01-05 01:05:16.111882902 -0800
@@ -962,8 +962,7 @@
dev_warn(&dev->dev, "disabling BAR %d: %pR "
"(bad alignment %#llx)\n", i, r,
(unsigned long long) align);
- r->flags = 0;
- continue;
+ order = 11;
@sboesen
sboesen / LICENSE
Last active August 21, 2016 01:55
obj-c binja plugin
Copyright (c) 2016 Stefan Boesen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE O
@huberflores
huberflores / Dalvik-x86-execution.txt
Last active October 1, 2016 16:30
Wrapping java code to dalvik code, and executing it using Dalvik x86
/*
* author Huber Flores
*/
#Wrapping a java class into dex.
#Remember to add "dex" command to .bashrc file so that you can call the command from any place
#dex is an utility that comes with the Android SKD, and it's located in .../android-linux-x86_64/sdk/platform-tools/
#export PATH=$PATH:/home/ubuntu/android-sdk-linux/platform-tools:/home/ubuntu/CyanogenModBuild/environment/bin
@simos
simos / align-git.py
Created October 24, 2014 11:31
Align a tarball to a commit in a git repository
#!/usr/bin/env python
import os
import subprocess
# We want to reach back to a commit where the following file is identical in the tarball.
FILENAME="page_alloc.c"
# We created this file with: git log | grep '^commit' | awk '{ print $2}' > /tmp/commit-list.txt
commit_file = open("/tmp/commit-list.txt", "r")
; Input SHA256 : 3A74FBDF96B5E73F930F5887A82E4008FFB8484AE180DD3F7DE7480BC5577345
; Input MD5 : 614D07EF7777CFF5CFDF741587A097DA
; Input CRC32 : B326AB6B
; ---------------------------------------------------------------------------
; File Name : D:\_anal_temp\shellcode2.bin
; Format : Binary file
; Base Address: 0000h Range: 0000h - 02FCh Loaded length: 02FCh
.686p
@pythonjunkie
pythonjunkie / iso8601_to_epoch.py
Created August 29, 2012 18:19
Convert given time in ISO8601 and converts it to epoch time
import datetime, time
def convert_enddate_to_seconds(self, ts):
"""Takes ISO 8601 format(string) and converts into epoch time."""
dt = datetime.datetime.strptime(ts[:-7],'%Y-%m-%dT%H:%M:%S.%f')+\
datetime.timedelta(hours=int(ts[-5:-3]),
minutes=int(ts[-2:]))*int(ts[-6:-5]+'1')
seconds = time.mktime(dt.timetuple()) + dt.microsecond/1000000.0
return seconds
@dermidgen
dermidgen / desktop-setup.sh
Created February 1, 2017 00:44
Desktop setup
#!/bin/sh
UPTRACK_KEY=
## First Update
sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove
sudo apt-get install -y -f \
zsh \
git gitk \
@TACIXAT
TACIXAT / manticore_challenge.c
Created May 5, 2017 21:43
A small challenge to get familiar with Manticore
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
int check_char_0(char chr) {
register uint8_t ch = (uint8_t) chr;
ch ^= 97;
if(ch != 92) {