def passwordHit(genServer, password, reqInfo): if password: record = genServer.findPass(password) # [RED ALERT] Honeytoken 'XDPXKue3K8' for TEST-HONEYTOKEN.COM\Administrator was stolen from ip2(10.65.189.18) on 2019-07-10 03:07:03.304525 attempted to use in ip2(10.65.189.18) message = "[RED ALERT] Honeytoken '%s' for %s\\%s, stolen from %s(%s) on %s, was attempted to use in %s(%s)" % \ (record[5], record[1], record[2], record[4], record[3], record[0].split(".")[0], reqInfo[0], reqInfo[1]) logging.critical(message) alert.sendAlert(message)
def passwordHit(genServer, password): if password: record = genServer.findPass(password) message = "[RED ALERT] Honeytoken for %s\\%s '%s' was stolen from %s on %s" % \ (record[1],record[2], record[4], record[3], record[0].split(" ")[0] ) #print "\x1b[91m" + message + "\x1b[0m" print "\x1b[91m" + "[RED ALERT]" + "\x1b[0m" logging.critical(message) alert.sendAlert(message)
def testPassword(username, domain, encTimestamp, genServer): # Given the encrypted timestamp recover the generated password password = recoverPassword(username, domain, encTimestamp, genServer) if password: record = genServer.findPass(password) message = "[RED ALERT] Honeytoken for %s\\%s '%s' was stolen from %s on %s" % \ (record[1],record[2], record[4], record[3], record[0].split(" ")[0] ) print "\x1b[91m" + message + "\x1b[0m" logging.critical(message) alert.sendAlert(message)
def notifyMaster(username, domain, encTimestamp, reqInfo): url = 'http://%s/notify' % (config.master_node) values = {"u": username, "d": domain, "t": encTimestamp, "h": reqInfo[0], "s": reqInfo[1]} data = urllib.urlencode(values) try: req = urllib2.Request(url, data) response = urllib2.urlopen(req, timeout=30) except (urllib2.URLError, socket.timeout) as e: message = "DCEPT slave Failed to communicate with master node '%s'" % (config.master_node) logging.error(message) alert.sendAlert(message) return False return True
def notifyMaster(username, domain, encTimestamp): url = 'http://%s/notify' % (config.master_node) values = { 'u' : username, 'd' : domain, 't' : encTimestamp } data = urllib.urlencode(values) try: req = urllib2.Request(url, data) response = urllib2.urlopen(req, timeout=30) except (urllib2.URLError, socket.timeout) as e: message = "DCEPT slave Failed to communicate with master node '%s'" % (config.master_node) logging.error(message) alert.sendAlert(message) return False return True