Skip to content
Snippets Groups Projects
Commit b466db26 authored by Pavel Valach's avatar Pavel Valach
Browse files

dionaea/log_wardenfiler.py: convert credentials from bytes to string for event output

parent 78b45cbe
No related branches found
No related tags found
1 merge request!4Dionaea: sanitize credentials
...@@ -413,17 +413,17 @@ class LogWardenfilerHandler(ihandler): ...@@ -413,17 +413,17 @@ class LogWardenfilerHandler(ihandler):
def handle_incident_dionaea_modules_python_ftp_login(self, icd): def handle_incident_dionaea_modules_python_ftp_login(self, icd):
con = icd.con con = icd.con
self._register_connection(con, "ftp", cred = {"User": icd.username, "Password": icd.password}) self._register_connection(con, "ftp", cred = {"User": self._bytes_to_str(icd.username), "Password": self._bytes_to_str(icd.password)})
logger.info("new FTP login within connection from %s:%i to %s:%i" % (con.remote.host, con.remote.port, con.local.host, con.local.port)) logger.info("new FTP login within connection from %s:%i to %s:%i" % (con.remote.host, con.remote.port, con.local.host, con.local.port))
def handle_incident_dionaea_modules_python_mssql_login(self, icd): def handle_incident_dionaea_modules_python_mssql_login(self, icd):
con = icd.con con = icd.con
self._register_connection(con, "ms-sql-s", cred = {"User": icd.username, "Password": icd.password}) self._register_connection(con, "ms-sql-s", cred = {"User": self._bytes_to_str(icd.username), "Password": self._bytes_to_str(icd.password)})
logger.info("new MSSQL login within connection from %s:%i to %s:%i" % (con.remote.host, con.remote.port, con.local.host, con.local.port)) logger.info("new MSSQL login within connection from %s:%i to %s:%i" % (con.remote.host, con.remote.port, con.local.host, con.local.port))
def handle_incident_dionaea_modules_python_mysql_login(self, icd): def handle_incident_dionaea_modules_python_mysql_login(self, icd):
con = icd.con con = icd.con
self._register_connection(con, "mysql", cred = {"User": icd.username, "Password": icd.password}) self._register_connection(con, "mysql", cred = {"User": self._bytes_to_str(icd.username), "Password": self._bytes_to_str(icd.password)})
logger.info("new MySQL login within connection from %s:%i to %s:%i" % (con.remote.host, con.remote.port, con.local.host, con.local.port)) logger.info("new MySQL login within connection from %s:%i to %s:%i" % (con.remote.host, con.remote.port, con.local.host, con.local.port))
def handle_incident_dionaea_modules_python_p0f(self, icd): def handle_incident_dionaea_modules_python_p0f(self, icd):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment