Skip to content

Instantly share code, notes, and snippets.

@interference-security
interference-security / Android-System-SSL-Cert-Install.md
Last active February 23, 2020 05:00
Install BurpSuite SSL Certificate on Android System Level

Source: https://blog.ropnop.com/configuring-burp-suite-with-android-nougat/

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  
  mount -o rw,remount /system  
 mv /sdcard/Download/.0 /system/etc/security/cacerts/ 
@interference-security
interference-security / run_frida_magisk.md
Last active June 22, 2022 18:54
Run Frida and Magisk together

#Source: https://serializethoughts.wordpress.com/2018/07/23/frida-magisk-and-selinux/

Error when MagiskHide is running and we try to run Frida:

avc: denied { sigchld } for scontext=u:r:zygote:s0 tcontext=u:r:magisk:s0 tclass=process permissive=0

Solution 1: Run the below commands from ADB

magiskpolicy --live "allow zygote magisk process *"
magiskpolicy --live "allow system_server magisk process *"
magiskpolicy --live "allow radio magisk process *"
@interference-security
interference-security / frida-server-ios-all-interfaces.sh
Last active July 3, 2022 16:53
Run iOS frida-server on all interfaces
# Install curl using Cydia before using the next command
# /bin/bash -c "$(curl -fsSL https://gist.githubusercontent.com/interference-security/68faea1f4a445a7814cc2518a7d1c416/raw/c715dbc30397762239b3bf2d76c60859a5c83625/frida-server-ios-all-interfaces.sh)"
launchctl unload -w /Library/LaunchDaemons/re.frida.server.plist
cat >/Library/LaunchDaemons/re.frida.server.plist <<EOL
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>re.frida.server</string>
@interference-security
interference-security / writable-avd.md
Last active March 18, 2025 03:19
How to make AVD system and file-system writable?
@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 / 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 / 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 / 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 / flexdecrypt-dump.md
Last active June 26, 2021 02:04
Decrypt iOS app to generate IPA using Flexdecrypt
@interference-security
interference-security / android-ssl-cert-install.md
Last active February 7, 2025 04:46
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