citronneur / rdpy

Remote Desktop Protocol in Twisted Python
GNU General Public License v3.0
1.68k stars 544 forks source link

Unhandled Error in rdpy-rdphoneypot.py #25

Closed ztgrace closed 9 years ago

ztgrace commented 9 years ago

Hi,

Cool project, love the idea. I was testing out the rdpy-rdphoneypot.py and I've encountered the following errors when testing with hydra and ncrack. I'm running Ubuntu 12.04.5 LTS and Python 2.7.3. Please let me know if you need any more info.

Thanks, Zach

Here's the stack trace when I test with Hydra:

Unhandled Error
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/Twisted-15.0.0-py2.7-linux-x86_64.egg/twisted/python/log.py", line 88, in callWithLogger
    return callWithContext({"system": lp}, func, *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/Twisted-15.0.0-py2.7-linux-x86_64.egg/twisted/python/log.py", line 73, in callWithContext
    return context.call({ILogContext: newCtx}, func, *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/Twisted-15.0.0-py2.7-linux-x86_64.egg/twisted/python/context.py", line 118, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/Twisted-15.0.0-py2.7-linux-x86_64.egg/twisted/python/context.py", line 81, in callWithContext
    return func(*args,**kw)
--- <exception caught here> ---
  File "/usr/local/lib/python2.7/dist-packages/Twisted-15.0.0-py2.7-linux-x86_64.egg/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
    why = selectable.doRead()
  File "/usr/local/lib/python2.7/dist-packages/Twisted-15.0.0-py2.7-linux-x86_64.egg/twisted/internet/tcp.py", line 215, in doRead
    return self._dataReceived(data)
  File "/usr/local/lib/python2.7/dist-packages/Twisted-15.0.0-py2.7-linux-x86_64.egg/twisted/internet/tcp.py", line 221, in _dataReceived
    rval = self.protocol.dataReceived(data)
  File "/usr/local/lib/python2.7/dist-packages/rdpy-1.3.0-py2.7-linux-x86_64.egg/rdpy/core/layer.py", line 209, in dataReceived
    self.recv(expectedData)
  File "/usr/local/lib/python2.7/dist-packages/rdpy-1.3.0-py2.7-linux-x86_64.egg/rdpy/protocol/rdp/tpkt.py", line 195, in readData
    self._presentation.recv(data)
  File "/usr/local/lib/python2.7/dist-packages/rdpy-1.3.0-py2.7-linux-x86_64.egg/rdpy/protocol/rdp/x224.py", line 147, in recvData
    data.readType(header)
  File "/usr/local/lib/python2.7/dist-packages/rdpy-1.3.0-py2.7-linux-x86_64.egg/rdpy/core/type.py", line 897, in readType
    value.read(self)
  File "/usr/local/lib/python2.7/dist-packages/rdpy-1.3.0-py2.7-linux-x86_64.egg/rdpy/core/type.py", line 97, in read
    self.__read__(s)
  File "/usr/local/lib/python2.7/dist-packages/rdpy-1.3.0-py2.7-linux-x86_64.egg/rdpy/core/type.py", line 477, in __read__
    raise e
rdpy.core.error.InvalidExpectedDataException: <class 'rdpy.core.type.UInt8'> const value expected 240 != 128

Here's the stack trace from ncrack:

Unhandled Error
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/Twisted-15.0.0-py2.7-linux-x86_64.egg/twisted/python/log.py", line 88, in callWithLogger
    return callWithContext({"system": lp}, func, *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/Twisted-15.0.0-py2.7-linux-x86_64.egg/twisted/python/log.py", line 73, in callWithContext
    return context.call({ILogContext: newCtx}, func, *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/Twisted-15.0.0-py2.7-linux-x86_64.egg/twisted/python/context.py", line 118, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/Twisted-15.0.0-py2.7-linux-x86_64.egg/twisted/python/context.py", line 81, in callWithContext
    return func(*args,**kw)
--- <exception caught here> ---
  File "/usr/local/lib/python2.7/dist-packages/Twisted-15.0.0-py2.7-linux-x86_64.egg/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
    why = selectable.doRead()
  File "/usr/local/lib/python2.7/dist-packages/Twisted-15.0.0-py2.7-linux-x86_64.egg/twisted/internet/tcp.py", line 215, in doRead
    return self._dataReceived(data)
  File "/usr/local/lib/python2.7/dist-packages/Twisted-15.0.0-py2.7-linux-x86_64.egg/twisted/internet/tcp.py", line 221, in _dataReceived
    rval = self.protocol.dataReceived(data)
  File "/usr/local/lib/python2.7/dist-packages/rdpy-1.3.0-py2.7-linux-x86_64.egg/rdpy/core/layer.py", line 209, in dataReceived
    self.recv(expectedData)
  File "/usr/local/lib/python2.7/dist-packages/rdpy-1.3.0-py2.7-linux-x86_64.egg/rdpy/protocol/rdp/tpkt.py", line 195, in readData
    self._presentation.recv(data)
  File "/usr/local/lib/python2.7/dist-packages/rdpy-1.3.0-py2.7-linux-x86_64.egg/rdpy/protocol/rdp/x224.py", line 148, in recvData
    self._presentation.recv(data)
  File "/usr/local/lib/python2.7/dist-packages/rdpy-1.3.0-py2.7-linux-x86_64.egg/rdpy/protocol/rdp/t125/mcs.py", line 544, in recvErectDomainRequest
    per.readInteger(data)
  File "/usr/local/lib/python2.7/dist-packages/rdpy-1.3.0-py2.7-linux-x86_64.egg/rdpy/protocol/rdp/t125/per.py", line 144, in readInteger
    raise InvalidValue("invalid integer size %d"%size)
rdpy.core.error.InvalidValue: invalid integer size 0
citronneur commented 9 years ago

Hello Sorry but ncrack and hydra are based on rdesktop which not respect the rdp protocol specification. Sorry!

ztgrace commented 9 years ago

Understandable stance, but limits the effectiveness of the honeypot.