house
house copied to clipboard
Remote device support
I'm not sure if it's by design but House doesn't support remote device (via TCP) yet.
My case was that I had to connect to a phone with Frida server listening on an internal IP address. It may sound weird but the phone was shared for testing and it's not USB connected to my laptop, so I had to modify some codes for a quick workaround:
-
To register the remote device in device manager:
house_global.device_manager.add_remote_device('[Phone_IP]')
(I just hardcoded the IP). I added this inhouseSock.py
. -
To get the device: replace
house_global.device = frida.get_usb_device()
withhouse_global.device = house_global.device_manager.enumerate_devices()[-1]
(Yes hardcoding again).
There's definitely a better way to implement this. I just wonder if there's any future plan on supporting the remote devices?
Diff below:
diff --git a/app.py b/app.py
index fe2480e..6267f43 100644
--- a/app.py
+++ b/app.py
@@ -107,7 +107,7 @@ def hook_clear():
@app.route('/hook', methods=['POST'])
def hook():
- house_global.device = frida.get_usb_device()
+ house_global.device = house_global.device_manager.enumerate_devices()[-1]
class_name = str(request.form.get('classname'))
method_name = str(request.form.get('methodname'))
if (method_name != 'None') & (class_name != 'None'):
@@ -121,7 +121,7 @@ def hook():
@app.route('/load_script', methods=['POST'])
def loadscript():
- house_global.device = frida.get_usb_device()
+ house_global.device = house_global.device_manager.enumerate_devices()[-1]
house_global.script_to_load = str(request.form.get('script'))
load_script()
diff --git a/houseSock.py b/houseSock.py
index 09c905b..0b16237 100644
--- a/houseSock.py
+++ b/houseSock.py
@@ -382,7 +382,7 @@ def dounloadMonitor():
@authenticated_only
def doInspect(message):
- house_global.device = frida.get_usb_device()
+ house_global.device = house_global.device_manager.enumerate_devices()[-1]
house_global.onMessageException = ''
ins_classname = message.get('ins_classname')
diff --git a/houseUtil.py b/houseUtil.py
index a34646f..64c67ec 100644
--- a/houseUtil.py
+++ b/houseUtil.py
@@ -203,6 +203,10 @@ def getDevice():
print (stylize("[+] Trying to get device..", Info))
house_global.device_dict = {}
house_global.device_manager = frida.get_device_manager()
+ try:
+ house_global.device_manager.add_remote_device('192.168.XX.XX')
+ except:
+ pass
device_list = house_global.device_manager.enumerate_devices()
if len(device_list) != 0:
remote_device_list = []
Does this still work ? I would like to use NOX app player would it work for this ? it uses the Intel HAXM