dmayer / idb

idb is a tool to simplify some common tasks for iOS pentesting and research
MIT License
942 stars 156 forks source link

idb :: connection closed by remote host #65

Closed jindejava closed 8 years ago

jindejava commented 8 years ago

hi, iphone6(iOS9.1 ), isn't install Cydia , iphone4(6.1.2), install Cydia. iphone6 log:--------------------------------------------------------- Error connecting to device! [ERROR] 2015-12-23 14:44:38 :: idb :: connection closed by remote host 2015-12-23 14:47:18.967 ruby[85189:7066478] modalSession has been exited prematurely - check for a reentrant call to endModalSession: [DEBUG] 2015-12-23 14:47:18 :: idb :: opening port 51679 for manual ssh connection [INFO] 2015-12-23 14:47:18 :: idb :: Launching SSH proxy on port 2222 [DEBUG] 2015-12-23 14:47:18 :: idb :: opening tool port 51728 for internal ssh connection [INFO] 2015-12-23 14:47:18 :: idb :: Launching SSH proxy on port 51728 bind(): Address already in use Error creating socket: Address already in use [ERROR] 2015-12-23 14:47:18 :: idb :: Unsupported iOS Version.

iphone4 log:-------------------------------------------------------------- waiting for connection [DEBUG] 2015-12-23 15:50:28 :: idb :: Connecting via USB [DEBUG] 2015-12-23 15:50:28 :: idb :: Using port 52086 for SSH forwarding [INFO] 2015-12-23 15:50:28 :: idb :: Launching SSH proxy on port 52086 waiting for connection [INFO] 2015-12-23 15:50:29 :: idb :: Establishing SSH Session for root@localhost:52086 accepted connection, fd = 4 waiting for connection Number of available devices == 1 Requesting connecion to device handle == 19 (serial: 4f1df4a22008f0516a70ed2467312473e641ac91), port 22 Error connecting to device! [ERROR] 2015-12-23 15:50:29 :: idb :: connection closed by remote host 2015-12-23 15:55:14.546 ruby[85433:7286381] modalSession has been exited prematurely - check for a reentrant call to endModalSession: [DEBUG] 2015-12-23 15:55:14 :: idb :: opening port 52086 for manual ssh connection [INFO] 2015-12-23 15:55:14 :: idb :: Launching SSH proxy on port 2222 [DEBUG] 2015-12-23 15:55:14 :: idb :: opening tool port 52088 for internal ssh connection [INFO] 2015-12-23 15:55:14 :: idb :: Launching SSH proxy on port 52088 bind(): Address already in use Error creating socket: Address already in use [ERROR] 2015-12-23 15:55:14 :: idb :: Unsupported iOS Version.

dmayer commented 8 years ago

Is it possible that you had idb running before and it crashed? Check the output of ps to see if you have any instances of iproxy running on the machine you are using to run idb. It could be that an old process is running and blocking the port.

Also, are you sure you have the SSH daemon running on the device?

jindejava commented 8 years ago

thanks,

RishabhTayal commented 7 years ago

@dmayer I am getting the following error while connecting to a device.

``` [DEBUG] 2017-09-14 13:45:29 :: idb :: Connecting via USB [DEBUG] 2017-09-14 13:45:29 :: idb :: Using port 65434 for SSH forwarding [INFO] 2017-09-14 13:45:29 :: idb :: Launching SSH proxy on port 65434 waiting for connection [INFO] 2017-09-14 13:45:30 :: idb :: Establishing SSH Session for root@localhost:65434 accepted connection, fd = 4 waiting for connection Number of available devices == 1 Requesting connecion to device handle == 86 (serial: bb1edfc2fd4391dc604c77605c4960288efe3c44), port 22 Error connecting to device! 2017-09-14 13:45:33.770 ruby[58077:3323699] modalSession has been exited prematurely - check for a reentrant call to endModalSession: [DEBUG] 2017-09-14 13:45:33 :: idb :: opening port 65434 for manual ssh connection [INFO] 2017-09-14 13:45:33 :: idb :: Launching SSH proxy on port 2222 [DEBUG] 2017-09-14 13:45:33 :: idb :: opening tool port 65437 for internal ssh connection [INFO] 2017-09-14 13:45:33 :: idb :: Launching SSH proxy on port 65437 waiting for connection [INFO] 2017-09-14 13:45:33 :: idb :: Checking iOS version waiting for connection [DEBUG] 2017-09-14 13:45:33 :: idb :: Executing blocking SSH command: touch /tmp/daniel [ERROR] 2017-09-14 13:45:33 :: idb :: undefined method `exec!' for nil:NilClass ```
RishabhTayal commented 7 years ago

Does idb needs to have the device jailbroken?