Skip to content

Instantly share code, notes, and snippets.

@argp
argp / gdbwaitforproc.py
Created December 28, 2011 09:56
Python script to wait for a process to launch and attach gdb to it
#!/usr/bin/env python
import sys
import string
import commands
import subprocess
true = True
false = False
@argp
argp / gist:3149763
Created July 20, 2012 09:10
Comparison table for trust frameworks
\begin{table*}
\centering
{\footnotesize
\caption{Evaluation of Trust Frameworks.}
\begin{tabular}{|c|c|c|c|c|c|c|}
\hline
\textbf{Proposals} & \textbf{Local trust} & \textbf{Trust} & \textbf{Depth limit} & \textbf{Trust} & \textbf{Trust} & \textbf{Multi-path}\\
& & \textbf{hierarchy} & & \textbf{asymmetry} & \textbf{differentiation} & \textbf{contribution}\\\hline
Marsh \cite{Mar94} & Yes & No & N/A & Yes & No & No \\\hline
eBay \cite{Eba06} & No & No & N/A & Yes & No & No \\\hline
(*
* msfpayload windows/meterpreter/reverse_tcp LHOST=127.0.0.1 LPORT=6666 C \
* | ocaml format_payload.ml
*)
let out ch_1 ch_2 = Printf.printf "shellcode.writeByte(0x%c%c);\n" ch_1 ch_2
let main () =
let i = ref 0 in
@argp
argp / gdb-log
Created January 7, 2014 17:51
iOS 7.0.4 (iPhone 4) MobileSafari WebKit bug 121324
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0xbbadbeef
[Switching to process 5043 thread 0x3a03]
0x303c6cce in WTFCrash ()
--------------------------------------------------------------------------[regs]
R0: 0xBBADBEEF R1: 0x00000000 R2: 0x00001900 R3: 0x00002060
R4: 0x02996BCC R5: 0x000000C0 R6: 0xCBCFA19E R7: 0x02996C54
R8: 0x39F73550 R9: 0x00000001 R10: 0x00000009 R11: 0x000000C0
R12: 0x39F5E8B0 SP: 0x02996BCC LR: 0x303C6C79 PC: 0x303C6CCE n Z C v q j e a i f T
--------------------------------------------------------------------------[code]
from macholib.MachO import MachO as macho
FILE = './xuanyuansword'
FILE_ICON = './xuanyuansword_icon'
macho_obj = macho(FILE)
for (load_cmd, cmd, data) in macho_obj.headers[0].commands:
try:
segname = getattr(cmd, 'segname')

Keybase proof

I hereby claim:

  • I am argp on github.
  • I am argp (https://keybase.io/argp) on keybase.
  • I have a public key whose fingerprint is 9D37 920E 9AA6 0A07 A0BF A9EE 00C5 0762 3A25 F110

To claim this, I am signing this object:

@argp
argp / 11.4-vs-12.0b2-sb-operations.diff
Created June 26, 2018 10:37
iOS 11.4 vs 12.0b2 sandbox kext operations
--- operations-iOS-11.4-15F79.txt 2018-06-26 13:30:06.556874870 +0300
+++ operations-iOS-12.0-b2-16A5308e.txt 2018-06-26 13:30:06.556874870 +0300
@@ -5,6 +5,7 @@
[xxx] operation: device*
[xxx] operation: device-camera
[xxx] operation: device-microphone
+[xxx] operation: darwin-notification-post
[xxx] operation: distributed-notification-post
[xxx] operation: dynamic-code-generation
[xxx] operation: file*
@argp
argp / sandbox_i6s_13.3.1_profiles_vs_sandbox_iX_12.4_profiles.txt
Created February 7, 2020 16:43
iOS 13.3.1 vs iOS 12.4 sandbox profiles
$ diff -q sandbox_i6s_13.3.1_profiles/ sandbox_iX_12.4_profiles/ | /bin/grep Only
Only in sandbox_i6s_13.3.1_profiles/: adservicesd.sb
Only in sandbox_i6s_13.3.1_profiles/: akd.sb
Only in sandbox_i6s_13.3.1_profiles/: appsso.sb
Only in sandbox_i6s_13.3.1_profiles/: ArchiveService.sb
Only in sandbox_i6s_13.3.1_profiles/: asd.sb
Only in sandbox_iX_12.4_profiles/: assertiond.sb
Only in sandbox_i6s_13.3.1_profiles/: businesschatd.sb
Only in sandbox_i6s_13.3.1_profiles/: callservicesd.sb
Only in sandbox_i6s_13.3.1_profiles/: cfprefsd.sb
@argp
argp / libsandbox_10.15.4_19E266_filters.txt
Last active April 10, 2020 07:05
Filters supported by libsandbox.dylib from macOS 10.15.4 (19E266)
path
mount-relative-path
xattr
file-mode
ipc-posix-name
global-name
local-name
local
remote
control-name
@argp
argp / sandbox_i11p_13.4.5_b1_17F5034c_operations.txt
Created April 9, 2020 15:26
iOS 13.4.5 beta 1 (17F5034c) sandbox operations
default
appleevent-send
authorization-right-obtain
boot-arg-set
device*
device-camera
device-microphone
darwin-notification-post
distributed-notification-post
dynamic-code-generation