Skip to content

Instantly share code, notes, and snippets.

@iddoeldor
iddoeldor / ios_ssh_over_usb_and_ipa_extractor.md
Last active December 26, 2025 02:21
and iOS related tips&tricks

extract db

PASS=alpine; PORT=2222; sshpass -p $PASS ssh -p $PORT root@localhost -t "cp \$(find /var/mobile/Containers/Data/Application/ -name s4l*db) /private/var/tmp/skype.db" && sshpass -p $PASS scp -P $PORT root@localhost:/private/var/tmp/skype.db .

pull & read plist

/tmp$ scp -P 2222 root@localhost:/private/var/mobile/Containers/Data/Application/F8C7294C-2B60-48EC-A987-D46B9FE4DEAE/Library/Preferences/com.skype.skype.plist .
/tmp$ sudo apt-get install libplist-utils
/tmp$ plistutil -i com.skype.skype.plist | less
@iddoeldor
iddoeldor / frida_ssl_read_write.js
Created October 18, 2018 17:55 — forked from virtualminds/frida_ssl_read_write.js
frida libmono ssl read
{
onEnter: function (log, args, state) {
soname = Memory.readUtf8String(args[0]);
if(soname.includes('libmono-btls-shared.so')) {
log("libmono-btls-shared.so cargada!");
this.dlopen = true;
this.dlopenMonitor = false;
}
@iddoeldor
iddoeldor / solve.py
Created June 30, 2019 10:26 — forked from inaz2/solve.py
angr example of input handling
$ gcc test.c
$ python solve.py
WARNING | 2019-05-06 19:54:00,017 | angr.state_plugins.symbolic_memory | The program is accessing memory or registers with an unspecified value. This could indicate unwanted behavior.
WARNING | 2019-05-06 19:54:00,017 | angr.state_plugins.symbolic_memory | angr will cope with this by generating an unconstrained symbolic variable and continuing. You can resolve this by:
WARNING | 2019-05-06 19:54:00,017 | angr.state_plugins.symbolic_memory | 1) setting a value to the initial state
WARNING | 2019-05-06 19:54:00,017 | angr.state_plugins.symbolic_memory | 2) adding the state option ZERO_FILL_UNCONSTRAINED_{MEMORY,REGISTERS}, to make unknown regions hold null
WARNING | 2019-05-06 19:54:00,017 | angr.state_plugins.symbolic_memory | 3) adding the state option SYMBOL_FILL_UNCONSTRAINED_{MEMORY_REGISTERS}, to suppress these messages.
WARNING | 2019-05-06 19:54:00,018 | angr.state_plugins.symbolic_memory | Filling register r15 with 8 unconstrained bytes referenced from 0x810 (__libc_csu_
@iddoeldor
iddoeldor / UiccUnlock.cpp
Last active November 21, 2021 20:05 — forked from tewilove/UiccUnlock.cpp
Looks like a quasi-exploit to do a SIM unlock
#include <android/log.h>
#include <jni.h>
#include <binder/Binder.h>
#include <binder/Parcel.h>
#include <binder/IServiceManager.h>
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
from ghidra.program.model.address import Address
from ghidra.program.model.mem import MemoryAccessException
from ghidra.program.flatapi import FlatProgramAPI
from ghidra.util.task import TaskMonitor
import math
import json
from os.path import isfile, join, dirname
import struct as st
import string
var kModuleName = 'library.so';
var _module = Process.findModuleByName(kModuleName);
var _module_end = _module.base.add(_module.size);
var o = 0xFF537;
Interceptor.attach(base.add(o),{
  onEnter: function (args) {
    console.log(o.toString(16), this.context.x0.readPointer().readCString())

    this.tid = Process.getCurrentThreadId();
#include <speex/speex.h>
#include <iostream>
#include <fstream>
#include <vector>
#include <iterator>
#include <cassert>
int main(int argc, char const *argv[])
{
if (argc < 2)
import sark
for segname in ['.bss', '.data']:
for line in sark.Segment(name=segname).lines:
if not line.name:
continue
if line.name.startswith('g_'):
continue
@iddoeldor
iddoeldor / ida_sarlk_function_strings_ref.py
Created August 17, 2020 22:45 — forked from yannayl/ida_sarlk_function_strings_ref.py
A function which returns all the strings referenced from function
def strs(f=None, visited=None, level=0, maxlevel=-1):
if maxlevel >= 0 and level > maxlevel:
return [], set()
if not f:
f = sark.Function()
if not visited:
visited = set()
root = True
else:
root = False
@iddoeldor
iddoeldor / makeToast.js
Created August 5, 2018 14:06 — forked from myzhan/makeToast.js
Frida android make toast
Java.scheduleOnMainThread(function() {
Toast = Java.use("android.widget.Toast");
var currentApplication = Java.use('android.app.ActivityThread').currentApplication();
var context = currentApplication.getApplicationContext();
Toast.makeText(context,"hello world", Toast.LENGTH_SHORT.value).show();
});