diff --git a/plugins/generic/enumeration.py b/plugins/generic/enumeration.py index 35633ea31..24c498c27 100644 --- a/plugins/generic/enumeration.py +++ b/plugins/generic/enumeration.py @@ -170,10 +170,15 @@ class Enumeration: def getPasswordHashes(self): infoMsg = "fetching database users password hashes" - logger.info(infoMsg) rootQuery = queries[kb.dbms].passwords + if conf.user == "CU": + infoMsg += " for current user" + conf.user = self.getCurrentUser() + + logger.info(infoMsg) + if conf.unionUse: if kb.dbms == "Microsoft SQL Server" and kb.dbmsVersion[0] in ( "2005", "2008" ): query = rootQuery["inband"]["query2"] @@ -301,10 +306,15 @@ class Enumeration: def getPrivileges(self): infoMsg = "fetching database users privileges" - logger.info(infoMsg) rootQuery = queries[kb.dbms].privileges + if conf.user == "CU": + infoMsg += " for current user" + conf.user = self.getCurrentUser() + + logger.info(infoMsg) + # Set containing the list of DBMS administrators areAdmins = set()