Skip to content

Instantly share code, notes, and snippets.

View CypherpunkSamurai's full-sized avatar
😶
Currently Busy 🌻🐢

Cypherpunk Samurai CypherpunkSamurai

😶
Currently Busy 🌻🐢
View GitHub Profile
@CypherpunkSamurai
CypherpunkSamurai / dexing_d8_with_d8.md
Created May 20, 2022 19:15
Dexing d8.jar with d8.jar

Using d8 for dexing d8

To convert d8 to dex we can use d8 on itself.

Downloading d8.jar

d8.jar is inluded in android build tools zips. We can also download it from Google's Maven Repo, where r8 and d8 are one jar.

Using d8.jar

We can use d8.jar using java and --classpath.

@CypherpunkSamurai
CypherpunkSamurai / README.md
Last active May 28, 2022 20:57
DX D8 Desugar Jack Java Compile DalvikVM Android

DX D8 Desugar Jack Java Compile DalvikVM Android

This is my notes on compiling java source code on android itself.

Searches

dx dalvikvm -CompileOnHost -TEST_ART_RUN_TEST_DEPENDENCIES -TEST_NAME -GC_CONCURRENT -SHA1-Digest -SHA1-Digest-Manifest -formbuilder -dysentery -WebChat -ThomasGross -SurfaceFlinger

@CypherpunkSamurai
CypherpunkSamurai / dalvik.sh
Created May 29, 2022 19:12 — forked from maluta/dalvik.sh
Command line Java on DalvikVM
#!/bin/sh
DIR="tmp_"$$
JAR=`echo $1 | tr '.' ' ' | awk '{ print $1 }'`
rm -rf $JAR.jar
mkdir $DIR
cp $1 $DIR
cd $DIR
echo "** Compiling java file..."
javac -d . -g $1
echo "** Creating temporary jar..."
@CypherpunkSamurai
CypherpunkSamurai / Readme.md
Created May 30, 2022 20:03
Import All Reg files in a folder in Windows using Batch Script
@CypherpunkSamurai
CypherpunkSamurai / android-burp-cert.sh
Created June 19, 2022 15:00 — forked from vavkamil/android-burp-cert.sh
One Liner For Installing Burp Certificate Into Android Nougat and Later
# https://securitychops.com/2019/08/31/dev/random/one-liner-to-install-burp-cacert-into-android.html
#
curl --proxy http://127.0.0.1:8080 -o cacert.der http://burp/cert \
&& openssl x509 -inform DER -in cacert.der -out cacert.pem \
&& cp cacert.der $(openssl x509 -inform PEM -subject_hash_old -in cacert.pem |head -1).0 \
&& adb root \
&& adb remount \
&& adb push $(openssl x509 -inform PEM -subject_hash_old -in cacert.pem |head -1).0 /sdcard/ \
&& echo -n "mv /sdcard/$(openssl x509 -inform PEM -subject_hash_old -in cacert.pem |head -1).0 /system/etc/security/cacerts/" | adb shell \
&& echo -n "chmod 644 /system/etc/security/cacerts/$(openssl x509 -inform PEM -subject_hash_old -in cacert.pem |head -1).0" | adb shell \
@CypherpunkSamurai
CypherpunkSamurai / README.md
Last active June 22, 2022 10:15
Export C Code from IDA Pro

Exporting C code from IDA Pro

While reversing a few stuff i found it tedious to decompile a lot of functions and copy them, so i found a way to decompile them with IDA Pro at once and write to one .C file.

You'll need IDA Pro 7.x.

Export Headers

First Export Headers Open the file and let IDA Analyze it. Go to File -> Produce file -> Create C header file to a file.

@CypherpunkSamurai
CypherpunkSamurai / sticker.sh
Created June 24, 2022 07:57 — forked from chitacan/sticker.sh
Small shell script to find process id via android shell and attach "strace" to it.
#!/usr/bin/env bash
version="0.0.1"
TARGET_PROCESS=$1
if [ ! $TARGET_PROCESS ]; then
echo
echo "Usage: sticker [process name]"
echo
@CypherpunkSamurai
CypherpunkSamurai / android_gdb.md
Created June 24, 2022 07:57 — forked from sekkr1/android_gdb.md
Attaching GDB to Android apps' native libraries

How to GDB android native libraries

[1] Install NDK from android studio

[2] Push appropriate gdb-server to phone

adb push ~/android-sdk-linux/ndk-bundle/prebuilt/android-<arch>/gdbserver/gdbserver /data/local/tmp
adb shell "chmod 777 /data/local/tmp/gdbserver"
adb shell "ls -l /data/local/tmp/gdbserver"

[4] Forward ports

adb forward tcp:1337 tcp:1337

@CypherpunkSamurai
CypherpunkSamurai / idastuff.txt
Created June 24, 2022 17:44 — forked from wjdwndud0114/idastuff.txt
so debugging on ida pro
Nexus 5 4.4.4
1. setup:
a. need to downgrade to 4.4.4, root
b. luckypactcher, GG, xposed
c. put libhook.so and android_server and libsubstrate.so in /data/local/tmp/ and install aadbg
d. patch with luckypatcher the middle 2
2. adb shell su -> android_server
3. adb forward tcp:23946 tcp: 23946
4. adb forward tcp:8700 jdwp:PID_OF_GAME
jdb -connect com.sun.jdi.SocketAttach:hostname=localhost,port=8700
@CypherpunkSamurai
CypherpunkSamurai / install_plug_neovim_windows.bat
Last active July 14, 2022 18:01
Install plug-nvim windows
rmdir "%LocalAppData%\nvim" /s /q
rmdir "%LocalAppData%\nvim-data" /s /q
mkdir "%LocalAppData%\nvim"
mkdir "%LocalAppData%\nvim-data\"
mkdir "%LocalAppData%\nvim-data\site\"
mkdir "%LocalAppData%\nvim-data\site\autoload\"
REM curl https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim > "%LocalAppData%\nvim-data\site\autoload\plug.vim"
powershell "iwr -outf '%LocalAppData%\nvim-data\site\autoload\plug.vim' https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"