{"action":"created","issue":{"url":"https://api.github.com/repos/mwrlabs/needle/issues/137","repository_url":"https://api.github.com/repos/mwrlabs/needle","labels_url":"https://api.github.com/repos/mwrlabs/needle/issues/137/labels{/name}","comments_url":"https://api.github.com/repos/mwrlabs/needle/issues/137/comments","events_url":"https://api.github.com/repos/mwrlabs/needle/issues/137/events","html_url":"https://github.com/mwrlabs/needle/issues/137","id":214038156,"number":137,"title":"Telnet connection closed","user":{"login":"kryptoknight13","id":19758941,"avatar_url":"https://avatars3.githubusercontent.com/u/19758941?v=3","gravatar_id":"","url":"https://api.github.com/users/kryptoknight13","html_url":"https://github.com/kryptoknight13","followers_url":"https://api.github.com/users/kryptoknight13/followers","following_url":"https://api.github.com/users/kryptoknight13/following{/other_user}","gists_url":"https://api.github.com/users/kryptoknight13/gists{/gist_id}","starred_url":"https://api.github.com/users/kryptoknight13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kryptoknight13/subscriptions","organizations_url":"https://api.github.com/users/kryptoknight13/orgs","repos_url":"https://api.github.com/users/kryptoknight13/repos","events_url":"https://api.github.com/users/kryptoknight13/events{/privacy}","received_events_url":"https://api.github.com/users/kryptoknight13/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-14T11:09:18Z","updated_at":"2017-03-14T11:18:36Z","closed_at":null,"body":"## Issue\r\nAfter updating the Needle Framework with latest updates on repository, i observe \"Telnet connection closed\" while trying to run any module.\r\n\r\n### Expected behaviour\r\nWizard should be displayed in order to select the app.\r\n\r\n### Actual behaviour\r\n[needle] > use binary/info/checksums\r\n[needle][checksums] > run\r\n[*] Checking connection with device...\r\n[V] Connection not present, creating a new instance\r\n[V] [AGENT] Connecting to agent (127.0.0.1:4444)...\r\n[+] [AGENT] Successfully connected to agent (127.0.0.1:4444)...\r\n[V] [SSH] Connecting (127.0.0.1:2224)...\r\n[+] [SSH] Connected (127.0.0.1:2224)\r\n[*] Target app not selected. Launching wizard...\r\n[!] EOFError: telnet connection closed.\r\n\r\n### Steps to reproduce\r\n1. launch needle agent on device and start listening by turning it on.\r\n2. launch needle framework on machine ( IP -> 127.0.0.1, PORT->2224, PASSWORD->default pwd, VERBOSE->true, DEBUG->true)\r\n3. use binary/info/checksums \r\n4. run\r\n\r\n### needle error logs\r\nEnsure verbose and debug mode are enabled:\r\n```\r\n[needle] > set VERBOSE True\r\nVERBOSE => True\r\n[needle] > set DEBUG True\r\nDEBUG => True\r\n```\r\n\r\n## Environment\r\n\r\n#### Workstation Operating System\r\nOSX 10.11.6\r\n#### Python Version\r\nPython 2.7.11\r\n#### Python Packages (`pip freeze`)\r\npip\r\n#### Device iOS Version\r\n9.1"},"comment":{"url":"https://api.github.com/repos/mwrlabs/needle/issues/comments/286392068","html_url":"https://github.com/mwrlabs/needle/issues/137#issuecomment-286392068","issue_url":"https://api.github.com/repos/mwrlabs/needle/issues/137","id":286392068,"user":{"login":"kryptoknight13","id":19758941,"avatar_url":"https://avatars3.githubusercontent.com/u/19758941?v=3","gravatar_id":"","url":"https://api.github.com/users/kryptoknight13","html_url":"https://github.com/kryptoknight13","followers_url":"https://api.github.com/users/kryptoknight13/followers","following_url":"https://api.github.com/users/kryptoknight13/following{/other_user}","gists_url":"https://api.github.com/users/kryptoknight13/gists{/gist_id}","starred_url":"https://api.github.com/users/kryptoknight13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kryptoknight13/subscriptions","organizations_url":"https://api.github.com/users/kryptoknight13/orgs","repos_url":"https://api.github.com/users/kryptoknight13/repos","events_url":"https://api.github.com/users/kryptoknight13/events{/privacy}","received_events_url":"https://api.github.com/users/kryptoknight13/received_events","type":"User","site_admin":false},"created_at":"2017-03-14T11:18:36Z","updated_at":"2017-03-14T11:18:36Z","body":"again re-running, got below error:\r\n\r\n\r\n[needle] > use binary/info/checksums\r\n[needle][checksums] > run\r\n[D] Setup local output folder: /Users/akanksha.bana/.needle/output\r\n[*] Checking connection with device...\r\n[V] Connection not present, creating a new instance\r\n[D] Setting up USB port forwarding on port 2224\r\n[D] [LOCAL CMD] Local Subprocess Command: /Users/akanksha.bana/Desktop/needle/needle/needle/libs/usbmuxd/tcprelay.py -t 22:2224\r\n[D] [AGENT] Setting up port forwarding on port 4444\r\n[!] Problem establishing connection: IndexError - tuple index out of range .\r\n------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/Users/akanksha.bana/Desktop/needle/needle/needle/core/framework/framework.py\", line 616, in _connection_new\r\n    self.device.connect()\r\n  File \"/Users/akanksha.bana/Desktop/needle/needle/needle/core/device/device.py\", line 214, in connect\r\n    self._portforward_agent_start()\r\n  File \"/Users/akanksha.bana/Desktop/needle/needle/needle/core/device/device.py\", line 149, in _portforward_agent_start\r\n    self._port_forward_agent.start()\r\n  File \"/Library/Python/2.7/site-packages/sshtunnel.py\", line 1221, in start\r\n    self._create_tunnels()\r\n  File \"/Library/Python/2.7/site-packages/sshtunnel.py\", line 1082, in _create_tunnels\r\n    msg = 'Problem setting SSH Forwarder up: {0}'.format(e.args[0])\r\nIndexError: tuple index out of range\r\n------------------------------------------------------------\r\n[!] IndexError: tuple index out of range.\r\n[V] [SSH] Disconnecting...\r\n[V] [AGENT] Disconnecting from agent...\r\n[D] Stopping USB port forwarding\r\n[D] [LOCAL CMD] Stopping Local Subprocess Command [pid: 84064]\r\n[D] [AGENT] Stopping port forwarding\r\n\r\n\r\n\r\n\r\n###settings done:\r\npython needle.py \r\n\r\n             __   _ _______ _______ ______         _______\r\n             | \\  | |______ |______ |     \\ |      |______\r\n             |  \\_| |______ |______ |_____/ |_____ |______\r\n        \r\n                   Needle v1.0.0 [mwr.to/needle]                  \r\n  [MWR InfoSecurity (@MWRLabs) - Marco Lancini (@LanciniMarco)]   \r\n\r\n[needle] > set PORT 2224\r\nPORT => 2224\r\n[needle] > set IP 127.0.0.1\r\nIP => 127.0.0.1\r\n[needle] > set PASSWORD alpine\r\nPASSWORD => ********\r\n[needle] > set VERBOSE true\r\nVERBOSE => true\r\n[needle] > set DEBUG true\r\nDEBUG => true\r\n[needle] > show options\r\n\r\n  Name            Current Value                        Required  Description\r\n  --------------  -------------                        --------  -----------\r\n  AGENT_PORT      4444                                 yes       Port on which the Needle Agent is listening\r\n  APP                                                  no        Bundle ID of the target application (e.g., com.example.app). Leave empty to launch wizard\r\n  DEBUG           True                                 yes       Enable debugging output\r\n  IP              127.0.0.1                            yes       IP address of the testing device (set to localhost to use USB)\r\n  OUTPUT_FOLDER   /Users/akanksha.bana/.needle/output  yes       Full path of the output folder, where to store the output of the modules\r\n  PASSWORD        ********                             yes       SSH Password of the testing device\r\n  PORT            2224                                 yes       Port of the SSH agent on the testing device (needs to be != 22 to use USB)\r\n  PUB_KEY_AUTH    True                                 yes       Use public key auth to authenticate to the device. Key must be present in the ssh-agent if a passphrase is used\r\n  SAVE_HISTORY    True                                 yes       Persists command history across sessions\r\n  SETUP_DEVICE    False                                yes       Set to true to enable auto-configuration of the device (installation of all the tools needed)\r\n  USERNAME        root                                 yes       SSH Username of the testing device\r\n  VERBOSE         True                                 yes       Enable verbose output\r\n\r\n"}}
{"actor":{"display_login":"kryptoknight13"}}