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 crashes when I try to connect to my Jailbroken device by tapping on "Connect to USB/ssh device" from UI #88

Open brajbong opened 7 years ago

brajbong commented 7 years ago

idb crashes when I try to connect to my Jailbroken device by tapping on "Connect to USB/ssh device" from UI. Machine is running macOS Sierra and iPhone is running iOS8.1. Please note that I can successfully ssh to the phone from my Mac using the Terminal app.


[DEBUG] 2017-04-06 12:55:22 :: idb ::  Using port 62500 for SSH forwarding
[INFO] 2017-04-06 12:55:22 :: idb ::  Launching SSH proxy on port 62500
waiting for connection
[INFO] 2017-04-06 12:55:24 :: idb ::  Establishing SSH Session for root@localhost:62500
accepted connection, fd = 4
waiting for connection
Number of available devices == 1
Requesting connecion to device handle == 4 (serial: 9e0ca2a9969e46e90282b55eaf45dcdad9872d9e), port 22
run_ctos_loop: fd = 4
run_stoc_loop: fd = 4
[INFO] 2017-04-06 12:55:24 :: idb ::  Establishing SFTP Session...
[DEBUG] 2017-04-06 12:55:24 :: idb ::  opening port 62500 for manual ssh connection
[INFO] 2017-04-06 12:55:24 :: idb ::  Launching SSH proxy on port 2222
[DEBUG] 2017-04-06 12:55:24 :: idb ::  opening tool port 62503 for internal ssh connection
[INFO] 2017-04-06 12:55:24 :: idb ::  Launching SSH proxy on port 62503
bind(): Address already in use
Error creating socket: Address already in use
waiting for connection
[INFO] 2017-04-06 12:55:24 :: idb ::  iOS Version: 8 with apps dir: /private/var/mobile/Containers/Bundle/Application and data dir: /private/var/mobile/Containers/Data/Application
[INFO] 2017-04-06 12:55:24 :: idb ::  Checking if aptget is installed...
[INFO] 2017-04-06 12:55:24 :: idb ::  aptget found at /usr/bin/apt-get.
[INFO] 2017-04-06 12:55:24 :: idb ::  Checking if open is installed...
[WARN] 2017-04-06 12:55:24 :: idb ::  open not found.
Y
[INFO] 2017-04-06 12:55:24 :: idb ::  Device not seen before. Opening status page.
/usr/local/lib/ruby/gems/2.4.0/gems/idb-2.9.1/lib/idb.rb:216: warning: toplevel constant Warning referenced by Qt::MessageBox::Warning
/usr/local/lib/ruby/gems/2.4.0/gems/idb-2.9.1/lib/idb.rb:216:in `method_missing': no implicit conversion of Module into Integer (TypeError)
    from /usr/local/lib/ruby/gems/2.4.0/gems/idb-2.9.1/lib/idb.rb:216:in `block in menu'
    from /usr/local/lib/ruby/gems/2.4.0/gems/qtbindings-4.8.6.3/lib/Qt/qtruby4.rb:2470:in `invoke'
    from /usr/local/lib/ruby/gems/2.4.0/gems/idb-2.9.1/lib/idb.rb:103:in `qt_metacall'
    from /usr/local/lib/ruby/gems/2.4.0/gems/idb-2.9.1/lib/idb.rb:103:in `method_missing'
    from /usr/local/lib/ruby/gems/2.4.0/gems/idb-2.9.1/lib/idb.rb:103:in `block in init_ui'
    from /usr/local/lib/ruby/gems/2.4.0/gems/qtbindings-4.8.6.3/lib/Qt/qtruby4.rb:2470:in `invoke'
    from /usr/local/lib/ruby/gems/2.4.0/gems/idb-2.9.1/lib/gui/device_info_group_box.rb:22:in `qt_metacall'
    from /usr/local/lib/ruby/gems/2.4.0/gems/idb-2.9.1/lib/gui/device_info_group_box.rb:22:in `connect_clicked'
    from /usr/local/lib/ruby/gems/2.4.0/gems/idb-2.9.1/lib/gui/device_info_group_box.rb:22:in `block in initialize'
    from /usr/local/lib/ruby/gems/2.4.0/gems/qtbindings-4.8.6.3/lib/Qt/qtruby4.rb:2470:in `invoke'
    from /usr/local/lib/ruby/gems/2.4.0/gems/qtbindings-4.8.6.3/lib/Qt/qtruby4.rb:479:in `qt_metacall'
    from /usr/local/lib/ruby/gems/2.4.0/gems/qtbindings-4.8.6.3/lib/Qt/qtruby4.rb:479:in `method_missing'
    from /usr/local/lib/ruby/gems/2.4.0/gems/qtbindings-4.8.6.3/lib/Qt/qtruby4.rb:479:in `exec'
    from /usr/local/lib/ruby/gems/2.4.0/gems/idb-2.9.1/lib/idb.rb:278:in `run'
    from /usr/local/lib/ruby/gems/2.4.0/gems/idb-2.9.1/bin/idb:4:in `<top (required)>'
    from /usr/local/bin/idb:22:in `load'
    from /usr/local/bin/idb:22:in `<main>'
