Beispiel #1
0
	if options.scan is not None:
		tmp = NetMap()
		tmp.net_mask = options.scan
		tmp.fingerprint = options.finger
		tmp.scan_block()
	elif options.service:
		service_scan.initialize()
	elif options.filter is not None:
		util.Msg("Sniffing with filter [%s]...(ctrl^c to exit)"%options.filter)
		try:
			sniff(filter=options.filter,store=0, prn=lambda x: x.summary())
		except KeyboardInterrupt,Exception:
			util.Msg("Exiting sniffer..")
	elif options.wifind: 
		util.debug("beginning wireless AP scan..")
		ap_scan.initialize()
	elif options.ssh:
		util.Msg('Starting SSH server...')
		tmp = SSHService()
		tmp.dump = True
		tmp.initialize()
	elif options.ftp:
		util.Msg('Starting FTP server...')
		tmp = FTPService()
		tmp.dump = True
		tmp.initialize()
	elif options.http:
		util.Msg('Starting HTTP server...')
		tmp = HTTPService()
		tmp.dump = True
		tmp.initialize()
Beispiel #2
0
def initialize(module):
	global static_singles, arp_sessions, http_sniffers, password_sniffers, services
	debug("Received module start for: %s"%(module))
	if module == 'arp':
		tmp = ARPSpoof() 
		to_ip = tmp.initialize()
		if not to_ip is None:
			debug("Storing session for %s"%to_ip)
			arp_sessions[to_ip] = tmp
		del(tmp)
	elif module == 'dns':
		dump_module_sessions('arp')
		(module, number) = get_session_input()
		ip = get_key(module,number)
		if not ip is None:
			arp_sessions[ip].init_dns_spoof()
	elif module == 'dhcp':
		tmp = DHCPSpoof()
		if tmp.initialize():
			static_singles['rogue_dhcp'] = tmp
	elif module == 'ndp':
		ndp_dos.initialize()	
	elif module == 'http_sniffer':
		tmp = HTTPSniffer()
		to_ip = tmp.initialize()
		if not to_ip is None:
			debug("Storing sniffer for %s"%to_ip)
			http_sniffers[to_ip] = tmp
	elif module == 'password_sniffer':
		tmp = PasswordSniffer()
		to_ip = tmp.initialize()
		if not to_ip is None:
			debug("Storing sniffer for %s"%to_ip)
			password_sniffers[to_ip] = tmp
	elif module == 'traffic_sniffer':
		tmp = TrafficSniffer()
		to_ip = tmp.initialize()
		if not to_ip is None:
			debug('Storing sniffer for %s'%to_ip)
			traffic_sniffers[to_ip] = tmp
	elif module == 'nestea':
		nestea_dos.initialize()
	elif module == 'land':
		land_dos.initialize()
	elif module == 'smb2':
		smb2_dos.initialize()
	elif module == 'net_map':
		static_singles['netscan'] = NetMap()
		static_singles['netscan'].initialize()
	elif module == 'service_scan':
		service_scan.initialize()
	elif module == 'dhcp_starv':
		dhcp_starvation.initialize()
	elif module == 'ap_scan':
		return ap_scan.initialize()	
	elif module == 'wep_crack':
		ap_crack.initialize('wep')
	elif module == 'wpa_crack':
		ap_crack.initialize('wpa')
	elif module == 'wps_crack':
		ap_crack.initialize('wps')
	elif module == 'router_pwn':
		router_pwn.initialize()
	elif module == 'tcp_syn':
		tcp_syn.initialize()
	elif module == 'nbns':
		tmp = NBNSSpoof()
		if tmp.initialize():
			static_singles['nbnspoof'] = tmp
	elif module == 'ftp_server':
		tmp = FTPService()
		tmp.initialize_bg()
		services['ftp'] = tmp
	elif module == 'http_server':
		tmp = HTTPService()
		tmp.initialize_bg()
		services['http'] = tmp
	elif module == 'ssh_server':
		tmp = SSHService()
		if not tmp.initialize_bg():
			return
		services['ssh'] = tmp
	elif module == 'access_point':
		tmp = APService()
		if tmp.initialize_bg():
			services['wireless ap'] = tmp
	elif module == 'smb':
		tmp = SMBService()
		tmp.initialize_bg()
		services['smb'] = tmp
	else:
		Error('Module \'%s\' does not exist.'%module)