Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Mostly on gitlab.com/dweinstein these days...

David Weinstein dweinstein

💭
Mostly on gitlab.com/dweinstein these days...
View GitHub Profile
@heapwolf
heapwolf / npm-qos-heuristic.md
Last active Dec 11, 2015
general heuristics for ranking package quality
View npm-qos-heuristic.md

Health

Has CI

Tests pass

Total number of breaking commits

Number of dependencies

Average age of issue

Frequency of issues fixed

Average response time of issues fixed to bugs filed

Last commit

@dweinstein
dweinstein / android-tcpdump.sh
Last active Jan 11, 2016
Easier tcpdump setup for Android (make sure tcpdump binary is in /data/local/tmp/xbin/tcpdump). Assumes socat and wireshark are installed on your system and that you're on OS X. Easily tweaked for other platforms...
View android-tcpdump.sh
#!/usr/bin/env bash
TCPDUMP_PID=""
SOCAT_PID=""
OUTPUT_FILE=""
PORT=12345
TMPDIR="."
TCPDUMP_PATH="/data/local/tmp/xbin/tcpdump"
NETCAT_PATH="/data/local/tmp/nc"
HOST_INTERFACE="en0"
@oleavr
oleavr / _FridaCommonJSIntegration.md
Last active Feb 17, 2016
How to consume npm modules from Frida agent scripts
View _FridaCommonJSIntegration.md

Install Node.js 5.x, then:

npm install frida co uuid

and run:

node app.js
@dweinstein
dweinstein / note.md
Last active Mar 24, 2016
EHCI Extension Pack, USB, VirtualBox
View note.md

so I learned two things with usb on virtualbox (OS X):

    1. it sucks, 2) it sucks less if you enable the extension pack for ehci:
  • w/ out ehci I could not install a 28 MB APK from within boot2docker. maybe if I was willing to wait long enough but AFAICT it would not complete.

± % docker run --privileged -v=/dev/bus/usb:/dev/bus/usb --rm -t -i -v pwd:/provision analysis /bin/bash

  • w/out EHCI
@dweinstein
dweinstein / LICENSE
Last active Mar 30, 2016
mega rename class based on source, etc.
View LICENSE
The MIT License (MIT)
Copyright (c) 2015 David Weinstein
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:
View -
BKAccelerometer_server
BKAccelerometer_server_routine
SBAcquireApplicationTerminationAssertion
SBActivateAssistantWithContext
SBAddAlertItemsSuppressionAssertion
SBAddBiometricUnlockSuppressionAssertion
SBAddDownloadingIconForDisplayIdentifier
SBAddDownloadingIconForDisplayIdentifierWithSoftwareType
SBAddThermalWarningSuppressionAssertion
SBAddWallpaperAnimationSuspensionAssertion
@fi01
fi01 / How to use msm_acdb explot
Created Jul 28, 2013
Stack-based buffer overflow in acdb audio driver (CVE-2013-2597)
View How to use msm_acdb explot
To use msm_acdb explot we need to work 4 steps.
1. Find how to run command with root or system previlege
2. Get offset for registers to setup
3. Choose proper code in kernel image
4. Setup parameters in acdb.c
1. Find how to run command with root or system previlege
Do it your self. :-P
@heapwolf
heapwolf / stacktrace.hpp
Last active Aug 29, 2016
a simple zero-touch, header only stack-trace provider for c++
View stacktrace.hpp
#ifndef STACK_TRACE_H
#define STACK_TRACE_H
#include <iostream>
#include <signal.h>
#include <string>
#include <dlfcn.h>
#include <cxxabi.h>
#include <regex>
#include <execinfo.h>
@dweinstein
dweinstein / 0README.md
Last active Oct 9, 2016
Template for organizing Frida agents. Should make it easier for community to be able to reuse code. Example device side agents and how to potentially organize them.
View 0README.md

SUMMARY

The idea here is to organize multiple agent scripts into modules that can be combined into an aggregated agent.

frida agents generally live under e.g., an ./lib/agents directory in a top level project.

TODO

For each agent script we need a top level runner and then we use frida-compile to build into a single agent script that we can load.

@dweinstein
dweinstein / guess-encoding.js
Last active Oct 21, 2016
Guess encoding of zip based on `_zip_guess_encoding` from libzip
View guess-encoding.js
'use strict';
const ZIP_ENCODING_UNKNOWN = 0;
const ZIP_ENCODING_ASCII = 1;
const ZIP_ENCODING_UTF8_KNOWN = 2;
const ZIP_ENCODING_UTF8_GUESSED = 3;
const ZIP_ENCODING_CP437 = 4;
const ZIP_ENCODING_ERROR = 5;
module.exports.zipEncodings = {
You can’t perform that action at this time.