Skip to content

Instantly share code, notes, and snippets.

View SeeFlowerX's full-sized avatar

SeeFlowerX SeeFlowerX

View GitHub Profile
# see https://httptoolkit.tech/blog/chrome-android-certificate-transparency/
# put your Burp cacert.der in the current working directory!
FINGERPRINT=`openssl x509 -in cacert.der -inform der -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64`
echo "chrome --ignore-certificate-errors-spki-list=$FINGERPRINT" > chrome.sh
adb push chrome.sh /data/local/tmp/chrome.sh
adb shell su -c cp /data/local/tmp/chrome.sh /data/local/chrome-command-line
adb shell su -c cp /data/local/tmp/chrome.sh /data/local/android-webview-command-line
@tothi
tothi / magisk_ramdisk_patch_avd.sh
Last active February 18, 2024 08:47
Apply Magisk patches on AVD (Android Emulator) RAMDISK images for running Magisk (root) on Android Emulators
#!/bin/bash
#
# patch ramdisk.img (for installing Magisk on x64 Android emulator)
#
# x86_64 on Android 12 (API Level 32) is supported/tested currently
#
# install AVD:
#
# sudo sdkmanager 'system-images;android-32;google_apis_playstore;x86_64'
import android.app.AppComponentFactory;
import android.content.pm.ApplicationInfo;
import android.util.Log;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.Channels;
import java.util.ArrayList;
import java.util.List;
import java.util.zip.ZipFile;
@NeatMonster
NeatMonster / README.md
Last active April 23, 2024 09:23
A simple hexdump module for Python

Simple Hexdump

A simple hexdump module for Python.

Installation

The preferred installation method is:

pip install simple-hexdump
@romainthomas
romainthomas / linker_soinfo.cpp
Last active September 12, 2023 02:12
Bionic's linker runs ELF constructors
// Mangled as __dl__ZL10call_arrayIPFviPPcS1_EEvPKcPT_mbS5_ in /system/bin/linker64
template <typename F>
static void call_array(const char* array_name __unused,
F* functions,
size_t count,
bool reverse,
const char* realpath) {
if (functions == nullptr) {
return;
#define _GNU_SOURCE
#include <bcc/libbpf.h>
#include <errno.h>
#include <fcntl.h>
#include <linux/bpf.h>
#include <linux/bpf_perf_event.h>
#include <linux/hw_breakpoint.h>
#include <linux/perf_event.h>
#include <pthread.h>
#include <signal.h>
@FreddieOliveira
FreddieOliveira / docker.md
Last active June 3, 2024 17:52
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@romainthomas
romainthomas / qbdi_android.cpp
Created April 9, 2019 08:55
QBDI API example
#include <iostream>
#include <iomanip>
#include <cstdlib>
#include <cstdint>
#include <cstring>
#include <jni.h>
#include <set>
#include "LIEF/ELF.hpp"
@fntlnz
fntlnz / README.md
Last active January 22, 2024 07:55
Seccomp bpf filter example

Seccomp BPF filter example

Use bpf programs as filters for seccomp, the one in the example will block all the write syscalls after it's loaded.

Usage

Compile it with just

gcc main.c
@ceres-c
ceres-c / frida-extract-keystore.py
Last active April 5, 2024 19:22
Automatically extract KeyStore objects and relative password from Android applications with Frida - Read more: https://ceres-c.it/2018/12/16/frida-android-keystore/
#!/usr/bin/python3
'''
author: ceres-c
usage: ./frida-extract-keystore.py
Once the keystore(s) have been exported you have to convert them to PKCS12 using keytool
'''
import frida, sys, time