kippo icon indicating copy to clipboard operation
kippo copied to clipboard

Unhandle Error - exceptions.ValueError: CTR mode needs counter parameter, not IV

Open xStevex opened this issue 5 years ago • 1 comments

Ubuntu: 18.04 Yes, I have installed pycrypto

test@ubuntu:~/Downloads/kippo-master$ pip2 install pycrypto Requirement already satisfied: pycrypto in /usr/lib/python2.7/dist-packages (2.6.1)

2020-02-13 12:40:34-0800 [kippo.core.ssh.HoneyPotSSHFactory] New connection: 192.168.31.116:51546 (192.168.31.75:2222) [session: 2]
2020-02-13 12:40:34-0800 [HoneyPotTransport,2,192.168.31.116] Remote SSH version: SSH-2.0-PuTTY_Release_0.71
2020-02-13 12:40:34-0800 [HoneyPotTransport,2,192.168.31.116] kex alg, key alg: diffie-hellman-group-exchange-sha1 ssh-rsa
2020-02-13 12:40:34-0800 [HoneyPotTransport,2,192.168.31.116] outgoing: aes256-ctr hmac-sha1 none
2020-02-13 12:40:34-0800 [HoneyPotTransport,2,192.168.31.116] incoming: aes256-ctr hmac-sha1 none
2020-02-13 12:40:34-0800 [HoneyPotTransport,2,192.168.31.116] Unhandled Error
	Traceback (most recent call last):
	  File "/home/test/.local/lib/python2.7/site-packages/twisted/python/log.py", line 88, in callWithLogger
	    return callWithContext({"system": lp}, func, *args, **kw)
	  File "/home/test/.local/lib/python2.7/site-packages/twisted/python/log.py", line 73, in callWithContext
	    return context.call({ILogContext: newCtx}, func, *args, **kw)
	  File "/home/test/.local/lib/python2.7/site-packages/twisted/python/context.py", line 118, in callWithContext
	    return self.currentContext().callWithContext(ctx, func, *args, **kw)
	  File "/home/test/.local/lib/python2.7/site-packages/twisted/python/context.py", line 81, in callWithContext
	    return func(*args,**kw)
	--- <exception caught here> ---
	  File "/home/test/.local/lib/python2.7/site-packages/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
	    why = selectable.doRead()
	  File "/home/test/.local/lib/python2.7/site-packages/twisted/internet/tcp.py", line 209, in doRead
	    return self._dataReceived(data)
	  File "/home/test/.local/lib/python2.7/site-packages/twisted/internet/tcp.py", line 215, in _dataReceived
	    rval = self.protocol.dataReceived(data)
	  File "/home/test/Downloads/kippo-master/kippo/core/ssh.py", line 170, in dataReceived
	    transport.SSHServerTransport.dataReceived(self, data)
	  File "/home/test/.local/lib/python2.7/site-packages/twisted/conch/ssh/transport.py", line 461, in dataReceived
	    self.dispatchMessage(messageNum, packet[1:])
	  File "/home/test/.local/lib/python2.7/site-packages/twisted/conch/ssh/transport.py", line 476, in dispatchMessage
	    f(payload)
	  File "/home/test/.local/lib/python2.7/site-packages/twisted/conch/ssh/transport.py", line 1038, in ssh_KEX_DH_GEX_INIT
	    self._keySetup(sharedSecret, exchangeHash)
	  File "/home/test/.local/lib/python2.7/site-packages/twisted/conch/ssh/transport.py", line 756, in _keySetup
	    outs[2], ins[2])
	  File "/home/test/.local/lib/python2.7/site-packages/twisted/conch/ssh/transport.py", line 1430, in setKeys
	    o = self._getCipher(self.outCipType, outIV, outKey)
	  File "/home/test/.local/lib/python2.7/site-packages/twisted/conch/ssh/transport.py", line 1456, in _getCipher
	    counter=_Counter(iv, mod.block_size))
	  File "/usr/lib/python2.7/dist-packages/Crypto/Cipher/AES.py", line 94, in new
	    return AESCipher(key, *args, **kwargs)
	  File "/usr/lib/python2.7/dist-packages/Crypto/Cipher/AES.py", line 59, in __init__
	    blockalgo.BlockAlgo.__init__(self, _AES, key, *args, **kwargs)
	  File "/usr/lib/python2.7/dist-packages/Crypto/Cipher/blockalgo.py", line 141, in __init__
	    self._cipher = factory.new(key, *args, **kwargs)
	exceptions.ValueError: CTR mode needs counter parameter, not IV
	
2020-02-13 12:40:34-0800 [HoneyPotTransport,2,192.168.31.116] connection lost

xStevex avatar Feb 13 '20 20:02 xStevex

hello mabey you nedd install 2.6.0 pycrypto pip install pycrypto==2.6.0

gdzjzhang avatar Jan 24 '22 10:01 gdzjzhang