recv failed: Resource temporarily unavailable
[INFO] 2017-04-06 12:55:24 :: port_forward ::  Loading configuration from /Users/brajbongshi/.idb/settings.yml
[DEBUG] 2017-04-06 12:55:24 :: port_forward ::  Connecting via USB
[DEBUG] 2017-04-06 12:55:24 :: port_forward ::  Using port 62504 for SSH forwarding
[INFO] 2017-04-06 12:55:24 :: port_forward ::  Launching SSH proxy on port 62504
[INFO] 2017-04-06 12:55:24 :: port_forward :: Establishing SSH port forwarding...
waiting for connection
accepted connection, fd = 4
waiting for connection
Number of available devices == 1
Requesting connecion to device handle == 4 (serial: 9e0ca2a9969e46e90282b55eaf45dcdad9872d9e), port 22
run_ctos_loop: fd = 4
run_stoc_loop: fd = 4
[INFO] 2017-04-06 12:55:24 :: port_forward :: Setting up port forwarding...
[INFO] 2017-04-06 12:55:24 :: port_forward ::  - Forwarding remote:4711 -> localhost:4711
/usr/local/lib/ruby/gems/2.4.0/gems/net-ssh-4.1.0/lib/net/ssh/service/forward.rb:179:in `block in remote': remote forwarding request failed (Net::SSH::Exception)
    from /usr/local/lib/ruby/gems/2.4.0/gems/net-ssh-4.1.0/lib/net/ssh/connection/session.rb:596:in `request_failure'
    from /usr/local/lib/ruby/gems/2.4.0/gems/net-ssh-4.1.0/lib/net/ssh/connection/session.rb:540:in `dispatch_incoming_packets'
    from /usr/local/lib/ruby/gems/2.4.0/gems/net-ssh-4.1.0/lib/net/ssh/connection/session.rb:237:in `ev_preprocess'
    from /usr/local/lib/ruby/gems/2.4.0/gems/net-ssh-4.1.0/lib/net/ssh/connection/event_loop.rb:99:in `each'
    from /usr/local/lib/ruby/gems/2.4.0/gems/net-ssh-4.1.0/lib/net/ssh/connection/event_loop.rb:99:in `ev_preprocess'
    from /usr/local/lib/ruby/gems/2.4.0/gems/net-ssh-4.1.0/lib/net/ssh/connection/event_loop.rb:27:in `process'
    from /usr/local/lib/ruby/gems/2.4.0/gems/net-ssh-4.1.0/lib/net/ssh/connection/session.rb:216:in `process'
    from /usr/local/lib/ruby/gems/2.4.0/gems/net-ssh-4.1.0/lib/net/ssh/connection/session.rb:178:in `block in loop'
    from /usr/local/lib/ruby/gems/2.4.0/gems/net-ssh-4.1.0/lib/net/ssh/connection/session.rb:178:in `loop'
    from /usr/local/lib/ruby/gems/2.4.0/gems/net-ssh-4.1.0/lib/net/ssh/connection/session.rb:178:in `loop'
    from /usr/local/lib/ruby/gems/2.4.0/gems/idb-2.9.1/lib/lib/ssh_port_forwarder.rb:29:in `start'
    from /usr/local/lib/ruby/gems/2.4.0/gems/idb-2.9.1/lib/helper/ssh_port_forwarder.rb:58:in `run'
    from /usr/local/lib/ruby/gems/2.4.0/gems/idb-2.9.1/lib/helper/ssh_port_forwarder.rb:63:in `<module:Idb>'
    from /usr/local/lib/ruby/gems/2.4.0/gems/idb-2.9.1/lib/helper/ssh_port_forwarder.rb:7:in `<main>'
recv failed: Resource temporarily unavailable```
dmayer commented 7 years ago

Can you try removing any SSH forwardings from the settings? Also, please make sure you are not SSH'd into the device from the terminal at the same time. Aside from the SSH error there seems to b another bug there when opening the status dialog. I will check that out.