mirror of
https://github.com/cowrie/cowrie.git
synced 2025-07-01 18:07:27 -04:00
log ssh public key fingerpint in json log
This commit is contained in:
@ -30,6 +30,7 @@ class HoneypotPublicKeyChecker:
|
|||||||
def requestAvatarId(self, credentials):
|
def requestAvatarId(self, credentials):
|
||||||
_pubKey = keys.Key.fromString(credentials.blob)
|
_pubKey = keys.Key.fromString(credentials.blob)
|
||||||
log.msg(format='public key attempt for user %(username)s with fingerprint %(fingerprint)s',
|
log.msg(format='public key attempt for user %(username)s with fingerprint %(fingerprint)s',
|
||||||
|
eventid='KIPP0016',
|
||||||
username=credentials.username,
|
username=credentials.username,
|
||||||
fingerprint=_pubKey.fingerprint())
|
fingerprint=_pubKey.fingerprint())
|
||||||
return failure.Failure(error.ConchError('Incorrect signature'))
|
return failure.Failure(error.ConchError('Incorrect signature'))
|
||||||
|
|||||||
@ -47,6 +47,7 @@ import socket
|
|||||||
# KIPP0013 : env var requested
|
# KIPP0013 : env var requested
|
||||||
# KIPP0014 : direct-tcpip request
|
# KIPP0014 : direct-tcpip request
|
||||||
# KIPP0015 : direct-tcpip data
|
# KIPP0015 : direct-tcpip data
|
||||||
|
# KIPP0016 : key fingerprint
|
||||||
|
|
||||||
class Output(object):
|
class Output(object):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user