1. proxy 탐지 구문
public static boolean ~~~Proxy(Context context) {
int parseInt;
if (VERSION.SDK_INT >= 14) {
context = System.getProperty("http.proxyHost");
String property = System.getProperty("http.proxyPort");
if (property == null) {
property = "-1";
}
parseInt = Integer.parseInt(property);
} else {
String host = Proxy.getHost(context);
parseInt = Proxy.getPort(context);
context = host;
}
return isNotEmpty(context) != null && parseInt > 0;
}
2. python 코드
import sys
import frida
def on_message(message, data):
print
"[%s] -> %s" % (message, data)
PACKAGE_NAME = "com.package.name"
jscode = """
Java.perform(function(){
var System = Java.use("java.lang.System");
System.getProperty.overloads[0].implementation = function(prop){
return 0;
}
});
"""
try:
device = frida.get_usb_device(timeout=10)
pid = device.spawn([PACKAGE_NAME])
print("App is starting ... pid : {}".format(pid))
process = device.attach(pid)
device.resume(pid)
script = process.create_script(jscode)
script.on('message', on_message)
print('[*] Running Frida')
script.load()
sys.stdin.read()
except Exception as e:
print(e)
'모바일' 카테고리의 다른 글
[android] frida hooking (SSL Pinning 우회) (0) | 2018.12.18 |
---|---|
[ios] cydia, clutch, frida hooking (탈옥 탐지 우회) (1) | 2018.12.18 |
[android] frida hooking (libc.so open) (0) | 2018.12.18 |
[android] 커스텀롬, 루팅 (0) | 2018.12.18 |
[android] frida 설치, fridump (메모리 덤프) (0) | 2018.03.28 |