{"action":"created","issue":{"url":"https://api.github.com/repos/micheloosterhof/cowrie/issues/178","repository_url":"https://api.github.com/repos/micheloosterhof/cowrie","labels_url":"https://api.github.com/repos/micheloosterhof/cowrie/issues/178/labels{/name}","comments_url":"https://api.github.com/repos/micheloosterhof/cowrie/issues/178/comments","events_url":"https://api.github.com/repos/micheloosterhof/cowrie/issues/178/events","html_url":"https://github.com/micheloosterhof/cowrie/issues/178","id":157684901,"number":178,"title":"Unhandled error in Deferred","user":{"login":"mrseeker","id":1099127,"avatar_url":"https://avatars.githubusercontent.com/u/1099127?v=3","gravatar_id":"","url":"https://api.github.com/users/mrseeker","html_url":"https://github.com/mrseeker","followers_url":"https://api.github.com/users/mrseeker/followers","following_url":"https://api.github.com/users/mrseeker/following{/other_user}","gists_url":"https://api.github.com/users/mrseeker/gists{/gist_id}","starred_url":"https://api.github.com/users/mrseeker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrseeker/subscriptions","organizations_url":"https://api.github.com/users/mrseeker/orgs","repos_url":"https://api.github.com/users/mrseeker/repos","events_url":"https://api.github.com/users/mrseeker/events{/privacy}","received_events_url":"https://api.github.com/users/mrseeker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2016-05-31T14:25:24Z","updated_at":"2016-06-02T22:15:31Z","closed_at":null,"body":"Got an error related to cowrie, most likely due to a connection being handled wrong:\r\n\r\n```\r\n2016-05-31T14:02:08+0200 [twisted.internet.defer#critical] Unhandled error in Deferred:\r\n \r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python2.7/dist-packages/twisted/internet/tcp.py\", line 293, in connectionLost\r\n    protocol.connectionLost(reason)\r\n  File \"/usr/local/lib/python2.7/dist-packages/twisted/web/client.py\", line 222, in connectionLost\r\n    self.factory._disconnectedDeferred.callback(None)\r\n  File \"/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py\", line 393, in callback\r\n    self._startRunCallbacks(result)\r\n  File \"/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py\", line 501, in _startRunCallbacks\r\n    self._runCallbacks()\r\n--- <exception caught here> ---\r\n  File \"/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py\", line 588, in _runCallbacks\r\n    current.result = callback(current.result, *args, **kw)\r\nexceptions.TypeError: errReceived() takes exactly 2 arguments (3 given)\r\n```\r\nThe most likely cause of this issue can be found in core/honeypot.py:488\r\n`def errReceived(self, data):`"},"comment":{"url":"https://api.github.com/repos/micheloosterhof/cowrie/issues/comments/223438976","html_url":"https://github.com/micheloosterhof/cowrie/issues/178#issuecomment-223438976","issue_url":"https://api.github.com/repos/micheloosterhof/cowrie/issues/178","id":223438976,"user":{"login":"mrseeker","id":1099127,"avatar_url":"https://avatars.githubusercontent.com/u/1099127?v=3","gravatar_id":"","url":"https://api.github.com/users/mrseeker","html_url":"https://github.com/mrseeker","followers_url":"https://api.github.com/users/mrseeker/followers","following_url":"https://api.github.com/users/mrseeker/following{/other_user}","gists_url":"https://api.github.com/users/mrseeker/gists{/gist_id}","starred_url":"https://api.github.com/users/mrseeker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrseeker/subscriptions","organizations_url":"https://api.github.com/users/mrseeker/orgs","repos_url":"https://api.github.com/users/mrseeker/repos","events_url":"https://api.github.com/users/mrseeker/events{/privacy}","received_events_url":"https://api.github.com/users/mrseeker/received_events","type":"User","site_admin":false},"created_at":"2016-06-02T22:15:31Z","updated_at":"2016-06-02T22:15:31Z","body":"Well, I found out how to get the error consistently:\r\n\r\nDownload a big file and drop the connection while its being downloaded, that will generate a constant error.\r\n\r\n```\r\n2016-06-02 18:09:33-0400 [cowrie.ssh.transport.HoneyPotSSHFactory] New connection: 86.94.xxx.xxx:9385 (198.100.xxx.xxx:2222) [session: b1c92e15]\r\n2016-06-02 18:09:33-0400 [HoneyPotTransport,5,86.94.xxx.xxx] Remote SSH version: SSH-2.0-PuTTY_Release_0.63\r\n2016-06-02 18:09:33-0400 [HoneyPotTransport,5,86.94.xxx.xxx] kex alg, key alg: diffie-hellman-group-exchange-sha1 ssh-rsa\r\n2016-06-02 18:09:33-0400 [HoneyPotTransport,5,86.94.xxx.xxx] outgoing: aes256-ctr hmac-sha1 none\r\n2016-06-02 18:09:33-0400 [HoneyPotTransport,5,86.94.xxx.xxx] incoming: aes256-ctr hmac-sha1 none\r\n2016-06-02 18:09:36-0400 [HoneyPotTransport,5,86.94.xxx.xxx] NEW KEYS\r\n2016-06-02 18:09:36-0400 [HoneyPotTransport,5,86.94.xxx.xxx] starting service ssh-userauth\r\n2016-06-02 18:09:38-0400 [SSHService ssh-userauth on HoneyPotTransport,5,86.94.xxx.xxx] root trying auth none\r\n2016-06-02 18:09:38-0400 [SSHService ssh-userauth on HoneyPotTransport,5,86.94.xxx.xxx] root trying auth keyboard-interactive\r\n2016-06-02 18:09:44-0400 [SSHService ssh-userauth on HoneyPotTransport,5,86.94.xxx.xxx] login attempt [root/ocsal] succeeded\r\n2016-06-02 18:09:45-0400 [SSHService ssh-userauth on HoneyPotTransport,5,86.94.xxx.xxx] root authenticated with keyboard-interactive\r\n2016-06-02 18:09:45-0400 [SSHService ssh-userauth on HoneyPotTransport,5,86.94.xxx.xxx] starting service ssh-connection\r\n2016-06-02 18:09:45-0400 [SSHService ssh-connection on HoneyPotTransport,5,86.94.xxx.xxx] got channel session request\r\n2016-06-02 18:09:45-0400 [SSHChannel session (0) on SSHService ssh-connection on HoneyPotTransport,5,86.94.xxx.xxx] channel open\r\n2016-06-02 18:09:45-0400 [SSHChannel session (0) on SSHService ssh-connection on HoneyPotTransport,5,86.94.xxx.xxx] pty request: xterm (24, 80, 0, 0)\r\n2016-06-02 18:09:45-0400 [SSHChannel session (0) on SSHService ssh-connection on HoneyPotTransport,5,86.94.xxx.xxx] Terminal Size: 24 80\r\n2016-06-02 18:09:45-0400 [SSHChannel session (0) on SSHService ssh-connection on HoneyPotTransport,5,86.94.xxx.xxx] getting shell\r\n2016-06-02 18:09:45-0400 [SSHChannel session (0) on SSHService ssh-connection on HoneyPotTransport,5,86.94.xxx.xxx] Opening TTY Log: log/tty/20160602-180945-b1c92e15-0i.log\r\n2016-06-02 18:09:51-0400 [SSHChannel session (0) on SSHService ssh-connection on HoneyPotTransport,5,86.94.xxx.xxx] CMD: wget http://ipv4.download.thinkbroadband.com/10MB.zip\r\n2016-06-02 18:09:51-0400 [SSHChannel session (0) on SSHService ssh-connection on HoneyPotTransport,5,86.94.xxx.xxx] Command found: wget http://ipv4.download.thinkbroadband.com/10MB.zip\r\n2016-06-02 18:09:51-0400 [SSHChannel session (0) on SSHService ssh-connection on HoneyPotTransport,5,86.94.xxx.xxx] Starting factory <HTTPProgressDownloader: http://ipv4.download.thinkbroadband.com/10MB.zip>\r\n2016-06-02 18:09:55-0400 [SSHChannel session (0) on SSHService ssh-connection on HoneyPotTransport,5,86.94.xxx.xxx] Closing TTY Log: log/tty/20160602-180945-b1c92e15-0i.log after 10 seconds\r\n2016-06-02 18:09:55-0400 [SSHChannel session (0) on SSHService ssh-connection on HoneyPotTransport,5,86.94.xxx.xxx] honeypot terminal protocol connection lost disconnected\r\n2016-06-02 18:09:55-0400 [HoneyPotTransport,5,86.94.xxx.xxx] avatar root logging out\r\n2016-06-02 18:09:55-0400 [HoneyPotTransport,5,86.94.xxx.xxx] connection lost\r\n2016-06-02 18:09:55-0400 [HoneyPotTransport,5,86.94.xxx.xxx] Connection lost after 21 seconds\r\n2016-06-02 18:09:55-0400 [HTTPPageDownloader,client] Unhandled Error\r\n        Traceback (most recent call last):\r\n          File \"/usr/lib/python2.7/dist-packages/twisted/python/log.py\", line 88, in callWithLogger\r\n            return callWithContext({\"system\": lp}, func, *args, **kw)\r\n          File \"/usr/lib/python2.7/dist-packages/twisted/python/log.py\", line 73, in callWithContext\r\n            return context.call({ILogContext: newCtx}, func, *args, **kw)\r\n          File \"/usr/lib/python2.7/dist-packages/twisted/python/context.py\", line 118, in callWithContext\r\n            return self.currentContext().callWithContext(ctx, func, *args, **kw)\r\n          File \"/usr/lib/python2.7/dist-packages/twisted/python/context.py\", line 81, in callWithContext\r\n            return func(*args,**kw)\r\n        --- <exception caught here> ---\r\n          File \"/usr/lib/python2.7/dist-packages/twisted/internet/posixbase.py\", line 614, in _doReadOrWrite\r\n            why = selectable.doRead()\r\n          File \"/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py\", line 215, in doRead\r\n            return self._dataReceived(data)\r\n          File \"/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py\", line 221, in _dataReceived\r\n            rval = self.protocol.dataReceived(data)\r\n          File \"/usr/lib/python2.7/dist-packages/twisted/protocols/basic.py\", line 578, in dataReceived\r\n            why = self.rawDataReceived(data)\r\n          File \"/usr/lib/python2.7/dist-packages/twisted/web/http.py\", line 518, in rawDataReceived\r\n            self.handleResponsePart(data)\r\n          File \"/usr/lib/python2.7/dist-packages/twisted/web/client.py\", line 249, in handleResponsePart\r\n            self.factory.pagePart(data)\r\n          File \"/home/julius/cowrie/cowrie-master/cowrie/commands/wget.py\", line 285, in pagePart\r\n            self.wget.write(s.ljust(self.proglen))\r\n          File \"/home/julius/cowrie/cowrie-master/cowrie/core/honeypot.py\", line 485, in outReceived\r\n            self.protocol.terminal.write(data)\r\n        exceptions.AttributeError: 'NoneType' object has no attribute 'write'\r\n\r\n2016-06-02 18:09:55-0400 [HTTPPageDownloader,client] Stopping factory <HTTPProgressDownloader: http://ipv4.download.thinkbroadband.com/10MB.zip>\r\n\r\n```"}}
{"actor":{"display_login":"mrseeker"}}