Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# Error codes + association:
# 1 - Running as root
# 2 - Unsupported platform
# 3 - Dependency issue
# 4 - Unsupported shell
# 5 - Setting $THEOS failed
# 6 - Theos clone failed
# 7 - Toolchain install failed
@interference-security
interference-security / flexdump
Created November 22, 2021 18:54 — forked from defparam/flexdump
Flexdump - A script that wraps flexdecrypt to dump, decrypt, re-sign, re-package iOS apps
#!/bin/bash
# Copyright 2021 Evan Custodio (@defparam)
#
# 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,
@interference-security
interference-security / android-ssl-cert-install.md
Last active September 27, 2024 16:45
Android SSL Certificate Installation
openssl x509 -inform DER -in cacert.der -out cacert.pem
openssl x509 -inform PEM -subject_hash_old -in cacert.pem | head -1
mv cacert.pem <hash>.0  
adb push <hash>.0 /sdcard/Download/
adb shell
su
mkdir -m 700 /sdcard/cert/
cp /system/etc/security/cacerts/* /sdcard/cert/
mount -t tmpfs tmpfs /system/etc/security/cacerts
@interference-security
interference-security / flexdecrypt-dump.md
Last active June 26, 2021 02:04
Decrypt iOS app to generate IPA using Flexdecrypt
@interference-security
interference-security / frida-android.md
Created November 23, 2020 14:53
Frida on Android

mount -o rw,remount /vendor

copy /sdcard/Download/frida-server /vendor/bin/

chmod 700 /vendor/bin/frida-server

setprop ctl.start fridaserver

@interference-security
interference-security / jni_onload_library.txt
Created October 5, 2020 22:57
jni_onload library code
//Source: https://medium.com/@dPhoeniixx/arbitrary-code-execution-on-facebook-for-android-through-download-feature-fb6826e33e0f
#include <jni.h>
#include <string>
#include <stdlib.h>
JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved)
{
system("id > /sdcard/PoC");
return JNI_VERSION_1_6;
}
@interference-security
interference-security / run-external-executable-ios.md
Created September 30, 2020 20:08
Running third-party executables on iOS

iDevice:~ root#ldid -e `which bash` > ent.xml

iDevice:~ root# cat ent.xml

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>platform-application</key>
        <true/>
 com.apple.private.security.no-container
@interference-security
interference-security / useful-oneliners.md
Last active April 12, 2021 21:31
Useful One-Liners

Nmap output open ports separated by comma:

cat filename.nmap | grep -i "/tcp" | cut -d "/" -f1 | sort | uniq | tr '\n' ',' ; echo ""

Nmap open ports:

Linux: grep -i ".*/tcp.*open.*" filename.nmap | cut -d "/" -f1 | sort -u -n | tr "\n" "," | sed 's/,$//'

Windows: grep -i ".*/tcp.*open.*" filename.nmap | cut -d "/" -f1 | sort2 -u -n | tr -s "\r\n" "," | sed "s/,$//"

Powershell: Select-String -Path .\filename.nmap -Pattern ".*/tcp.*open.*" | Select-Object -ExpandProperty Line | %{$_.Split('/')[0]} | Sort-Object -Unique | %{$_.replace("`r","a")}

@interference-security
interference-security / writable-avd.md
Last active November 16, 2024 10:31
How to make AVD system and file-system writable?