diff --git a/monkey_island/cc/resources/pthmap.py b/monkey_island/cc/resources/pthmap.py index db3952e17..c4a770f51 100644 --- a/monkey_island/cc/resources/pthmap.py +++ b/monkey_island/cc/resources/pthmap.py @@ -1,9 +1,9 @@ -import flask_restful - -from cc.auth import jwt_required -from cc.services.edge import EdgeService -from cc.services.node import NodeService -from cc.database import mongo +#import flask_restful +# +#from cc.auth import jwt_required +#from cc.services.edge import EdgeService +#from cc.services.node import NodeService +#from cc.database import mongo import hashlib import binascii @@ -521,7 +521,13 @@ class PassTheHashMap(object): return machines def GetAttackersByVictim(self, victim): - assert False, "TODO, get information from the graph" + attackers = set() + + for atck, vic in self.edge: + if vic == victim: + attackers.add(atck) + + return attackers def main(): pth = PassTheHashMap() @@ -585,15 +591,22 @@ def main():

Hostname '{hostname}'

""".format{ip=m.GetIp(), hostname=m.GetHostName()} print """

Cached SIDs

""" + print """

SIDs cached on this machine

""" print """""" print """

Possible Attackers

""" - print """

TODO. see graph.

""" # pth.GetAttackersByVictim(m) + print """

Machines that can attack this machine

""" + print """""" + print """

Admins

""" + print """

Users that have admin rights on this machine

""" print """