├── .gitignore ├── CHANGELOG.md ├── Elite.sln ├── Elite ├── API │ ├── CovenantAPI.cs │ ├── CovenantAPIExtensions.cs │ ├── ICovenantAPI.cs │ ├── Models │ │ ├── BinaryLauncher.cs │ │ ├── CapturedCredential.cs │ │ ├── CapturedHashCredential.cs │ │ ├── CapturedPasswordCredential.cs │ │ ├── CapturedTicketCredential.cs │ │ ├── CommunicationType.cs │ │ ├── CovenantUser.cs │ │ ├── CovenantUserLogin.cs │ │ ├── CovenantUserLoginResult.cs │ │ ├── CredentialType.cs │ │ ├── CscriptLauncher.cs │ │ ├── DotNetVersion.cs │ │ ├── DownloadEvent.cs │ │ ├── DownloadProgress.cs │ │ ├── EventLevel.cs │ │ ├── EventModel.cs │ │ ├── EventType.cs │ │ ├── FileIndicator.cs │ │ ├── Grunt.cs │ │ ├── GruntSetTaskingType.cs │ │ ├── GruntStatus.cs │ │ ├── GruntTask.cs │ │ ├── GruntTaskOption.cs │ │ ├── GruntTasking.cs │ │ ├── GruntTaskingMessage.cs │ │ ├── GruntTaskingStatus.cs │ │ ├── GruntTaskingType.cs │ │ ├── HTTPListener.cs │ │ ├── HashType.cs │ │ ├── HostedFile.cs │ │ ├── HttpProfile.cs │ │ ├── IdentityRole.cs │ │ ├── IdentityUserRoleString.cs │ │ ├── Indicator.cs │ │ ├── InstallUtilLauncher.cs │ │ ├── IntegrityLevel.cs │ │ ├── Launcher.cs │ │ ├── LauncherType.cs │ │ ├── Listener.cs │ │ ├── ListenerStatus.cs │ │ ├── ListenerType.cs │ │ ├── MSBuildLauncher.cs │ │ ├── MshtaLauncher.cs │ │ ├── NetworkIndicator.cs │ │ ├── PowerShellLauncher.cs │ │ ├── Profile.cs │ │ ├── Regsvr32Launcher.cs │ │ ├── ScriptingLanguage.cs │ │ ├── TargetIndicator.cs │ │ ├── TicketType.cs │ │ ├── WmicLauncher.cs │ │ └── WscriptLauncher.cs │ └── openapi.json ├── Common.cs ├── Data │ ├── .gitignore │ └── Downloads │ │ └── .gitignore ├── Dockerfile ├── Elite.cs ├── Elite.csproj ├── EliteConsole.cs ├── EventPrinter.cs ├── Exceptions.cs ├── Menu │ ├── CovenantBaseMenuItem.cs │ ├── Credentials │ │ └── CredentialsMenuItem.cs │ ├── EliteMenu.cs │ ├── Grunts │ │ ├── GruntsMenuItem.cs │ │ └── InteractGruntMenuItem.cs │ ├── Indicators │ │ └── IndicatorsMenuItem.cs │ ├── Launchers │ │ ├── BinaryLauncherMenuItem.cs │ │ ├── CscriptLauncherMenuItem.cs │ │ ├── InstallUtilLauncherMenuItem.cs │ │ ├── LaunchersMenuItem.cs │ │ ├── MSBuildLauncherMenuItem.cs │ │ ├── MshtaLauncherMenuItem.cs │ │ ├── PowerShellLauncherMenuItem.cs │ │ ├── Regsvr32LauncherMenuItem.cs │ │ ├── WmicLauncherMenuItem.cs │ │ └── WscriptLauncherMenuItem.cs │ ├── Listeners │ │ ├── HTTPListenerMenuItem.cs │ │ ├── HostedFilesMenuItem.cs │ │ ├── InteractListenerMenuItem.cs │ │ └── ListenersMenuItem.cs │ ├── MenuItem.cs │ ├── Tasks │ │ ├── TaskMenuItem.cs │ │ └── TaskMenuItemSupplements.cs │ └── Users │ │ └── UsersMenuItem.cs └── refs │ └── ReadLine.dll ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Build results 2 | [Dd]ebug/ 3 | [Dd]ebugPublic/ 4 | [Rr]elease/ 5 | [Rr]eleases/ 6 | x64/ 7 | x86/ 8 | bld/ 9 | [Bb]in/ 10 | [Oo]bj/ 11 | 12 | # Covenant Logs 13 | [Ll]og/ 14 | [Ll]ogs/ 15 | 16 | # Visual Studio 2015 cache/options directory 17 | .vs/ 18 | *.userprefs 19 | 20 | *.pfx 21 | !covenant-dev-private.pfx 22 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | All notable changes to this project will be documented in this file. 3 | 4 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 5 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 6 | 7 | ## [v0.2] - 2019-05-01 8 | ### Added 9 | - Added connection test prior to login 10 | - Added Elite display events on user tasking (prior to completed) 11 | - Added better Elite error messages 12 | - Added forked version of ReadLine, with better tab-complete 13 | - Added change user password 14 | - Added shellcmd task 15 | - Added sharpdpapi task 16 | - Added sharpup task 17 | - Added sharpdump task 18 | - Added sharpwmi task 19 | - Added safetykatz task 20 | - Added seatbelt task 21 | - Added killdate option 22 | 23 | ### Changed 24 | - Event printing moved to task 25 | - Event creation moved to Covenant controllers 26 | - TaskMenu now displays full task description, detailed parameter info 27 | - Limited API refereshes and calls to improve speed 28 | 29 | ### Fixed 30 | - Fixed bad command causing following commands to fail 31 | - Fixed Create user error message 32 | 33 | ## [v0.1.3] - 2019-03-14 34 | ### Added 35 | - Added credentials menu 36 | - Added warning for connecting over localhost to Covenant using docker 37 | 38 | ### Changed 39 | - Trim UserInput 40 | - Split wmi, dcom, and bypassuac tasks to wmicommand, wmigrunt, dcomcommand, dcomgrunt, bypassuaccommand, bypassuacgrunt tasks 41 | 42 | ### Fixed 43 | - Fixed dcsync parameter error 44 | - Fixed download task 45 | 46 | ## [v0.1.2] - 2019-02-14 47 | ### Added 48 | - Added AssemblyReflect task shortcut 49 | 50 | ### Changed 51 | - Updated API 52 | - Updated README 53 | - Moved CHANGELOG.md to root directory 54 | 55 | ## [v0.1.1] - 2019-02-09 56 | ### Added 57 | - Added CHANGELOG.md 58 | 59 | ### Fixed 60 | - Fixed WscriptLauncher Write command 61 | 62 | ## v0.1 - 2019-02-07 63 | - Initial release 64 | 65 | [v0.1.1]: https://github.com/cobbr/Elite/compare/v0.1...v0.1.1 66 | [v0.1.2]: https://github.com/cobbr/Elite/compare/v0.1.1...v0.1.2 67 | [v0.1.3]: https://github.com/cobbr/Elite/compare/v0.1.2...v0.1.3 68 | [v0.2]: https://github.com/cobbr/Elite/compare/v0.1.3...v0.2 -------------------------------------------------------------------------------- /Elite.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27004.2010 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elite", "Elite\Elite.csproj", "{050C94C9-BB91-4AC0-A9B8-512D2B55F6FB}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {050C94C9-BB91-4AC0-A9B8-512D2B55F6FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {050C94C9-BB91-4AC0-A9B8-512D2B55F6FB}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {050C94C9-BB91-4AC0-A9B8-512D2B55F6FB}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {050C94C9-BB91-4AC0-A9B8-512D2B55F6FB}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {3B116A2C-8078-4EF4-A95C-DE0D5A4D0022} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /Elite/API/Models/BinaryLauncher.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class BinaryLauncher 13 | { 14 | /// 15 | /// Initializes a new instance of the BinaryLauncher class. 16 | /// 17 | public BinaryLauncher() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the BinaryLauncher class. 24 | /// 25 | /// Possible values include: 26 | /// 'Net40', 'Net35', 'NetCore21' 27 | /// Possible values include: 'Wmic', 'Regsvr32', 28 | /// 'Mshta', 'Cscript', 'Wscript', 'PowerShell', 'Binary', 'MSBuild', 29 | /// 'InstallUtil' 30 | /// Possible values include: 'HTTP', 31 | /// 'SMB' 32 | public BinaryLauncher(int? id = default(int?), int? listenerId = default(int?), DotNetVersion? dotNetFrameworkVersion = default(DotNetVersion?), LauncherType? type = default(LauncherType?), string name = default(string), string description = default(string), CommunicationType? commType = default(CommunicationType?), bool? validateCert = default(bool?), bool? useCertPinning = default(bool?), string smbPipeName = default(string), int? delay = default(int?), int? jitterPercent = default(int?), int? connectAttempts = default(int?), System.DateTime? killDate = default(System.DateTime?), string launcherString = default(string), string stagerCode = default(string), string base64ILByteString = default(string)) 33 | { 34 | Id = id; 35 | ListenerId = listenerId; 36 | DotNetFrameworkVersion = dotNetFrameworkVersion; 37 | Type = type; 38 | Name = name; 39 | Description = description; 40 | CommType = commType; 41 | ValidateCert = validateCert; 42 | UseCertPinning = useCertPinning; 43 | SmbPipeName = smbPipeName; 44 | Delay = delay; 45 | JitterPercent = jitterPercent; 46 | ConnectAttempts = connectAttempts; 47 | KillDate = killDate; 48 | LauncherString = launcherString; 49 | StagerCode = stagerCode; 50 | Base64ILByteString = base64ILByteString; 51 | CustomInit(); 52 | } 53 | 54 | /// 55 | /// An initialization method that performs custom operations like setting defaults 56 | /// 57 | partial void CustomInit(); 58 | 59 | /// 60 | /// 61 | [JsonProperty(PropertyName = "id")] 62 | public int? Id { get; set; } 63 | 64 | /// 65 | /// 66 | [JsonProperty(PropertyName = "listenerId")] 67 | public int? ListenerId { get; set; } 68 | 69 | /// 70 | /// Gets or sets possible values include: 'Net40', 'Net35', 'NetCore21' 71 | /// 72 | [JsonProperty(PropertyName = "dotNetFrameworkVersion")] 73 | public DotNetVersion? DotNetFrameworkVersion { get; set; } 74 | 75 | /// 76 | /// Gets or sets possible values include: 'Wmic', 'Regsvr32', 'Mshta', 77 | /// 'Cscript', 'Wscript', 'PowerShell', 'Binary', 'MSBuild', 78 | /// 'InstallUtil' 79 | /// 80 | [JsonProperty(PropertyName = "type")] 81 | public LauncherType? Type { get; set; } 82 | 83 | /// 84 | /// 85 | [JsonProperty(PropertyName = "name")] 86 | public string Name { get; set; } 87 | 88 | /// 89 | /// 90 | [JsonProperty(PropertyName = "description")] 91 | public string Description { get; set; } 92 | 93 | /// 94 | /// Gets or sets possible values include: 'HTTP', 'SMB' 95 | /// 96 | [JsonProperty(PropertyName = "commType")] 97 | public CommunicationType? CommType { get; set; } 98 | 99 | /// 100 | /// 101 | [JsonProperty(PropertyName = "validateCert")] 102 | public bool? ValidateCert { get; set; } 103 | 104 | /// 105 | /// 106 | [JsonProperty(PropertyName = "useCertPinning")] 107 | public bool? UseCertPinning { get; set; } 108 | 109 | /// 110 | /// 111 | [JsonProperty(PropertyName = "smbPipeName")] 112 | public string SmbPipeName { get; set; } 113 | 114 | /// 115 | /// 116 | [JsonProperty(PropertyName = "delay")] 117 | public int? Delay { get; set; } 118 | 119 | /// 120 | /// 121 | [JsonProperty(PropertyName = "jitterPercent")] 122 | public int? JitterPercent { get; set; } 123 | 124 | /// 125 | /// 126 | [JsonProperty(PropertyName = "connectAttempts")] 127 | public int? ConnectAttempts { get; set; } 128 | 129 | /// 130 | /// 131 | [JsonProperty(PropertyName = "killDate")] 132 | public System.DateTime? KillDate { get; set; } 133 | 134 | /// 135 | /// 136 | [JsonProperty(PropertyName = "launcherString")] 137 | public string LauncherString { get; set; } 138 | 139 | /// 140 | /// 141 | [JsonProperty(PropertyName = "stagerCode")] 142 | public string StagerCode { get; set; } 143 | 144 | /// 145 | /// 146 | [JsonProperty(PropertyName = "base64ILByteString")] 147 | public string Base64ILByteString { get; set; } 148 | 149 | } 150 | } 151 | -------------------------------------------------------------------------------- /Elite/API/Models/CapturedCredential.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class CapturedCredential 13 | { 14 | /// 15 | /// Initializes a new instance of the CapturedCredential class. 16 | /// 17 | public CapturedCredential() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the CapturedCredential class. 24 | /// 25 | /// Possible values include: 'Password', 'Hash', 26 | /// 'Ticket' 27 | public CapturedCredential(int? id = default(int?), string domain = default(string), string username = default(string), string serviceName = default(string), CredentialType? type = default(CredentialType?)) 28 | { 29 | Id = id; 30 | Domain = domain; 31 | Username = username; 32 | ServiceName = serviceName; 33 | Type = type; 34 | CustomInit(); 35 | } 36 | 37 | /// 38 | /// An initialization method that performs custom operations like setting defaults 39 | /// 40 | partial void CustomInit(); 41 | 42 | /// 43 | /// 44 | [JsonProperty(PropertyName = "id")] 45 | public int? Id { get; set; } 46 | 47 | /// 48 | /// 49 | [JsonProperty(PropertyName = "domain")] 50 | public string Domain { get; set; } 51 | 52 | /// 53 | /// 54 | [JsonProperty(PropertyName = "username")] 55 | public string Username { get; set; } 56 | 57 | /// 58 | /// 59 | [JsonProperty(PropertyName = "serviceName")] 60 | public string ServiceName { get; set; } 61 | 62 | /// 63 | /// Gets or sets possible values include: 'Password', 'Hash', 'Ticket' 64 | /// 65 | [JsonProperty(PropertyName = "type")] 66 | public CredentialType? Type { get; set; } 67 | 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /Elite/API/Models/CapturedHashCredential.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class CapturedHashCredential 13 | { 14 | /// 15 | /// Initializes a new instance of the CapturedHashCredential class. 16 | /// 17 | public CapturedHashCredential() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the CapturedHashCredential class. 24 | /// 25 | /// Possible values include: 'NTLM', 26 | /// 'LM', 'SHA1' 27 | /// Possible values include: 'Password', 'Hash', 28 | /// 'Ticket' 29 | public CapturedHashCredential(string hash = default(string), HashType? hashCredentialType = default(HashType?), int? id = default(int?), string domain = default(string), string username = default(string), string serviceName = default(string), CredentialType? type = default(CredentialType?)) 30 | { 31 | Hash = hash; 32 | HashCredentialType = hashCredentialType; 33 | Id = id; 34 | Domain = domain; 35 | Username = username; 36 | ServiceName = serviceName; 37 | Type = type; 38 | CustomInit(); 39 | } 40 | 41 | /// 42 | /// An initialization method that performs custom operations like setting defaults 43 | /// 44 | partial void CustomInit(); 45 | 46 | /// 47 | /// 48 | [JsonProperty(PropertyName = "hash")] 49 | public string Hash { get; set; } 50 | 51 | /// 52 | /// Gets or sets possible values include: 'NTLM', 'LM', 'SHA1' 53 | /// 54 | [JsonProperty(PropertyName = "hashCredentialType")] 55 | public HashType? HashCredentialType { get; set; } 56 | 57 | /// 58 | /// 59 | [JsonProperty(PropertyName = "id")] 60 | public int? Id { get; set; } 61 | 62 | /// 63 | /// 64 | [JsonProperty(PropertyName = "domain")] 65 | public string Domain { get; set; } 66 | 67 | /// 68 | /// 69 | [JsonProperty(PropertyName = "username")] 70 | public string Username { get; set; } 71 | 72 | /// 73 | /// 74 | [JsonProperty(PropertyName = "serviceName")] 75 | public string ServiceName { get; set; } 76 | 77 | /// 78 | /// Gets or sets possible values include: 'Password', 'Hash', 'Ticket' 79 | /// 80 | [JsonProperty(PropertyName = "type")] 81 | public CredentialType? Type { get; set; } 82 | 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /Elite/API/Models/CapturedPasswordCredential.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class CapturedPasswordCredential 13 | { 14 | /// 15 | /// Initializes a new instance of the CapturedPasswordCredential class. 16 | /// 17 | public CapturedPasswordCredential() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the CapturedPasswordCredential class. 24 | /// 25 | /// Possible values include: 'Password', 'Hash', 26 | /// 'Ticket' 27 | public CapturedPasswordCredential(string password = default(string), int? id = default(int?), string domain = default(string), string username = default(string), string serviceName = default(string), CredentialType? type = default(CredentialType?)) 28 | { 29 | Password = password; 30 | Id = id; 31 | Domain = domain; 32 | Username = username; 33 | ServiceName = serviceName; 34 | Type = type; 35 | CustomInit(); 36 | } 37 | 38 | /// 39 | /// An initialization method that performs custom operations like setting defaults 40 | /// 41 | partial void CustomInit(); 42 | 43 | /// 44 | /// 45 | [JsonProperty(PropertyName = "password")] 46 | public string Password { get; set; } 47 | 48 | /// 49 | /// 50 | [JsonProperty(PropertyName = "id")] 51 | public int? Id { get; set; } 52 | 53 | /// 54 | /// 55 | [JsonProperty(PropertyName = "domain")] 56 | public string Domain { get; set; } 57 | 58 | /// 59 | /// 60 | [JsonProperty(PropertyName = "username")] 61 | public string Username { get; set; } 62 | 63 | /// 64 | /// 65 | [JsonProperty(PropertyName = "serviceName")] 66 | public string ServiceName { get; set; } 67 | 68 | /// 69 | /// Gets or sets possible values include: 'Password', 'Hash', 'Ticket' 70 | /// 71 | [JsonProperty(PropertyName = "type")] 72 | public CredentialType? Type { get; set; } 73 | 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /Elite/API/Models/CapturedTicketCredential.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class CapturedTicketCredential 13 | { 14 | /// 15 | /// Initializes a new instance of the CapturedTicketCredential class. 16 | /// 17 | public CapturedTicketCredential() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the CapturedTicketCredential class. 24 | /// 25 | /// Possible values include: 'RC4', 26 | /// 'AES' 27 | /// Possible values include: 'Password', 'Hash', 28 | /// 'Ticket' 29 | public CapturedTicketCredential(string ticket = default(string), TicketType? ticketCredentialType = default(TicketType?), int? id = default(int?), string domain = default(string), string username = default(string), string serviceName = default(string), CredentialType? type = default(CredentialType?)) 30 | { 31 | Ticket = ticket; 32 | TicketCredentialType = ticketCredentialType; 33 | Id = id; 34 | Domain = domain; 35 | Username = username; 36 | ServiceName = serviceName; 37 | Type = type; 38 | CustomInit(); 39 | } 40 | 41 | /// 42 | /// An initialization method that performs custom operations like setting defaults 43 | /// 44 | partial void CustomInit(); 45 | 46 | /// 47 | /// 48 | [JsonProperty(PropertyName = "ticket")] 49 | public string Ticket { get; set; } 50 | 51 | /// 52 | /// Gets or sets possible values include: 'RC4', 'AES' 53 | /// 54 | [JsonProperty(PropertyName = "ticketCredentialType")] 55 | public TicketType? TicketCredentialType { get; set; } 56 | 57 | /// 58 | /// 59 | [JsonProperty(PropertyName = "id")] 60 | public int? Id { get; set; } 61 | 62 | /// 63 | /// 64 | [JsonProperty(PropertyName = "domain")] 65 | public string Domain { get; set; } 66 | 67 | /// 68 | /// 69 | [JsonProperty(PropertyName = "username")] 70 | public string Username { get; set; } 71 | 72 | /// 73 | /// 74 | [JsonProperty(PropertyName = "serviceName")] 75 | public string ServiceName { get; set; } 76 | 77 | /// 78 | /// Gets or sets possible values include: 'Password', 'Hash', 'Ticket' 79 | /// 80 | [JsonProperty(PropertyName = "type")] 81 | public CredentialType? Type { get; set; } 82 | 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /Elite/API/Models/CommunicationType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using Newtonsoft.Json.Converters; 11 | using System.Runtime; 12 | using System.Runtime.Serialization; 13 | 14 | /// 15 | /// Defines values for CommunicationType. 16 | /// 17 | [JsonConverter(typeof(StringEnumConverter))] 18 | public enum CommunicationType 19 | { 20 | [EnumMember(Value = "HTTP")] 21 | HTTP, 22 | [EnumMember(Value = "SMB")] 23 | SMB 24 | } 25 | internal static class CommunicationTypeEnumExtension 26 | { 27 | internal static string ToSerializedValue(this CommunicationType? value) 28 | { 29 | return value == null ? null : ((CommunicationType)value).ToSerializedValue(); 30 | } 31 | 32 | internal static string ToSerializedValue(this CommunicationType value) 33 | { 34 | switch( value ) 35 | { 36 | case CommunicationType.HTTP: 37 | return "HTTP"; 38 | case CommunicationType.SMB: 39 | return "SMB"; 40 | } 41 | return null; 42 | } 43 | 44 | internal static CommunicationType? ParseCommunicationType(this string value) 45 | { 46 | switch( value ) 47 | { 48 | case "HTTP": 49 | return CommunicationType.HTTP; 50 | case "SMB": 51 | return CommunicationType.SMB; 52 | } 53 | return null; 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Elite/API/Models/CovenantUser.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class CovenantUser 13 | { 14 | /// 15 | /// Initializes a new instance of the CovenantUser class. 16 | /// 17 | public CovenantUser() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the CovenantUser class. 24 | /// 25 | public CovenantUser(string id = default(string), string userName = default(string), string normalizedUserName = default(string), string email = default(string), string normalizedEmail = default(string), bool? emailConfirmed = default(bool?), string passwordHash = default(string), string securityStamp = default(string), string concurrencyStamp = default(string), string phoneNumber = default(string), bool? phoneNumberConfirmed = default(bool?), bool? twoFactorEnabled = default(bool?), System.DateTime? lockoutEnd = default(System.DateTime?), bool? lockoutEnabled = default(bool?), int? accessFailedCount = default(int?)) 26 | { 27 | Id = id; 28 | UserName = userName; 29 | NormalizedUserName = normalizedUserName; 30 | Email = email; 31 | NormalizedEmail = normalizedEmail; 32 | EmailConfirmed = emailConfirmed; 33 | PasswordHash = passwordHash; 34 | SecurityStamp = securityStamp; 35 | ConcurrencyStamp = concurrencyStamp; 36 | PhoneNumber = phoneNumber; 37 | PhoneNumberConfirmed = phoneNumberConfirmed; 38 | TwoFactorEnabled = twoFactorEnabled; 39 | LockoutEnd = lockoutEnd; 40 | LockoutEnabled = lockoutEnabled; 41 | AccessFailedCount = accessFailedCount; 42 | CustomInit(); 43 | } 44 | 45 | /// 46 | /// An initialization method that performs custom operations like setting defaults 47 | /// 48 | partial void CustomInit(); 49 | 50 | /// 51 | /// 52 | [JsonProperty(PropertyName = "id")] 53 | public string Id { get; set; } 54 | 55 | /// 56 | /// 57 | [JsonProperty(PropertyName = "userName")] 58 | public string UserName { get; set; } 59 | 60 | /// 61 | /// 62 | [JsonProperty(PropertyName = "normalizedUserName")] 63 | public string NormalizedUserName { get; set; } 64 | 65 | /// 66 | /// 67 | [JsonProperty(PropertyName = "email")] 68 | public string Email { get; set; } 69 | 70 | /// 71 | /// 72 | [JsonProperty(PropertyName = "normalizedEmail")] 73 | public string NormalizedEmail { get; set; } 74 | 75 | /// 76 | /// 77 | [JsonProperty(PropertyName = "emailConfirmed")] 78 | public bool? EmailConfirmed { get; set; } 79 | 80 | /// 81 | /// 82 | [JsonProperty(PropertyName = "passwordHash")] 83 | public string PasswordHash { get; set; } 84 | 85 | /// 86 | /// 87 | [JsonProperty(PropertyName = "securityStamp")] 88 | public string SecurityStamp { get; set; } 89 | 90 | /// 91 | /// 92 | [JsonProperty(PropertyName = "concurrencyStamp")] 93 | public string ConcurrencyStamp { get; set; } 94 | 95 | /// 96 | /// 97 | [JsonProperty(PropertyName = "phoneNumber")] 98 | public string PhoneNumber { get; set; } 99 | 100 | /// 101 | /// 102 | [JsonProperty(PropertyName = "phoneNumberConfirmed")] 103 | public bool? PhoneNumberConfirmed { get; set; } 104 | 105 | /// 106 | /// 107 | [JsonProperty(PropertyName = "twoFactorEnabled")] 108 | public bool? TwoFactorEnabled { get; set; } 109 | 110 | /// 111 | /// 112 | [JsonProperty(PropertyName = "lockoutEnd")] 113 | public System.DateTime? LockoutEnd { get; set; } 114 | 115 | /// 116 | /// 117 | [JsonProperty(PropertyName = "lockoutEnabled")] 118 | public bool? LockoutEnabled { get; set; } 119 | 120 | /// 121 | /// 122 | [JsonProperty(PropertyName = "accessFailedCount")] 123 | public int? AccessFailedCount { get; set; } 124 | 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /Elite/API/Models/CovenantUserLogin.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class CovenantUserLogin 13 | { 14 | /// 15 | /// Initializes a new instance of the CovenantUserLogin class. 16 | /// 17 | public CovenantUserLogin() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the CovenantUserLogin class. 24 | /// 25 | public CovenantUserLogin(string userName = default(string), string password = default(string)) 26 | { 27 | UserName = userName; 28 | Password = password; 29 | CustomInit(); 30 | } 31 | 32 | /// 33 | /// An initialization method that performs custom operations like setting defaults 34 | /// 35 | partial void CustomInit(); 36 | 37 | /// 38 | /// 39 | [JsonProperty(PropertyName = "userName")] 40 | public string UserName { get; set; } 41 | 42 | /// 43 | /// 44 | [JsonProperty(PropertyName = "password")] 45 | public string Password { get; set; } 46 | 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Elite/API/Models/CovenantUserLoginResult.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class CovenantUserLoginResult 13 | { 14 | /// 15 | /// Initializes a new instance of the CovenantUserLoginResult class. 16 | /// 17 | public CovenantUserLoginResult() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the CovenantUserLoginResult class. 24 | /// 25 | public CovenantUserLoginResult(bool? success = default(bool?), string token = default(string)) 26 | { 27 | Success = success; 28 | Token = token; 29 | CustomInit(); 30 | } 31 | 32 | /// 33 | /// An initialization method that performs custom operations like setting defaults 34 | /// 35 | partial void CustomInit(); 36 | 37 | /// 38 | /// 39 | [JsonProperty(PropertyName = "success")] 40 | public bool? Success { get; set; } 41 | 42 | /// 43 | /// 44 | [JsonProperty(PropertyName = "token")] 45 | public string Token { get; set; } 46 | 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Elite/API/Models/CredentialType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using Newtonsoft.Json.Converters; 11 | using System.Runtime; 12 | using System.Runtime.Serialization; 13 | 14 | /// 15 | /// Defines values for CredentialType. 16 | /// 17 | [JsonConverter(typeof(StringEnumConverter))] 18 | public enum CredentialType 19 | { 20 | [EnumMember(Value = "Password")] 21 | Password, 22 | [EnumMember(Value = "Hash")] 23 | Hash, 24 | [EnumMember(Value = "Ticket")] 25 | Ticket 26 | } 27 | internal static class CredentialTypeEnumExtension 28 | { 29 | internal static string ToSerializedValue(this CredentialType? value) 30 | { 31 | return value == null ? null : ((CredentialType)value).ToSerializedValue(); 32 | } 33 | 34 | internal static string ToSerializedValue(this CredentialType value) 35 | { 36 | switch( value ) 37 | { 38 | case CredentialType.Password: 39 | return "Password"; 40 | case CredentialType.Hash: 41 | return "Hash"; 42 | case CredentialType.Ticket: 43 | return "Ticket"; 44 | } 45 | return null; 46 | } 47 | 48 | internal static CredentialType? ParseCredentialType(this string value) 49 | { 50 | switch( value ) 51 | { 52 | case "Password": 53 | return CredentialType.Password; 54 | case "Hash": 55 | return CredentialType.Hash; 56 | case "Ticket": 57 | return CredentialType.Ticket; 58 | } 59 | return null; 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Elite/API/Models/CscriptLauncher.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class CscriptLauncher 13 | { 14 | /// 15 | /// Initializes a new instance of the CscriptLauncher class. 16 | /// 17 | public CscriptLauncher() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the CscriptLauncher class. 24 | /// 25 | /// Possible values include: 'JScript', 26 | /// 'VBScript' 27 | /// Possible values include: 28 | /// 'Net40', 'Net35', 'NetCore21' 29 | /// Possible values include: 'Wmic', 'Regsvr32', 30 | /// 'Mshta', 'Cscript', 'Wscript', 'PowerShell', 'Binary', 'MSBuild', 31 | /// 'InstallUtil' 32 | /// Possible values include: 'HTTP', 33 | /// 'SMB' 34 | public CscriptLauncher(ScriptingLanguage? scriptLanguage = default(ScriptingLanguage?), string progId = default(string), string diskCode = default(string), int? id = default(int?), int? listenerId = default(int?), DotNetVersion? dotNetFrameworkVersion = default(DotNetVersion?), LauncherType? type = default(LauncherType?), string name = default(string), string description = default(string), CommunicationType? commType = default(CommunicationType?), bool? validateCert = default(bool?), bool? useCertPinning = default(bool?), string smbPipeName = default(string), int? delay = default(int?), int? jitterPercent = default(int?), int? connectAttempts = default(int?), System.DateTime? killDate = default(System.DateTime?), string launcherString = default(string), string stagerCode = default(string), string base64ILByteString = default(string)) 35 | { 36 | ScriptLanguage = scriptLanguage; 37 | ProgId = progId; 38 | DiskCode = diskCode; 39 | Id = id; 40 | ListenerId = listenerId; 41 | DotNetFrameworkVersion = dotNetFrameworkVersion; 42 | Type = type; 43 | Name = name; 44 | Description = description; 45 | CommType = commType; 46 | ValidateCert = validateCert; 47 | UseCertPinning = useCertPinning; 48 | SmbPipeName = smbPipeName; 49 | Delay = delay; 50 | JitterPercent = jitterPercent; 51 | ConnectAttempts = connectAttempts; 52 | KillDate = killDate; 53 | LauncherString = launcherString; 54 | StagerCode = stagerCode; 55 | Base64ILByteString = base64ILByteString; 56 | CustomInit(); 57 | } 58 | 59 | /// 60 | /// An initialization method that performs custom operations like setting defaults 61 | /// 62 | partial void CustomInit(); 63 | 64 | /// 65 | /// Gets or sets possible values include: 'JScript', 'VBScript' 66 | /// 67 | [JsonProperty(PropertyName = "scriptLanguage")] 68 | public ScriptingLanguage? ScriptLanguage { get; set; } 69 | 70 | /// 71 | /// 72 | [JsonProperty(PropertyName = "progId")] 73 | public string ProgId { get; set; } 74 | 75 | /// 76 | /// 77 | [JsonProperty(PropertyName = "diskCode")] 78 | public string DiskCode { get; set; } 79 | 80 | /// 81 | /// 82 | [JsonProperty(PropertyName = "id")] 83 | public int? Id { get; set; } 84 | 85 | /// 86 | /// 87 | [JsonProperty(PropertyName = "listenerId")] 88 | public int? ListenerId { get; set; } 89 | 90 | /// 91 | /// Gets or sets possible values include: 'Net40', 'Net35', 'NetCore21' 92 | /// 93 | [JsonProperty(PropertyName = "dotNetFrameworkVersion")] 94 | public DotNetVersion? DotNetFrameworkVersion { get; set; } 95 | 96 | /// 97 | /// Gets or sets possible values include: 'Wmic', 'Regsvr32', 'Mshta', 98 | /// 'Cscript', 'Wscript', 'PowerShell', 'Binary', 'MSBuild', 99 | /// 'InstallUtil' 100 | /// 101 | [JsonProperty(PropertyName = "type")] 102 | public LauncherType? Type { get; set; } 103 | 104 | /// 105 | /// 106 | [JsonProperty(PropertyName = "name")] 107 | public string Name { get; set; } 108 | 109 | /// 110 | /// 111 | [JsonProperty(PropertyName = "description")] 112 | public string Description { get; set; } 113 | 114 | /// 115 | /// Gets or sets possible values include: 'HTTP', 'SMB' 116 | /// 117 | [JsonProperty(PropertyName = "commType")] 118 | public CommunicationType? CommType { get; set; } 119 | 120 | /// 121 | /// 122 | [JsonProperty(PropertyName = "validateCert")] 123 | public bool? ValidateCert { get; set; } 124 | 125 | /// 126 | /// 127 | [JsonProperty(PropertyName = "useCertPinning")] 128 | public bool? UseCertPinning { get; set; } 129 | 130 | /// 131 | /// 132 | [JsonProperty(PropertyName = "smbPipeName")] 133 | public string SmbPipeName { get; set; } 134 | 135 | /// 136 | /// 137 | [JsonProperty(PropertyName = "delay")] 138 | public int? Delay { get; set; } 139 | 140 | /// 141 | /// 142 | [JsonProperty(PropertyName = "jitterPercent")] 143 | public int? JitterPercent { get; set; } 144 | 145 | /// 146 | /// 147 | [JsonProperty(PropertyName = "connectAttempts")] 148 | public int? ConnectAttempts { get; set; } 149 | 150 | /// 151 | /// 152 | [JsonProperty(PropertyName = "killDate")] 153 | public System.DateTime? KillDate { get; set; } 154 | 155 | /// 156 | /// 157 | [JsonProperty(PropertyName = "launcherString")] 158 | public string LauncherString { get; set; } 159 | 160 | /// 161 | /// 162 | [JsonProperty(PropertyName = "stagerCode")] 163 | public string StagerCode { get; set; } 164 | 165 | /// 166 | /// 167 | [JsonProperty(PropertyName = "base64ILByteString")] 168 | public string Base64ILByteString { get; set; } 169 | 170 | } 171 | } 172 | -------------------------------------------------------------------------------- /Elite/API/Models/DotNetVersion.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using Newtonsoft.Json.Converters; 11 | using System.Runtime; 12 | using System.Runtime.Serialization; 13 | 14 | /// 15 | /// Defines values for DotNetVersion. 16 | /// 17 | [JsonConverter(typeof(StringEnumConverter))] 18 | public enum DotNetVersion 19 | { 20 | [EnumMember(Value = "Net40")] 21 | Net40, 22 | [EnumMember(Value = "Net35")] 23 | Net35, 24 | [EnumMember(Value = "NetCore21")] 25 | NetCore21 26 | } 27 | internal static class DotNetVersionEnumExtension 28 | { 29 | internal static string ToSerializedValue(this DotNetVersion? value) 30 | { 31 | return value == null ? null : ((DotNetVersion)value).ToSerializedValue(); 32 | } 33 | 34 | internal static string ToSerializedValue(this DotNetVersion value) 35 | { 36 | switch( value ) 37 | { 38 | case DotNetVersion.Net40: 39 | return "Net40"; 40 | case DotNetVersion.Net35: 41 | return "Net35"; 42 | case DotNetVersion.NetCore21: 43 | return "NetCore21"; 44 | } 45 | return null; 46 | } 47 | 48 | internal static DotNetVersion? ParseDotNetVersion(this string value) 49 | { 50 | switch( value ) 51 | { 52 | case "Net40": 53 | return DotNetVersion.Net40; 54 | case "Net35": 55 | return DotNetVersion.Net35; 56 | case "NetCore21": 57 | return DotNetVersion.NetCore21; 58 | } 59 | return null; 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Elite/API/Models/DownloadEvent.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class DownloadEvent 13 | { 14 | /// 15 | /// Initializes a new instance of the DownloadEvent class. 16 | /// 17 | public DownloadEvent() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the DownloadEvent class. 24 | /// 25 | /// Possible values include: 'Portion', 26 | /// 'Complete' 27 | /// Possible values include: 'Silent', 'Info', 28 | /// 'Warning', 'Highlight', 'Error' 29 | /// Possible values include: 'Normal', 30 | /// 'Download' 31 | public DownloadEvent(string fileName = default(string), string fileContents = default(string), DownloadProgress? progress = default(DownloadProgress?), int? id = default(int?), System.DateTime? time = default(System.DateTime?), string messageHeader = default(string), string messageBody = default(string), EventLevel? level = default(EventLevel?), EventType? type = default(EventType?), string context = default(string)) 32 | { 33 | FileName = fileName; 34 | FileContents = fileContents; 35 | Progress = progress; 36 | Id = id; 37 | Time = time; 38 | MessageHeader = messageHeader; 39 | MessageBody = messageBody; 40 | Level = level; 41 | Type = type; 42 | Context = context; 43 | CustomInit(); 44 | } 45 | 46 | /// 47 | /// An initialization method that performs custom operations like setting defaults 48 | /// 49 | partial void CustomInit(); 50 | 51 | /// 52 | /// 53 | [JsonProperty(PropertyName = "fileName")] 54 | public string FileName { get; set; } 55 | 56 | /// 57 | /// 58 | [JsonProperty(PropertyName = "fileContents")] 59 | public string FileContents { get; set; } 60 | 61 | /// 62 | /// Gets or sets possible values include: 'Portion', 'Complete' 63 | /// 64 | [JsonProperty(PropertyName = "progress")] 65 | public DownloadProgress? Progress { get; set; } 66 | 67 | /// 68 | /// 69 | [JsonProperty(PropertyName = "id")] 70 | public int? Id { get; set; } 71 | 72 | /// 73 | /// 74 | [JsonProperty(PropertyName = "time")] 75 | public System.DateTime? Time { get; set; } 76 | 77 | /// 78 | /// 79 | [JsonProperty(PropertyName = "messageHeader")] 80 | public string MessageHeader { get; set; } 81 | 82 | /// 83 | /// 84 | [JsonProperty(PropertyName = "messageBody")] 85 | public string MessageBody { get; set; } 86 | 87 | /// 88 | /// Gets or sets possible values include: 'Silent', 'Info', 'Warning', 89 | /// 'Highlight', 'Error' 90 | /// 91 | [JsonProperty(PropertyName = "level")] 92 | public EventLevel? Level { get; set; } 93 | 94 | /// 95 | /// Gets or sets possible values include: 'Normal', 'Download' 96 | /// 97 | [JsonProperty(PropertyName = "type")] 98 | public EventType? Type { get; set; } 99 | 100 | /// 101 | /// 102 | [JsonProperty(PropertyName = "context")] 103 | public string Context { get; set; } 104 | 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /Elite/API/Models/DownloadProgress.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using Newtonsoft.Json.Converters; 11 | using System.Runtime; 12 | using System.Runtime.Serialization; 13 | 14 | /// 15 | /// Defines values for DownloadProgress. 16 | /// 17 | [JsonConverter(typeof(StringEnumConverter))] 18 | public enum DownloadProgress 19 | { 20 | [EnumMember(Value = "Portion")] 21 | Portion, 22 | [EnumMember(Value = "Complete")] 23 | Complete 24 | } 25 | internal static class DownloadProgressEnumExtension 26 | { 27 | internal static string ToSerializedValue(this DownloadProgress? value) 28 | { 29 | return value == null ? null : ((DownloadProgress)value).ToSerializedValue(); 30 | } 31 | 32 | internal static string ToSerializedValue(this DownloadProgress value) 33 | { 34 | switch( value ) 35 | { 36 | case DownloadProgress.Portion: 37 | return "Portion"; 38 | case DownloadProgress.Complete: 39 | return "Complete"; 40 | } 41 | return null; 42 | } 43 | 44 | internal static DownloadProgress? ParseDownloadProgress(this string value) 45 | { 46 | switch( value ) 47 | { 48 | case "Portion": 49 | return DownloadProgress.Portion; 50 | case "Complete": 51 | return DownloadProgress.Complete; 52 | } 53 | return null; 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Elite/API/Models/EventLevel.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using Newtonsoft.Json.Converters; 11 | using System.Runtime; 12 | using System.Runtime.Serialization; 13 | 14 | /// 15 | /// Defines values for EventLevel. 16 | /// 17 | [JsonConverter(typeof(StringEnumConverter))] 18 | public enum EventLevel 19 | { 20 | [EnumMember(Value = "Silent")] 21 | Silent, 22 | [EnumMember(Value = "Info")] 23 | Info, 24 | [EnumMember(Value = "Warning")] 25 | Warning, 26 | [EnumMember(Value = "Highlight")] 27 | Highlight, 28 | [EnumMember(Value = "Error")] 29 | Error 30 | } 31 | internal static class EventLevelEnumExtension 32 | { 33 | internal static string ToSerializedValue(this EventLevel? value) 34 | { 35 | return value == null ? null : ((EventLevel)value).ToSerializedValue(); 36 | } 37 | 38 | internal static string ToSerializedValue(this EventLevel value) 39 | { 40 | switch( value ) 41 | { 42 | case EventLevel.Silent: 43 | return "Silent"; 44 | case EventLevel.Info: 45 | return "Info"; 46 | case EventLevel.Warning: 47 | return "Warning"; 48 | case EventLevel.Highlight: 49 | return "Highlight"; 50 | case EventLevel.Error: 51 | return "Error"; 52 | } 53 | return null; 54 | } 55 | 56 | internal static EventLevel? ParseEventLevel(this string value) 57 | { 58 | switch( value ) 59 | { 60 | case "Silent": 61 | return EventLevel.Silent; 62 | case "Info": 63 | return EventLevel.Info; 64 | case "Warning": 65 | return EventLevel.Warning; 66 | case "Highlight": 67 | return EventLevel.Highlight; 68 | case "Error": 69 | return EventLevel.Error; 70 | } 71 | return null; 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /Elite/API/Models/EventModel.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class EventModel 13 | { 14 | /// 15 | /// Initializes a new instance of the EventModel class. 16 | /// 17 | public EventModel() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the EventModel class. 24 | /// 25 | /// Possible values include: 'Silent', 'Info', 26 | /// 'Warning', 'Highlight', 'Error' 27 | /// Possible values include: 'Normal', 28 | /// 'Download' 29 | public EventModel(int? id = default(int?), System.DateTime? time = default(System.DateTime?), string messageHeader = default(string), string messageBody = default(string), EventLevel? level = default(EventLevel?), EventType? type = default(EventType?), string context = default(string)) 30 | { 31 | Id = id; 32 | Time = time; 33 | MessageHeader = messageHeader; 34 | MessageBody = messageBody; 35 | Level = level; 36 | Type = type; 37 | Context = context; 38 | CustomInit(); 39 | } 40 | 41 | /// 42 | /// An initialization method that performs custom operations like setting defaults 43 | /// 44 | partial void CustomInit(); 45 | 46 | /// 47 | /// 48 | [JsonProperty(PropertyName = "id")] 49 | public int? Id { get; set; } 50 | 51 | /// 52 | /// 53 | [JsonProperty(PropertyName = "time")] 54 | public System.DateTime? Time { get; set; } 55 | 56 | /// 57 | /// 58 | [JsonProperty(PropertyName = "messageHeader")] 59 | public string MessageHeader { get; set; } 60 | 61 | /// 62 | /// 63 | [JsonProperty(PropertyName = "messageBody")] 64 | public string MessageBody { get; set; } 65 | 66 | /// 67 | /// Gets or sets possible values include: 'Silent', 'Info', 'Warning', 68 | /// 'Highlight', 'Error' 69 | /// 70 | [JsonProperty(PropertyName = "level")] 71 | public EventLevel? Level { get; set; } 72 | 73 | /// 74 | /// Gets or sets possible values include: 'Normal', 'Download' 75 | /// 76 | [JsonProperty(PropertyName = "type")] 77 | public EventType? Type { get; set; } 78 | 79 | /// 80 | /// 81 | [JsonProperty(PropertyName = "context")] 82 | public string Context { get; set; } 83 | 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /Elite/API/Models/EventType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using Newtonsoft.Json.Converters; 11 | using System.Runtime; 12 | using System.Runtime.Serialization; 13 | 14 | /// 15 | /// Defines values for EventType. 16 | /// 17 | [JsonConverter(typeof(StringEnumConverter))] 18 | public enum EventType 19 | { 20 | [EnumMember(Value = "Normal")] 21 | Normal, 22 | [EnumMember(Value = "Download")] 23 | Download 24 | } 25 | internal static class EventTypeEnumExtension 26 | { 27 | internal static string ToSerializedValue(this EventType? value) 28 | { 29 | return value == null ? null : ((EventType)value).ToSerializedValue(); 30 | } 31 | 32 | internal static string ToSerializedValue(this EventType value) 33 | { 34 | switch( value ) 35 | { 36 | case EventType.Normal: 37 | return "Normal"; 38 | case EventType.Download: 39 | return "Download"; 40 | } 41 | return null; 42 | } 43 | 44 | internal static EventType? ParseEventType(this string value) 45 | { 46 | switch( value ) 47 | { 48 | case "Normal": 49 | return EventType.Normal; 50 | case "Download": 51 | return EventType.Download; 52 | } 53 | return null; 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Elite/API/Models/FileIndicator.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class FileIndicator 13 | { 14 | /// 15 | /// Initializes a new instance of the FileIndicator class. 16 | /// 17 | public FileIndicator() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the FileIndicator class. 24 | /// 25 | public FileIndicator(string fileName = default(string), string filePath = default(string), string shA2 = default(string), string shA1 = default(string), string mD5 = default(string), int? id = default(int?), string name = default(string)) 26 | { 27 | FileName = fileName; 28 | FilePath = filePath; 29 | ShA2 = shA2; 30 | ShA1 = shA1; 31 | MD5 = mD5; 32 | Id = id; 33 | Name = name; 34 | CustomInit(); 35 | } 36 | 37 | /// 38 | /// An initialization method that performs custom operations like setting defaults 39 | /// 40 | partial void CustomInit(); 41 | 42 | /// 43 | /// 44 | [JsonProperty(PropertyName = "fileName")] 45 | public string FileName { get; set; } 46 | 47 | /// 48 | /// 49 | [JsonProperty(PropertyName = "filePath")] 50 | public string FilePath { get; set; } 51 | 52 | /// 53 | /// 54 | [JsonProperty(PropertyName = "shA2")] 55 | public string ShA2 { get; set; } 56 | 57 | /// 58 | /// 59 | [JsonProperty(PropertyName = "shA1")] 60 | public string ShA1 { get; set; } 61 | 62 | /// 63 | /// 64 | [JsonProperty(PropertyName = "mD5")] 65 | public string MD5 { get; set; } 66 | 67 | /// 68 | /// 69 | [JsonProperty(PropertyName = "id")] 70 | public int? Id { get; set; } 71 | 72 | /// 73 | /// 74 | [JsonProperty(PropertyName = "name")] 75 | public string Name { get; set; } 76 | 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /Elite/API/Models/GruntSetTaskingType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using Newtonsoft.Json.Converters; 11 | using System.Runtime; 12 | using System.Runtime.Serialization; 13 | 14 | /// 15 | /// Defines values for GruntSetTaskingType. 16 | /// 17 | [JsonConverter(typeof(StringEnumConverter))] 18 | public enum GruntSetTaskingType 19 | { 20 | [EnumMember(Value = "Delay")] 21 | Delay, 22 | [EnumMember(Value = "Jitter")] 23 | Jitter, 24 | [EnumMember(Value = "ConnectAttempts")] 25 | ConnectAttempts 26 | } 27 | internal static class GruntSetTaskingTypeEnumExtension 28 | { 29 | internal static string ToSerializedValue(this GruntSetTaskingType? value) 30 | { 31 | return value == null ? null : ((GruntSetTaskingType)value).ToSerializedValue(); 32 | } 33 | 34 | internal static string ToSerializedValue(this GruntSetTaskingType value) 35 | { 36 | switch( value ) 37 | { 38 | case GruntSetTaskingType.Delay: 39 | return "Delay"; 40 | case GruntSetTaskingType.Jitter: 41 | return "Jitter"; 42 | case GruntSetTaskingType.ConnectAttempts: 43 | return "ConnectAttempts"; 44 | } 45 | return null; 46 | } 47 | 48 | internal static GruntSetTaskingType? ParseGruntSetTaskingType(this string value) 49 | { 50 | switch( value ) 51 | { 52 | case "Delay": 53 | return GruntSetTaskingType.Delay; 54 | case "Jitter": 55 | return GruntSetTaskingType.Jitter; 56 | case "ConnectAttempts": 57 | return GruntSetTaskingType.ConnectAttempts; 58 | } 59 | return null; 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Elite/API/Models/GruntStatus.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using Newtonsoft.Json.Converters; 11 | using System.Runtime; 12 | using System.Runtime.Serialization; 13 | 14 | /// 15 | /// Defines values for GruntStatus. 16 | /// 17 | [JsonConverter(typeof(StringEnumConverter))] 18 | public enum GruntStatus 19 | { 20 | [EnumMember(Value = "Uninitialized")] 21 | Uninitialized, 22 | [EnumMember(Value = "Stage0")] 23 | Stage0, 24 | [EnumMember(Value = "Stage1")] 25 | Stage1, 26 | [EnumMember(Value = "Stage2")] 27 | Stage2, 28 | [EnumMember(Value = "Active")] 29 | Active, 30 | [EnumMember(Value = "Lost")] 31 | Lost, 32 | [EnumMember(Value = "Killed")] 33 | Killed, 34 | [EnumMember(Value = "Disconnected")] 35 | Disconnected 36 | } 37 | internal static class GruntStatusEnumExtension 38 | { 39 | internal static string ToSerializedValue(this GruntStatus? value) 40 | { 41 | return value == null ? null : ((GruntStatus)value).ToSerializedValue(); 42 | } 43 | 44 | internal static string ToSerializedValue(this GruntStatus value) 45 | { 46 | switch( value ) 47 | { 48 | case GruntStatus.Uninitialized: 49 | return "Uninitialized"; 50 | case GruntStatus.Stage0: 51 | return "Stage0"; 52 | case GruntStatus.Stage1: 53 | return "Stage1"; 54 | case GruntStatus.Stage2: 55 | return "Stage2"; 56 | case GruntStatus.Active: 57 | return "Active"; 58 | case GruntStatus.Lost: 59 | return "Lost"; 60 | case GruntStatus.Killed: 61 | return "Killed"; 62 | case GruntStatus.Disconnected: 63 | return "Disconnected"; 64 | } 65 | return null; 66 | } 67 | 68 | internal static GruntStatus? ParseGruntStatus(this string value) 69 | { 70 | switch( value ) 71 | { 72 | case "Uninitialized": 73 | return GruntStatus.Uninitialized; 74 | case "Stage0": 75 | return GruntStatus.Stage0; 76 | case "Stage1": 77 | return GruntStatus.Stage1; 78 | case "Stage2": 79 | return GruntStatus.Stage2; 80 | case "Active": 81 | return GruntStatus.Active; 82 | case "Lost": 83 | return GruntStatus.Lost; 84 | case "Killed": 85 | return GruntStatus.Killed; 86 | case "Disconnected": 87 | return GruntStatus.Disconnected; 88 | } 89 | return null; 90 | } 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /Elite/API/Models/GruntTask.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Collections; 11 | using System.Collections.Generic; 12 | using System.Linq; 13 | 14 | public partial class GruntTask 15 | { 16 | /// 17 | /// Initializes a new instance of the GruntTask class. 18 | /// 19 | public GruntTask() 20 | { 21 | CustomInit(); 22 | } 23 | 24 | /// 25 | /// Initializes a new instance of the GruntTask class. 26 | /// 27 | public GruntTask(int? id = default(int?), string name = default(string), string description = default(string), string help = default(string), bool? tokenTask = default(bool?), string code = default(string), IList referenceAssemblies = default(IList), IList referenceSourceLibraries = default(IList), IList embeddedResources = default(IList), bool? unsafeCompile = default(bool?), IList options = default(IList)) 28 | { 29 | Id = id; 30 | Name = name; 31 | Description = description; 32 | Help = help; 33 | TokenTask = tokenTask; 34 | Code = code; 35 | ReferenceAssemblies = referenceAssemblies; 36 | ReferenceSourceLibraries = referenceSourceLibraries; 37 | EmbeddedResources = embeddedResources; 38 | UnsafeCompile = unsafeCompile; 39 | Options = options; 40 | CustomInit(); 41 | } 42 | 43 | /// 44 | /// An initialization method that performs custom operations like setting defaults 45 | /// 46 | partial void CustomInit(); 47 | 48 | /// 49 | /// 50 | [JsonProperty(PropertyName = "id")] 51 | public int? Id { get; set; } 52 | 53 | /// 54 | /// 55 | [JsonProperty(PropertyName = "name")] 56 | public string Name { get; set; } 57 | 58 | /// 59 | /// 60 | [JsonProperty(PropertyName = "description")] 61 | public string Description { get; set; } 62 | 63 | /// 64 | /// 65 | [JsonProperty(PropertyName = "help")] 66 | public string Help { get; set; } 67 | 68 | /// 69 | /// 70 | [JsonProperty(PropertyName = "tokenTask")] 71 | public bool? TokenTask { get; set; } 72 | 73 | /// 74 | /// 75 | [JsonProperty(PropertyName = "code")] 76 | public string Code { get; set; } 77 | 78 | /// 79 | /// 80 | [JsonProperty(PropertyName = "referenceAssemblies")] 81 | public IList ReferenceAssemblies { get; set; } 82 | 83 | /// 84 | /// 85 | [JsonProperty(PropertyName = "referenceSourceLibraries")] 86 | public IList ReferenceSourceLibraries { get; set; } 87 | 88 | /// 89 | /// 90 | [JsonProperty(PropertyName = "embeddedResources")] 91 | public IList EmbeddedResources { get; set; } 92 | 93 | /// 94 | /// 95 | [JsonProperty(PropertyName = "unsafeCompile")] 96 | public bool? UnsafeCompile { get; set; } 97 | 98 | /// 99 | /// 100 | [JsonProperty(PropertyName = "options")] 101 | public IList Options { get; set; } 102 | 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /Elite/API/Models/GruntTaskOption.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class GruntTaskOption 13 | { 14 | /// 15 | /// Initializes a new instance of the GruntTaskOption class. 16 | /// 17 | public GruntTaskOption() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the GruntTaskOption class. 24 | /// 25 | public GruntTaskOption(int? id = default(int?), string name = default(string), string value = default(string), string description = default(string)) 26 | { 27 | Id = id; 28 | Name = name; 29 | Value = value; 30 | Description = description; 31 | CustomInit(); 32 | } 33 | 34 | /// 35 | /// An initialization method that performs custom operations like setting defaults 36 | /// 37 | partial void CustomInit(); 38 | 39 | /// 40 | /// 41 | [JsonProperty(PropertyName = "id")] 42 | public int? Id { get; set; } 43 | 44 | /// 45 | /// 46 | [JsonProperty(PropertyName = "name")] 47 | public string Name { get; set; } 48 | 49 | /// 50 | /// 51 | [JsonProperty(PropertyName = "value")] 52 | public string Value { get; set; } 53 | 54 | /// 55 | /// 56 | [JsonProperty(PropertyName = "description")] 57 | public string Description { get; set; } 58 | 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Elite/API/Models/GruntTasking.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class GruntTasking 13 | { 14 | /// 15 | /// Initializes a new instance of the GruntTasking class. 16 | /// 17 | public GruntTasking() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the GruntTasking class. 24 | /// 25 | /// Possible values include: 'Assembly', 'SetDelay', 26 | /// 'SetJitter', 'SetConnectAttempts', 'Kill', 'Connect', 'Disconnect', 27 | /// 'Jobs' 28 | /// Possible values include: 'Uninitialized', 29 | /// 'Tasked', 'Progressed', 'Completed' 30 | public GruntTasking(int? id = default(int?), string name = default(string), int? gruntId = default(int?), int? taskId = default(int?), GruntTaskingType? type = default(GruntTaskingType?), string taskingMessage = default(string), bool? tokenTask = default(bool?), string taskingCommand = default(string), string taskingUser = default(string), GruntTaskingStatus? status = default(GruntTaskingStatus?), string gruntTaskOutput = default(string), System.DateTime? taskingTime = default(System.DateTime?), System.DateTime? completionTime = default(System.DateTime?), GruntTaskingMessage gruntTaskingMessage = default(GruntTaskingMessage)) 31 | { 32 | Id = id; 33 | Name = name; 34 | GruntId = gruntId; 35 | TaskId = taskId; 36 | Type = type; 37 | TaskingMessage = taskingMessage; 38 | TokenTask = tokenTask; 39 | TaskingCommand = taskingCommand; 40 | TaskingUser = taskingUser; 41 | Status = status; 42 | GruntTaskOutput = gruntTaskOutput; 43 | TaskingTime = taskingTime; 44 | CompletionTime = completionTime; 45 | GruntTaskingMessage = gruntTaskingMessage; 46 | CustomInit(); 47 | } 48 | 49 | /// 50 | /// An initialization method that performs custom operations like setting defaults 51 | /// 52 | partial void CustomInit(); 53 | 54 | /// 55 | /// 56 | [JsonProperty(PropertyName = "id")] 57 | public int? Id { get; set; } 58 | 59 | /// 60 | /// 61 | [JsonProperty(PropertyName = "name")] 62 | public string Name { get; set; } 63 | 64 | /// 65 | /// 66 | [JsonProperty(PropertyName = "gruntId")] 67 | public int? GruntId { get; set; } 68 | 69 | /// 70 | /// 71 | [JsonProperty(PropertyName = "taskId")] 72 | public int? TaskId { get; set; } 73 | 74 | /// 75 | /// Gets or sets possible values include: 'Assembly', 'SetDelay', 76 | /// 'SetJitter', 'SetConnectAttempts', 'Kill', 'Connect', 'Disconnect', 77 | /// 'Jobs' 78 | /// 79 | [JsonProperty(PropertyName = "type")] 80 | public GruntTaskingType? Type { get; set; } 81 | 82 | /// 83 | /// 84 | [JsonProperty(PropertyName = "taskingMessage")] 85 | public string TaskingMessage { get; set; } 86 | 87 | /// 88 | /// 89 | [JsonProperty(PropertyName = "tokenTask")] 90 | public bool? TokenTask { get; set; } 91 | 92 | /// 93 | /// 94 | [JsonProperty(PropertyName = "taskingCommand")] 95 | public string TaskingCommand { get; set; } 96 | 97 | /// 98 | /// 99 | [JsonProperty(PropertyName = "taskingUser")] 100 | public string TaskingUser { get; set; } 101 | 102 | /// 103 | /// Gets or sets possible values include: 'Uninitialized', 'Tasked', 104 | /// 'Progressed', 'Completed' 105 | /// 106 | [JsonProperty(PropertyName = "status")] 107 | public GruntTaskingStatus? Status { get; set; } 108 | 109 | /// 110 | /// 111 | [JsonProperty(PropertyName = "gruntTaskOutput")] 112 | public string GruntTaskOutput { get; set; } 113 | 114 | /// 115 | /// 116 | [JsonProperty(PropertyName = "taskingTime")] 117 | public System.DateTime? TaskingTime { get; set; } 118 | 119 | /// 120 | /// 121 | [JsonProperty(PropertyName = "completionTime")] 122 | public System.DateTime? CompletionTime { get; set; } 123 | 124 | /// 125 | /// 126 | [JsonProperty(PropertyName = "gruntTaskingMessage")] 127 | public GruntTaskingMessage GruntTaskingMessage { get; private set; } 128 | 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /Elite/API/Models/GruntTaskingMessage.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class GruntTaskingMessage 13 | { 14 | /// 15 | /// Initializes a new instance of the GruntTaskingMessage class. 16 | /// 17 | public GruntTaskingMessage() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the GruntTaskingMessage class. 24 | /// 25 | /// Possible values include: 'Assembly', 'SetDelay', 26 | /// 'SetJitter', 'SetConnectAttempts', 'Kill', 'Connect', 'Disconnect', 27 | /// 'Jobs' 28 | public GruntTaskingMessage(GruntTaskingType? type = default(GruntTaskingType?), string name = default(string), string message = default(string), bool? token = default(bool?)) 29 | { 30 | Type = type; 31 | Name = name; 32 | Message = message; 33 | Token = token; 34 | CustomInit(); 35 | } 36 | 37 | /// 38 | /// An initialization method that performs custom operations like setting defaults 39 | /// 40 | partial void CustomInit(); 41 | 42 | /// 43 | /// Gets or sets possible values include: 'Assembly', 'SetDelay', 44 | /// 'SetJitter', 'SetConnectAttempts', 'Kill', 'Connect', 'Disconnect', 45 | /// 'Jobs' 46 | /// 47 | [JsonProperty(PropertyName = "type")] 48 | public GruntTaskingType? Type { get; set; } 49 | 50 | /// 51 | /// 52 | [JsonProperty(PropertyName = "name")] 53 | public string Name { get; set; } 54 | 55 | /// 56 | /// 57 | [JsonProperty(PropertyName = "message")] 58 | public string Message { get; set; } 59 | 60 | /// 61 | /// 62 | [JsonProperty(PropertyName = "token")] 63 | public bool? Token { get; set; } 64 | 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Elite/API/Models/GruntTaskingStatus.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using Newtonsoft.Json.Converters; 11 | using System.Runtime; 12 | using System.Runtime.Serialization; 13 | 14 | /// 15 | /// Defines values for GruntTaskingStatus. 16 | /// 17 | [JsonConverter(typeof(StringEnumConverter))] 18 | public enum GruntTaskingStatus 19 | { 20 | [EnumMember(Value = "Uninitialized")] 21 | Uninitialized, 22 | [EnumMember(Value = "Tasked")] 23 | Tasked, 24 | [EnumMember(Value = "Progressed")] 25 | Progressed, 26 | [EnumMember(Value = "Completed")] 27 | Completed 28 | } 29 | internal static class GruntTaskingStatusEnumExtension 30 | { 31 | internal static string ToSerializedValue(this GruntTaskingStatus? value) 32 | { 33 | return value == null ? null : ((GruntTaskingStatus)value).ToSerializedValue(); 34 | } 35 | 36 | internal static string ToSerializedValue(this GruntTaskingStatus value) 37 | { 38 | switch( value ) 39 | { 40 | case GruntTaskingStatus.Uninitialized: 41 | return "Uninitialized"; 42 | case GruntTaskingStatus.Tasked: 43 | return "Tasked"; 44 | case GruntTaskingStatus.Progressed: 45 | return "Progressed"; 46 | case GruntTaskingStatus.Completed: 47 | return "Completed"; 48 | } 49 | return null; 50 | } 51 | 52 | internal static GruntTaskingStatus? ParseGruntTaskingStatus(this string value) 53 | { 54 | switch( value ) 55 | { 56 | case "Uninitialized": 57 | return GruntTaskingStatus.Uninitialized; 58 | case "Tasked": 59 | return GruntTaskingStatus.Tasked; 60 | case "Progressed": 61 | return GruntTaskingStatus.Progressed; 62 | case "Completed": 63 | return GruntTaskingStatus.Completed; 64 | } 65 | return null; 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Elite/API/Models/GruntTaskingType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using Newtonsoft.Json.Converters; 11 | using System.Runtime; 12 | using System.Runtime.Serialization; 13 | 14 | /// 15 | /// Defines values for GruntTaskingType. 16 | /// 17 | [JsonConverter(typeof(StringEnumConverter))] 18 | public enum GruntTaskingType 19 | { 20 | [EnumMember(Value = "Assembly")] 21 | Assembly, 22 | [EnumMember(Value = "SetDelay")] 23 | SetDelay, 24 | [EnumMember(Value = "SetJitter")] 25 | SetJitter, 26 | [EnumMember(Value = "SetConnectAttempts")] 27 | SetConnectAttempts, 28 | [EnumMember(Value = "Kill")] 29 | Kill, 30 | [EnumMember(Value = "Connect")] 31 | Connect, 32 | [EnumMember(Value = "Disconnect")] 33 | Disconnect, 34 | [EnumMember(Value = "Jobs")] 35 | Jobs 36 | } 37 | internal static class GruntTaskingTypeEnumExtension 38 | { 39 | internal static string ToSerializedValue(this GruntTaskingType? value) 40 | { 41 | return value == null ? null : ((GruntTaskingType)value).ToSerializedValue(); 42 | } 43 | 44 | internal static string ToSerializedValue(this GruntTaskingType value) 45 | { 46 | switch( value ) 47 | { 48 | case GruntTaskingType.Assembly: 49 | return "Assembly"; 50 | case GruntTaskingType.SetDelay: 51 | return "SetDelay"; 52 | case GruntTaskingType.SetJitter: 53 | return "SetJitter"; 54 | case GruntTaskingType.SetConnectAttempts: 55 | return "SetConnectAttempts"; 56 | case GruntTaskingType.Kill: 57 | return "Kill"; 58 | case GruntTaskingType.Connect: 59 | return "Connect"; 60 | case GruntTaskingType.Disconnect: 61 | return "Disconnect"; 62 | case GruntTaskingType.Jobs: 63 | return "Jobs"; 64 | } 65 | return null; 66 | } 67 | 68 | internal static GruntTaskingType? ParseGruntTaskingType(this string value) 69 | { 70 | switch( value ) 71 | { 72 | case "Assembly": 73 | return GruntTaskingType.Assembly; 74 | case "SetDelay": 75 | return GruntTaskingType.SetDelay; 76 | case "SetJitter": 77 | return GruntTaskingType.SetJitter; 78 | case "SetConnectAttempts": 79 | return GruntTaskingType.SetConnectAttempts; 80 | case "Kill": 81 | return GruntTaskingType.Kill; 82 | case "Connect": 83 | return GruntTaskingType.Connect; 84 | case "Disconnect": 85 | return GruntTaskingType.Disconnect; 86 | case "Jobs": 87 | return GruntTaskingType.Jobs; 88 | } 89 | return null; 90 | } 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /Elite/API/Models/HTTPListener.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class HttpListener 13 | { 14 | /// 15 | /// Initializes a new instance of the HttpListener class. 16 | /// 17 | public HttpListener() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the HttpListener class. 24 | /// 25 | /// Possible values include: 'Uninitialized', 26 | /// 'Active', 'Stopped' 27 | public HttpListener(bool? useSSL = default(bool?), string sslCertificate = default(string), string sslCertificatePassword = default(string), string sslCertHash = default(string), string url = default(string), int? id = default(int?), string name = default(string), string description = default(string), string bindAddress = default(string), int? bindPort = default(int?), string connectAddress = default(string), int? profileId = default(int?), int? listenerTypeId = default(int?), ListenerStatus? status = default(ListenerStatus?), string covenantToken = default(string), System.DateTime? startTime = default(System.DateTime?)) 28 | { 29 | UseSSL = useSSL; 30 | SslCertificate = sslCertificate; 31 | SslCertificatePassword = sslCertificatePassword; 32 | SslCertHash = sslCertHash; 33 | Url = url; 34 | Id = id; 35 | Name = name; 36 | Description = description; 37 | BindAddress = bindAddress; 38 | BindPort = bindPort; 39 | ConnectAddress = connectAddress; 40 | ProfileId = profileId; 41 | ListenerTypeId = listenerTypeId; 42 | Status = status; 43 | CovenantToken = covenantToken; 44 | StartTime = startTime; 45 | CustomInit(); 46 | } 47 | 48 | /// 49 | /// An initialization method that performs custom operations like setting defaults 50 | /// 51 | partial void CustomInit(); 52 | 53 | /// 54 | /// 55 | [JsonProperty(PropertyName = "useSSL")] 56 | public bool? UseSSL { get; set; } 57 | 58 | /// 59 | /// 60 | [JsonProperty(PropertyName = "sslCertificate")] 61 | public string SslCertificate { get; set; } 62 | 63 | /// 64 | /// 65 | [JsonProperty(PropertyName = "sslCertificatePassword")] 66 | public string SslCertificatePassword { get; set; } 67 | 68 | /// 69 | /// 70 | [JsonProperty(PropertyName = "sslCertHash")] 71 | public string SslCertHash { get; private set; } 72 | 73 | /// 74 | /// 75 | [JsonProperty(PropertyName = "url")] 76 | public string Url { get; set; } 77 | 78 | /// 79 | /// 80 | [JsonProperty(PropertyName = "id")] 81 | public int? Id { get; set; } 82 | 83 | /// 84 | /// 85 | [JsonProperty(PropertyName = "name")] 86 | public string Name { get; set; } 87 | 88 | /// 89 | /// 90 | [JsonProperty(PropertyName = "description")] 91 | public string Description { get; set; } 92 | 93 | /// 94 | /// 95 | [JsonProperty(PropertyName = "bindAddress")] 96 | public string BindAddress { get; set; } 97 | 98 | /// 99 | /// 100 | [JsonProperty(PropertyName = "bindPort")] 101 | public int? BindPort { get; set; } 102 | 103 | /// 104 | /// 105 | [JsonProperty(PropertyName = "connectAddress")] 106 | public string ConnectAddress { get; set; } 107 | 108 | /// 109 | /// 110 | [JsonProperty(PropertyName = "profileId")] 111 | public int? ProfileId { get; set; } 112 | 113 | /// 114 | /// 115 | [JsonProperty(PropertyName = "listenerTypeId")] 116 | public int? ListenerTypeId { get; set; } 117 | 118 | /// 119 | /// Gets or sets possible values include: 'Uninitialized', 'Active', 120 | /// 'Stopped' 121 | /// 122 | [JsonProperty(PropertyName = "status")] 123 | public ListenerStatus? Status { get; set; } 124 | 125 | /// 126 | /// 127 | [JsonProperty(PropertyName = "covenantToken")] 128 | public string CovenantToken { get; set; } 129 | 130 | /// 131 | /// 132 | [JsonProperty(PropertyName = "startTime")] 133 | public System.DateTime? StartTime { get; set; } 134 | 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /Elite/API/Models/HashType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using Newtonsoft.Json.Converters; 11 | using System.Runtime; 12 | using System.Runtime.Serialization; 13 | 14 | /// 15 | /// Defines values for HashType. 16 | /// 17 | [JsonConverter(typeof(StringEnumConverter))] 18 | public enum HashType 19 | { 20 | [EnumMember(Value = "NTLM")] 21 | NTLM, 22 | [EnumMember(Value = "LM")] 23 | LM, 24 | [EnumMember(Value = "SHA1")] 25 | SHA1 26 | } 27 | internal static class HashTypeEnumExtension 28 | { 29 | internal static string ToSerializedValue(this HashType? value) 30 | { 31 | return value == null ? null : ((HashType)value).ToSerializedValue(); 32 | } 33 | 34 | internal static string ToSerializedValue(this HashType value) 35 | { 36 | switch( value ) 37 | { 38 | case HashType.NTLM: 39 | return "NTLM"; 40 | case HashType.LM: 41 | return "LM"; 42 | case HashType.SHA1: 43 | return "SHA1"; 44 | } 45 | return null; 46 | } 47 | 48 | internal static HashType? ParseHashType(this string value) 49 | { 50 | switch( value ) 51 | { 52 | case "NTLM": 53 | return HashType.NTLM; 54 | case "LM": 55 | return HashType.LM; 56 | case "SHA1": 57 | return HashType.SHA1; 58 | } 59 | return null; 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Elite/API/Models/HostedFile.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class HostedFile 13 | { 14 | /// 15 | /// Initializes a new instance of the HostedFile class. 16 | /// 17 | public HostedFile() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the HostedFile class. 24 | /// 25 | public HostedFile(int? id = default(int?), int? listenerId = default(int?), string path = default(string), string content = default(string)) 26 | { 27 | Id = id; 28 | ListenerId = listenerId; 29 | Path = path; 30 | Content = content; 31 | CustomInit(); 32 | } 33 | 34 | /// 35 | /// An initialization method that performs custom operations like setting defaults 36 | /// 37 | partial void CustomInit(); 38 | 39 | /// 40 | /// 41 | [JsonProperty(PropertyName = "id")] 42 | public int? Id { get; set; } 43 | 44 | /// 45 | /// 46 | [JsonProperty(PropertyName = "listenerId")] 47 | public int? ListenerId { get; set; } 48 | 49 | /// 50 | /// 51 | [JsonProperty(PropertyName = "path")] 52 | public string Path { get; set; } 53 | 54 | /// 55 | /// 56 | [JsonProperty(PropertyName = "content")] 57 | public string Content { get; set; } 58 | 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Elite/API/Models/HttpProfile.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class HttpProfile 13 | { 14 | /// 15 | /// Initializes a new instance of the HttpProfile class. 16 | /// 17 | public HttpProfile() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the HttpProfile class. 24 | /// 25 | public HttpProfile(string name = default(string), string httpUrls = default(string), string httpCookies = default(string), string httpMessageTransform = default(string), string httpRequestHeaders = default(string), string httpPostRequest = default(string), string httpResponseHeaders = default(string), string httpGetResponse = default(string), string httpPostResponse = default(string), int? id = default(int?)) 26 | { 27 | Name = name; 28 | HttpUrls = httpUrls; 29 | HttpCookies = httpCookies; 30 | HttpMessageTransform = httpMessageTransform; 31 | HttpRequestHeaders = httpRequestHeaders; 32 | HttpPostRequest = httpPostRequest; 33 | HttpResponseHeaders = httpResponseHeaders; 34 | HttpGetResponse = httpGetResponse; 35 | HttpPostResponse = httpPostResponse; 36 | Id = id; 37 | CustomInit(); 38 | } 39 | 40 | /// 41 | /// An initialization method that performs custom operations like setting defaults 42 | /// 43 | partial void CustomInit(); 44 | 45 | /// 46 | /// 47 | [JsonProperty(PropertyName = "name")] 48 | public string Name { get; set; } 49 | 50 | /// 51 | /// 52 | [JsonProperty(PropertyName = "httpUrls")] 53 | public string HttpUrls { get; set; } 54 | 55 | /// 56 | /// 57 | [JsonProperty(PropertyName = "httpCookies")] 58 | public string HttpCookies { get; set; } 59 | 60 | /// 61 | /// 62 | [JsonProperty(PropertyName = "httpMessageTransform")] 63 | public string HttpMessageTransform { get; set; } 64 | 65 | /// 66 | /// 67 | [JsonProperty(PropertyName = "httpRequestHeaders")] 68 | public string HttpRequestHeaders { get; set; } 69 | 70 | /// 71 | /// 72 | [JsonProperty(PropertyName = "httpPostRequest")] 73 | public string HttpPostRequest { get; set; } 74 | 75 | /// 76 | /// 77 | [JsonProperty(PropertyName = "httpResponseHeaders")] 78 | public string HttpResponseHeaders { get; set; } 79 | 80 | /// 81 | /// 82 | [JsonProperty(PropertyName = "httpGetResponse")] 83 | public string HttpGetResponse { get; set; } 84 | 85 | /// 86 | /// 87 | [JsonProperty(PropertyName = "httpPostResponse")] 88 | public string HttpPostResponse { get; set; } 89 | 90 | /// 91 | /// 92 | [JsonProperty(PropertyName = "id")] 93 | public int? Id { get; set; } 94 | 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /Elite/API/Models/IdentityRole.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class IdentityRole 13 | { 14 | /// 15 | /// Initializes a new instance of the IdentityRole class. 16 | /// 17 | public IdentityRole() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the IdentityRole class. 24 | /// 25 | public IdentityRole(string id = default(string), string name = default(string), string normalizedName = default(string), string concurrencyStamp = default(string)) 26 | { 27 | Id = id; 28 | Name = name; 29 | NormalizedName = normalizedName; 30 | ConcurrencyStamp = concurrencyStamp; 31 | CustomInit(); 32 | } 33 | 34 | /// 35 | /// An initialization method that performs custom operations like setting defaults 36 | /// 37 | partial void CustomInit(); 38 | 39 | /// 40 | /// 41 | [JsonProperty(PropertyName = "id")] 42 | public string Id { get; set; } 43 | 44 | /// 45 | /// 46 | [JsonProperty(PropertyName = "name")] 47 | public string Name { get; set; } 48 | 49 | /// 50 | /// 51 | [JsonProperty(PropertyName = "normalizedName")] 52 | public string NormalizedName { get; set; } 53 | 54 | /// 55 | /// 56 | [JsonProperty(PropertyName = "concurrencyStamp")] 57 | public string ConcurrencyStamp { get; set; } 58 | 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Elite/API/Models/IdentityUserRoleString.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class IdentityUserRoleString 13 | { 14 | /// 15 | /// Initializes a new instance of the IdentityUserRoleString class. 16 | /// 17 | public IdentityUserRoleString() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the IdentityUserRoleString class. 24 | /// 25 | public IdentityUserRoleString(string userId = default(string), string roleId = default(string)) 26 | { 27 | UserId = userId; 28 | RoleId = roleId; 29 | CustomInit(); 30 | } 31 | 32 | /// 33 | /// An initialization method that performs custom operations like setting defaults 34 | /// 35 | partial void CustomInit(); 36 | 37 | /// 38 | /// 39 | [JsonProperty(PropertyName = "userId")] 40 | public string UserId { get; set; } 41 | 42 | /// 43 | /// 44 | [JsonProperty(PropertyName = "roleId")] 45 | public string RoleId { get; set; } 46 | 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Elite/API/Models/Indicator.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class Indicator 13 | { 14 | /// 15 | /// Initializes a new instance of the Indicator class. 16 | /// 17 | public Indicator() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the Indicator class. 24 | /// 25 | public Indicator(int? id = default(int?), string name = default(string)) 26 | { 27 | Id = id; 28 | Name = name; 29 | CustomInit(); 30 | } 31 | 32 | /// 33 | /// An initialization method that performs custom operations like setting defaults 34 | /// 35 | partial void CustomInit(); 36 | 37 | /// 38 | /// 39 | [JsonProperty(PropertyName = "id")] 40 | public int? Id { get; set; } 41 | 42 | /// 43 | /// 44 | [JsonProperty(PropertyName = "name")] 45 | public string Name { get; set; } 46 | 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Elite/API/Models/InstallUtilLauncher.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class InstallUtilLauncher 13 | { 14 | /// 15 | /// Initializes a new instance of the InstallUtilLauncher class. 16 | /// 17 | public InstallUtilLauncher() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the InstallUtilLauncher class. 24 | /// 25 | /// Possible values include: 26 | /// 'Net40', 'Net35', 'NetCore21' 27 | /// Possible values include: 'Wmic', 'Regsvr32', 28 | /// 'Mshta', 'Cscript', 'Wscript', 'PowerShell', 'Binary', 'MSBuild', 29 | /// 'InstallUtil' 30 | /// Possible values include: 'HTTP', 31 | /// 'SMB' 32 | public InstallUtilLauncher(string diskCode = default(string), int? id = default(int?), int? listenerId = default(int?), DotNetVersion? dotNetFrameworkVersion = default(DotNetVersion?), LauncherType? type = default(LauncherType?), string name = default(string), string description = default(string), CommunicationType? commType = default(CommunicationType?), bool? validateCert = default(bool?), bool? useCertPinning = default(bool?), string smbPipeName = default(string), int? delay = default(int?), int? jitterPercent = default(int?), int? connectAttempts = default(int?), System.DateTime? killDate = default(System.DateTime?), string launcherString = default(string), string stagerCode = default(string), string base64ILByteString = default(string)) 33 | { 34 | DiskCode = diskCode; 35 | Id = id; 36 | ListenerId = listenerId; 37 | DotNetFrameworkVersion = dotNetFrameworkVersion; 38 | Type = type; 39 | Name = name; 40 | Description = description; 41 | CommType = commType; 42 | ValidateCert = validateCert; 43 | UseCertPinning = useCertPinning; 44 | SmbPipeName = smbPipeName; 45 | Delay = delay; 46 | JitterPercent = jitterPercent; 47 | ConnectAttempts = connectAttempts; 48 | KillDate = killDate; 49 | LauncherString = launcherString; 50 | StagerCode = stagerCode; 51 | Base64ILByteString = base64ILByteString; 52 | CustomInit(); 53 | } 54 | 55 | /// 56 | /// An initialization method that performs custom operations like setting defaults 57 | /// 58 | partial void CustomInit(); 59 | 60 | /// 61 | /// 62 | [JsonProperty(PropertyName = "diskCode")] 63 | public string DiskCode { get; set; } 64 | 65 | /// 66 | /// 67 | [JsonProperty(PropertyName = "id")] 68 | public int? Id { get; set; } 69 | 70 | /// 71 | /// 72 | [JsonProperty(PropertyName = "listenerId")] 73 | public int? ListenerId { get; set; } 74 | 75 | /// 76 | /// Gets or sets possible values include: 'Net40', 'Net35', 'NetCore21' 77 | /// 78 | [JsonProperty(PropertyName = "dotNetFrameworkVersion")] 79 | public DotNetVersion? DotNetFrameworkVersion { get; set; } 80 | 81 | /// 82 | /// Gets or sets possible values include: 'Wmic', 'Regsvr32', 'Mshta', 83 | /// 'Cscript', 'Wscript', 'PowerShell', 'Binary', 'MSBuild', 84 | /// 'InstallUtil' 85 | /// 86 | [JsonProperty(PropertyName = "type")] 87 | public LauncherType? Type { get; set; } 88 | 89 | /// 90 | /// 91 | [JsonProperty(PropertyName = "name")] 92 | public string Name { get; set; } 93 | 94 | /// 95 | /// 96 | [JsonProperty(PropertyName = "description")] 97 | public string Description { get; set; } 98 | 99 | /// 100 | /// Gets or sets possible values include: 'HTTP', 'SMB' 101 | /// 102 | [JsonProperty(PropertyName = "commType")] 103 | public CommunicationType? CommType { get; set; } 104 | 105 | /// 106 | /// 107 | [JsonProperty(PropertyName = "validateCert")] 108 | public bool? ValidateCert { get; set; } 109 | 110 | /// 111 | /// 112 | [JsonProperty(PropertyName = "useCertPinning")] 113 | public bool? UseCertPinning { get; set; } 114 | 115 | /// 116 | /// 117 | [JsonProperty(PropertyName = "smbPipeName")] 118 | public string SmbPipeName { get; set; } 119 | 120 | /// 121 | /// 122 | [JsonProperty(PropertyName = "delay")] 123 | public int? Delay { get; set; } 124 | 125 | /// 126 | /// 127 | [JsonProperty(PropertyName = "jitterPercent")] 128 | public int? JitterPercent { get; set; } 129 | 130 | /// 131 | /// 132 | [JsonProperty(PropertyName = "connectAttempts")] 133 | public int? ConnectAttempts { get; set; } 134 | 135 | /// 136 | /// 137 | [JsonProperty(PropertyName = "killDate")] 138 | public System.DateTime? KillDate { get; set; } 139 | 140 | /// 141 | /// 142 | [JsonProperty(PropertyName = "launcherString")] 143 | public string LauncherString { get; set; } 144 | 145 | /// 146 | /// 147 | [JsonProperty(PropertyName = "stagerCode")] 148 | public string StagerCode { get; set; } 149 | 150 | /// 151 | /// 152 | [JsonProperty(PropertyName = "base64ILByteString")] 153 | public string Base64ILByteString { get; set; } 154 | 155 | } 156 | } 157 | -------------------------------------------------------------------------------- /Elite/API/Models/IntegrityLevel.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using Newtonsoft.Json.Converters; 11 | using System.Runtime; 12 | using System.Runtime.Serialization; 13 | 14 | /// 15 | /// Defines values for IntegrityLevel. 16 | /// 17 | [JsonConverter(typeof(StringEnumConverter))] 18 | public enum IntegrityLevel 19 | { 20 | [EnumMember(Value = "Untrusted")] 21 | Untrusted, 22 | [EnumMember(Value = "Low")] 23 | Low, 24 | [EnumMember(Value = "Medium")] 25 | Medium, 26 | [EnumMember(Value = "High")] 27 | High, 28 | [EnumMember(Value = "System")] 29 | System 30 | } 31 | internal static class IntegrityLevelEnumExtension 32 | { 33 | internal static string ToSerializedValue(this IntegrityLevel? value) 34 | { 35 | return value == null ? null : ((IntegrityLevel)value).ToSerializedValue(); 36 | } 37 | 38 | internal static string ToSerializedValue(this IntegrityLevel value) 39 | { 40 | switch( value ) 41 | { 42 | case IntegrityLevel.Untrusted: 43 | return "Untrusted"; 44 | case IntegrityLevel.Low: 45 | return "Low"; 46 | case IntegrityLevel.Medium: 47 | return "Medium"; 48 | case IntegrityLevel.High: 49 | return "High"; 50 | case IntegrityLevel.System: 51 | return "System"; 52 | } 53 | return null; 54 | } 55 | 56 | internal static IntegrityLevel? ParseIntegrityLevel(this string value) 57 | { 58 | switch( value ) 59 | { 60 | case "Untrusted": 61 | return IntegrityLevel.Untrusted; 62 | case "Low": 63 | return IntegrityLevel.Low; 64 | case "Medium": 65 | return IntegrityLevel.Medium; 66 | case "High": 67 | return IntegrityLevel.High; 68 | case "System": 69 | return IntegrityLevel.System; 70 | } 71 | return null; 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /Elite/API/Models/Launcher.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class Launcher 13 | { 14 | /// 15 | /// Initializes a new instance of the Launcher class. 16 | /// 17 | public Launcher() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the Launcher class. 24 | /// 25 | /// Possible values include: 26 | /// 'Net40', 'Net35', 'NetCore21' 27 | /// Possible values include: 'Wmic', 'Regsvr32', 28 | /// 'Mshta', 'Cscript', 'Wscript', 'PowerShell', 'Binary', 'MSBuild', 29 | /// 'InstallUtil' 30 | /// Possible values include: 'HTTP', 31 | /// 'SMB' 32 | public Launcher(int? id = default(int?), int? listenerId = default(int?), DotNetVersion? dotNetFrameworkVersion = default(DotNetVersion?), LauncherType? type = default(LauncherType?), string name = default(string), string description = default(string), CommunicationType? commType = default(CommunicationType?), bool? validateCert = default(bool?), bool? useCertPinning = default(bool?), string smbPipeName = default(string), int? delay = default(int?), int? jitterPercent = default(int?), int? connectAttempts = default(int?), System.DateTime? killDate = default(System.DateTime?), string launcherString = default(string), string stagerCode = default(string), string base64ILByteString = default(string)) 33 | { 34 | Id = id; 35 | ListenerId = listenerId; 36 | DotNetFrameworkVersion = dotNetFrameworkVersion; 37 | Type = type; 38 | Name = name; 39 | Description = description; 40 | CommType = commType; 41 | ValidateCert = validateCert; 42 | UseCertPinning = useCertPinning; 43 | SmbPipeName = smbPipeName; 44 | Delay = delay; 45 | JitterPercent = jitterPercent; 46 | ConnectAttempts = connectAttempts; 47 | KillDate = killDate; 48 | LauncherString = launcherString; 49 | StagerCode = stagerCode; 50 | Base64ILByteString = base64ILByteString; 51 | CustomInit(); 52 | } 53 | 54 | /// 55 | /// An initialization method that performs custom operations like setting defaults 56 | /// 57 | partial void CustomInit(); 58 | 59 | /// 60 | /// 61 | [JsonProperty(PropertyName = "id")] 62 | public int? Id { get; set; } 63 | 64 | /// 65 | /// 66 | [JsonProperty(PropertyName = "listenerId")] 67 | public int? ListenerId { get; set; } 68 | 69 | /// 70 | /// Gets or sets possible values include: 'Net40', 'Net35', 'NetCore21' 71 | /// 72 | [JsonProperty(PropertyName = "dotNetFrameworkVersion")] 73 | public DotNetVersion? DotNetFrameworkVersion { get; set; } 74 | 75 | /// 76 | /// Gets or sets possible values include: 'Wmic', 'Regsvr32', 'Mshta', 77 | /// 'Cscript', 'Wscript', 'PowerShell', 'Binary', 'MSBuild', 78 | /// 'InstallUtil' 79 | /// 80 | [JsonProperty(PropertyName = "type")] 81 | public LauncherType? Type { get; set; } 82 | 83 | /// 84 | /// 85 | [JsonProperty(PropertyName = "name")] 86 | public string Name { get; set; } 87 | 88 | /// 89 | /// 90 | [JsonProperty(PropertyName = "description")] 91 | public string Description { get; set; } 92 | 93 | /// 94 | /// Gets or sets possible values include: 'HTTP', 'SMB' 95 | /// 96 | [JsonProperty(PropertyName = "commType")] 97 | public CommunicationType? CommType { get; set; } 98 | 99 | /// 100 | /// 101 | [JsonProperty(PropertyName = "validateCert")] 102 | public bool? ValidateCert { get; set; } 103 | 104 | /// 105 | /// 106 | [JsonProperty(PropertyName = "useCertPinning")] 107 | public bool? UseCertPinning { get; set; } 108 | 109 | /// 110 | /// 111 | [JsonProperty(PropertyName = "smbPipeName")] 112 | public string SmbPipeName { get; set; } 113 | 114 | /// 115 | /// 116 | [JsonProperty(PropertyName = "delay")] 117 | public int? Delay { get; set; } 118 | 119 | /// 120 | /// 121 | [JsonProperty(PropertyName = "jitterPercent")] 122 | public int? JitterPercent { get; set; } 123 | 124 | /// 125 | /// 126 | [JsonProperty(PropertyName = "connectAttempts")] 127 | public int? ConnectAttempts { get; set; } 128 | 129 | /// 130 | /// 131 | [JsonProperty(PropertyName = "killDate")] 132 | public System.DateTime? KillDate { get; set; } 133 | 134 | /// 135 | /// 136 | [JsonProperty(PropertyName = "launcherString")] 137 | public string LauncherString { get; set; } 138 | 139 | /// 140 | /// 141 | [JsonProperty(PropertyName = "stagerCode")] 142 | public string StagerCode { get; set; } 143 | 144 | /// 145 | /// 146 | [JsonProperty(PropertyName = "base64ILByteString")] 147 | public string Base64ILByteString { get; set; } 148 | 149 | } 150 | } 151 | -------------------------------------------------------------------------------- /Elite/API/Models/LauncherType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using Newtonsoft.Json.Converters; 11 | using System.Runtime; 12 | using System.Runtime.Serialization; 13 | 14 | /// 15 | /// Defines values for LauncherType. 16 | /// 17 | [JsonConverter(typeof(StringEnumConverter))] 18 | public enum LauncherType 19 | { 20 | [EnumMember(Value = "Wmic")] 21 | Wmic, 22 | [EnumMember(Value = "Regsvr32")] 23 | Regsvr32, 24 | [EnumMember(Value = "Mshta")] 25 | Mshta, 26 | [EnumMember(Value = "Cscript")] 27 | Cscript, 28 | [EnumMember(Value = "Wscript")] 29 | Wscript, 30 | [EnumMember(Value = "PowerShell")] 31 | PowerShell, 32 | [EnumMember(Value = "Binary")] 33 | Binary, 34 | [EnumMember(Value = "MSBuild")] 35 | MSBuild, 36 | [EnumMember(Value = "InstallUtil")] 37 | InstallUtil 38 | } 39 | internal static class LauncherTypeEnumExtension 40 | { 41 | internal static string ToSerializedValue(this LauncherType? value) 42 | { 43 | return value == null ? null : ((LauncherType)value).ToSerializedValue(); 44 | } 45 | 46 | internal static string ToSerializedValue(this LauncherType value) 47 | { 48 | switch( value ) 49 | { 50 | case LauncherType.Wmic: 51 | return "Wmic"; 52 | case LauncherType.Regsvr32: 53 | return "Regsvr32"; 54 | case LauncherType.Mshta: 55 | return "Mshta"; 56 | case LauncherType.Cscript: 57 | return "Cscript"; 58 | case LauncherType.Wscript: 59 | return "Wscript"; 60 | case LauncherType.PowerShell: 61 | return "PowerShell"; 62 | case LauncherType.Binary: 63 | return "Binary"; 64 | case LauncherType.MSBuild: 65 | return "MSBuild"; 66 | case LauncherType.InstallUtil: 67 | return "InstallUtil"; 68 | } 69 | return null; 70 | } 71 | 72 | internal static LauncherType? ParseLauncherType(this string value) 73 | { 74 | switch( value ) 75 | { 76 | case "Wmic": 77 | return LauncherType.Wmic; 78 | case "Regsvr32": 79 | return LauncherType.Regsvr32; 80 | case "Mshta": 81 | return LauncherType.Mshta; 82 | case "Cscript": 83 | return LauncherType.Cscript; 84 | case "Wscript": 85 | return LauncherType.Wscript; 86 | case "PowerShell": 87 | return LauncherType.PowerShell; 88 | case "Binary": 89 | return LauncherType.Binary; 90 | case "MSBuild": 91 | return LauncherType.MSBuild; 92 | case "InstallUtil": 93 | return LauncherType.InstallUtil; 94 | } 95 | return null; 96 | } 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Elite/API/Models/Listener.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class Listener 13 | { 14 | /// 15 | /// Initializes a new instance of the Listener class. 16 | /// 17 | public Listener() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the Listener class. 24 | /// 25 | /// Possible values include: 'Uninitialized', 26 | /// 'Active', 'Stopped' 27 | public Listener(int? id = default(int?), string name = default(string), string description = default(string), string bindAddress = default(string), int? bindPort = default(int?), string connectAddress = default(string), int? profileId = default(int?), int? listenerTypeId = default(int?), ListenerStatus? status = default(ListenerStatus?), string covenantToken = default(string), System.DateTime? startTime = default(System.DateTime?)) 28 | { 29 | Id = id; 30 | Name = name; 31 | Description = description; 32 | BindAddress = bindAddress; 33 | BindPort = bindPort; 34 | ConnectAddress = connectAddress; 35 | ProfileId = profileId; 36 | ListenerTypeId = listenerTypeId; 37 | Status = status; 38 | CovenantToken = covenantToken; 39 | StartTime = startTime; 40 | CustomInit(); 41 | } 42 | 43 | /// 44 | /// An initialization method that performs custom operations like setting defaults 45 | /// 46 | partial void CustomInit(); 47 | 48 | /// 49 | /// 50 | [JsonProperty(PropertyName = "id")] 51 | public int? Id { get; set; } 52 | 53 | /// 54 | /// 55 | [JsonProperty(PropertyName = "name")] 56 | public string Name { get; set; } 57 | 58 | /// 59 | /// 60 | [JsonProperty(PropertyName = "description")] 61 | public string Description { get; set; } 62 | 63 | /// 64 | /// 65 | [JsonProperty(PropertyName = "bindAddress")] 66 | public string BindAddress { get; set; } 67 | 68 | /// 69 | /// 70 | [JsonProperty(PropertyName = "bindPort")] 71 | public int? BindPort { get; set; } 72 | 73 | /// 74 | /// 75 | [JsonProperty(PropertyName = "connectAddress")] 76 | public string ConnectAddress { get; set; } 77 | 78 | /// 79 | /// 80 | [JsonProperty(PropertyName = "profileId")] 81 | public int? ProfileId { get; set; } 82 | 83 | /// 84 | /// 85 | [JsonProperty(PropertyName = "listenerTypeId")] 86 | public int? ListenerTypeId { get; set; } 87 | 88 | /// 89 | /// Gets or sets possible values include: 'Uninitialized', 'Active', 90 | /// 'Stopped' 91 | /// 92 | [JsonProperty(PropertyName = "status")] 93 | public ListenerStatus? Status { get; set; } 94 | 95 | /// 96 | /// 97 | [JsonProperty(PropertyName = "covenantToken")] 98 | public string CovenantToken { get; set; } 99 | 100 | /// 101 | /// 102 | [JsonProperty(PropertyName = "startTime")] 103 | public System.DateTime? StartTime { get; set; } 104 | 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /Elite/API/Models/ListenerStatus.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using Newtonsoft.Json.Converters; 11 | using System.Runtime; 12 | using System.Runtime.Serialization; 13 | 14 | /// 15 | /// Defines values for ListenerStatus. 16 | /// 17 | [JsonConverter(typeof(StringEnumConverter))] 18 | public enum ListenerStatus 19 | { 20 | [EnumMember(Value = "Uninitialized")] 21 | Uninitialized, 22 | [EnumMember(Value = "Active")] 23 | Active, 24 | [EnumMember(Value = "Stopped")] 25 | Stopped 26 | } 27 | internal static class ListenerStatusEnumExtension 28 | { 29 | internal static string ToSerializedValue(this ListenerStatus? value) 30 | { 31 | return value == null ? null : ((ListenerStatus)value).ToSerializedValue(); 32 | } 33 | 34 | internal static string ToSerializedValue(this ListenerStatus value) 35 | { 36 | switch( value ) 37 | { 38 | case ListenerStatus.Uninitialized: 39 | return "Uninitialized"; 40 | case ListenerStatus.Active: 41 | return "Active"; 42 | case ListenerStatus.Stopped: 43 | return "Stopped"; 44 | } 45 | return null; 46 | } 47 | 48 | internal static ListenerStatus? ParseListenerStatus(this string value) 49 | { 50 | switch( value ) 51 | { 52 | case "Uninitialized": 53 | return ListenerStatus.Uninitialized; 54 | case "Active": 55 | return ListenerStatus.Active; 56 | case "Stopped": 57 | return ListenerStatus.Stopped; 58 | } 59 | return null; 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Elite/API/Models/ListenerType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class ListenerType 13 | { 14 | /// 15 | /// Initializes a new instance of the ListenerType class. 16 | /// 17 | public ListenerType() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the ListenerType class. 24 | /// 25 | public ListenerType(int? id = default(int?), string name = default(string), string description = default(string)) 26 | { 27 | Id = id; 28 | Name = name; 29 | Description = description; 30 | CustomInit(); 31 | } 32 | 33 | /// 34 | /// An initialization method that performs custom operations like setting defaults 35 | /// 36 | partial void CustomInit(); 37 | 38 | /// 39 | /// 40 | [JsonProperty(PropertyName = "id")] 41 | public int? Id { get; set; } 42 | 43 | /// 44 | /// 45 | [JsonProperty(PropertyName = "name")] 46 | public string Name { get; set; } 47 | 48 | /// 49 | /// 50 | [JsonProperty(PropertyName = "description")] 51 | public string Description { get; set; } 52 | 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Elite/API/Models/MSBuildLauncher.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class MSBuildLauncher 13 | { 14 | /// 15 | /// Initializes a new instance of the MSBuildLauncher class. 16 | /// 17 | public MSBuildLauncher() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the MSBuildLauncher class. 24 | /// 25 | /// Possible values include: 26 | /// 'Net40', 'Net35', 'NetCore21' 27 | /// Possible values include: 'Wmic', 'Regsvr32', 28 | /// 'Mshta', 'Cscript', 'Wscript', 'PowerShell', 'Binary', 'MSBuild', 29 | /// 'InstallUtil' 30 | /// Possible values include: 'HTTP', 31 | /// 'SMB' 32 | public MSBuildLauncher(string targetName = default(string), string taskName = default(string), string diskCode = default(string), int? id = default(int?), int? listenerId = default(int?), DotNetVersion? dotNetFrameworkVersion = default(DotNetVersion?), LauncherType? type = default(LauncherType?), string name = default(string), string description = default(string), CommunicationType? commType = default(CommunicationType?), bool? validateCert = default(bool?), bool? useCertPinning = default(bool?), string smbPipeName = default(string), int? delay = default(int?), int? jitterPercent = default(int?), int? connectAttempts = default(int?), System.DateTime? killDate = default(System.DateTime?), string launcherString = default(string), string stagerCode = default(string), string base64ILByteString = default(string)) 33 | { 34 | TargetName = targetName; 35 | TaskName = taskName; 36 | DiskCode = diskCode; 37 | Id = id; 38 | ListenerId = listenerId; 39 | DotNetFrameworkVersion = dotNetFrameworkVersion; 40 | Type = type; 41 | Name = name; 42 | Description = description; 43 | CommType = commType; 44 | ValidateCert = validateCert; 45 | UseCertPinning = useCertPinning; 46 | SmbPipeName = smbPipeName; 47 | Delay = delay; 48 | JitterPercent = jitterPercent; 49 | ConnectAttempts = connectAttempts; 50 | KillDate = killDate; 51 | LauncherString = launcherString; 52 | StagerCode = stagerCode; 53 | Base64ILByteString = base64ILByteString; 54 | CustomInit(); 55 | } 56 | 57 | /// 58 | /// An initialization method that performs custom operations like setting defaults 59 | /// 60 | partial void CustomInit(); 61 | 62 | /// 63 | /// 64 | [JsonProperty(PropertyName = "targetName")] 65 | public string TargetName { get; set; } 66 | 67 | /// 68 | /// 69 | [JsonProperty(PropertyName = "taskName")] 70 | public string TaskName { get; set; } 71 | 72 | /// 73 | /// 74 | [JsonProperty(PropertyName = "diskCode")] 75 | public string DiskCode { get; set; } 76 | 77 | /// 78 | /// 79 | [JsonProperty(PropertyName = "id")] 80 | public int? Id { get; set; } 81 | 82 | /// 83 | /// 84 | [JsonProperty(PropertyName = "listenerId")] 85 | public int? ListenerId { get; set; } 86 | 87 | /// 88 | /// Gets or sets possible values include: 'Net40', 'Net35', 'NetCore21' 89 | /// 90 | [JsonProperty(PropertyName = "dotNetFrameworkVersion")] 91 | public DotNetVersion? DotNetFrameworkVersion { get; set; } 92 | 93 | /// 94 | /// Gets or sets possible values include: 'Wmic', 'Regsvr32', 'Mshta', 95 | /// 'Cscript', 'Wscript', 'PowerShell', 'Binary', 'MSBuild', 96 | /// 'InstallUtil' 97 | /// 98 | [JsonProperty(PropertyName = "type")] 99 | public LauncherType? Type { get; set; } 100 | 101 | /// 102 | /// 103 | [JsonProperty(PropertyName = "name")] 104 | public string Name { get; set; } 105 | 106 | /// 107 | /// 108 | [JsonProperty(PropertyName = "description")] 109 | public string Description { get; set; } 110 | 111 | /// 112 | /// Gets or sets possible values include: 'HTTP', 'SMB' 113 | /// 114 | [JsonProperty(PropertyName = "commType")] 115 | public CommunicationType? CommType { get; set; } 116 | 117 | /// 118 | /// 119 | [JsonProperty(PropertyName = "validateCert")] 120 | public bool? ValidateCert { get; set; } 121 | 122 | /// 123 | /// 124 | [JsonProperty(PropertyName = "useCertPinning")] 125 | public bool? UseCertPinning { get; set; } 126 | 127 | /// 128 | /// 129 | [JsonProperty(PropertyName = "smbPipeName")] 130 | public string SmbPipeName { get; set; } 131 | 132 | /// 133 | /// 134 | [JsonProperty(PropertyName = "delay")] 135 | public int? Delay { get; set; } 136 | 137 | /// 138 | /// 139 | [JsonProperty(PropertyName = "jitterPercent")] 140 | public int? JitterPercent { get; set; } 141 | 142 | /// 143 | /// 144 | [JsonProperty(PropertyName = "connectAttempts")] 145 | public int? ConnectAttempts { get; set; } 146 | 147 | /// 148 | /// 149 | [JsonProperty(PropertyName = "killDate")] 150 | public System.DateTime? KillDate { get; set; } 151 | 152 | /// 153 | /// 154 | [JsonProperty(PropertyName = "launcherString")] 155 | public string LauncherString { get; set; } 156 | 157 | /// 158 | /// 159 | [JsonProperty(PropertyName = "stagerCode")] 160 | public string StagerCode { get; set; } 161 | 162 | /// 163 | /// 164 | [JsonProperty(PropertyName = "base64ILByteString")] 165 | public string Base64ILByteString { get; set; } 166 | 167 | } 168 | } 169 | -------------------------------------------------------------------------------- /Elite/API/Models/MshtaLauncher.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class MshtaLauncher 13 | { 14 | /// 15 | /// Initializes a new instance of the MshtaLauncher class. 16 | /// 17 | public MshtaLauncher() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the MshtaLauncher class. 24 | /// 25 | /// Possible values include: 'JScript', 26 | /// 'VBScript' 27 | /// Possible values include: 28 | /// 'Net40', 'Net35', 'NetCore21' 29 | /// Possible values include: 'Wmic', 'Regsvr32', 30 | /// 'Mshta', 'Cscript', 'Wscript', 'PowerShell', 'Binary', 'MSBuild', 31 | /// 'InstallUtil' 32 | /// Possible values include: 'HTTP', 33 | /// 'SMB' 34 | public MshtaLauncher(ScriptingLanguage? scriptLanguage = default(ScriptingLanguage?), string progId = default(string), string diskCode = default(string), int? id = default(int?), int? listenerId = default(int?), DotNetVersion? dotNetFrameworkVersion = default(DotNetVersion?), LauncherType? type = default(LauncherType?), string name = default(string), string description = default(string), CommunicationType? commType = default(CommunicationType?), bool? validateCert = default(bool?), bool? useCertPinning = default(bool?), string smbPipeName = default(string), int? delay = default(int?), int? jitterPercent = default(int?), int? connectAttempts = default(int?), System.DateTime? killDate = default(System.DateTime?), string launcherString = default(string), string stagerCode = default(string), string base64ILByteString = default(string)) 35 | { 36 | ScriptLanguage = scriptLanguage; 37 | ProgId = progId; 38 | DiskCode = diskCode; 39 | Id = id; 40 | ListenerId = listenerId; 41 | DotNetFrameworkVersion = dotNetFrameworkVersion; 42 | Type = type; 43 | Name = name; 44 | Description = description; 45 | CommType = commType; 46 | ValidateCert = validateCert; 47 | UseCertPinning = useCertPinning; 48 | SmbPipeName = smbPipeName; 49 | Delay = delay; 50 | JitterPercent = jitterPercent; 51 | ConnectAttempts = connectAttempts; 52 | KillDate = killDate; 53 | LauncherString = launcherString; 54 | StagerCode = stagerCode; 55 | Base64ILByteString = base64ILByteString; 56 | CustomInit(); 57 | } 58 | 59 | /// 60 | /// An initialization method that performs custom operations like setting defaults 61 | /// 62 | partial void CustomInit(); 63 | 64 | /// 65 | /// Gets or sets possible values include: 'JScript', 'VBScript' 66 | /// 67 | [JsonProperty(PropertyName = "scriptLanguage")] 68 | public ScriptingLanguage? ScriptLanguage { get; set; } 69 | 70 | /// 71 | /// 72 | [JsonProperty(PropertyName = "progId")] 73 | public string ProgId { get; set; } 74 | 75 | /// 76 | /// 77 | [JsonProperty(PropertyName = "diskCode")] 78 | public string DiskCode { get; set; } 79 | 80 | /// 81 | /// 82 | [JsonProperty(PropertyName = "id")] 83 | public int? Id { get; set; } 84 | 85 | /// 86 | /// 87 | [JsonProperty(PropertyName = "listenerId")] 88 | public int? ListenerId { get; set; } 89 | 90 | /// 91 | /// Gets or sets possible values include: 'Net40', 'Net35', 'NetCore21' 92 | /// 93 | [JsonProperty(PropertyName = "dotNetFrameworkVersion")] 94 | public DotNetVersion? DotNetFrameworkVersion { get; set; } 95 | 96 | /// 97 | /// Gets or sets possible values include: 'Wmic', 'Regsvr32', 'Mshta', 98 | /// 'Cscript', 'Wscript', 'PowerShell', 'Binary', 'MSBuild', 99 | /// 'InstallUtil' 100 | /// 101 | [JsonProperty(PropertyName = "type")] 102 | public LauncherType? Type { get; set; } 103 | 104 | /// 105 | /// 106 | [JsonProperty(PropertyName = "name")] 107 | public string Name { get; set; } 108 | 109 | /// 110 | /// 111 | [JsonProperty(PropertyName = "description")] 112 | public string Description { get; set; } 113 | 114 | /// 115 | /// Gets or sets possible values include: 'HTTP', 'SMB' 116 | /// 117 | [JsonProperty(PropertyName = "commType")] 118 | public CommunicationType? CommType { get; set; } 119 | 120 | /// 121 | /// 122 | [JsonProperty(PropertyName = "validateCert")] 123 | public bool? ValidateCert { get; set; } 124 | 125 | /// 126 | /// 127 | [JsonProperty(PropertyName = "useCertPinning")] 128 | public bool? UseCertPinning { get; set; } 129 | 130 | /// 131 | /// 132 | [JsonProperty(PropertyName = "smbPipeName")] 133 | public string SmbPipeName { get; set; } 134 | 135 | /// 136 | /// 137 | [JsonProperty(PropertyName = "delay")] 138 | public int? Delay { get; set; } 139 | 140 | /// 141 | /// 142 | [JsonProperty(PropertyName = "jitterPercent")] 143 | public int? JitterPercent { get; set; } 144 | 145 | /// 146 | /// 147 | [JsonProperty(PropertyName = "connectAttempts")] 148 | public int? ConnectAttempts { get; set; } 149 | 150 | /// 151 | /// 152 | [JsonProperty(PropertyName = "killDate")] 153 | public System.DateTime? KillDate { get; set; } 154 | 155 | /// 156 | /// 157 | [JsonProperty(PropertyName = "launcherString")] 158 | public string LauncherString { get; set; } 159 | 160 | /// 161 | /// 162 | [JsonProperty(PropertyName = "stagerCode")] 163 | public string StagerCode { get; set; } 164 | 165 | /// 166 | /// 167 | [JsonProperty(PropertyName = "base64ILByteString")] 168 | public string Base64ILByteString { get; set; } 169 | 170 | } 171 | } 172 | -------------------------------------------------------------------------------- /Elite/API/Models/NetworkIndicator.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class NetworkIndicator 13 | { 14 | /// 15 | /// Initializes a new instance of the NetworkIndicator class. 16 | /// 17 | public NetworkIndicator() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the NetworkIndicator class. 24 | /// 25 | public NetworkIndicator(string protocol = default(string), string domain = default(string), string ipAddress = default(string), int? port = default(int?), string uri = default(string), int? id = default(int?), string name = default(string)) 26 | { 27 | Protocol = protocol; 28 | Domain = domain; 29 | IpAddress = ipAddress; 30 | Port = port; 31 | Uri = uri; 32 | Id = id; 33 | Name = name; 34 | CustomInit(); 35 | } 36 | 37 | /// 38 | /// An initialization method that performs custom operations like setting defaults 39 | /// 40 | partial void CustomInit(); 41 | 42 | /// 43 | /// 44 | [JsonProperty(PropertyName = "protocol")] 45 | public string Protocol { get; set; } 46 | 47 | /// 48 | /// 49 | [JsonProperty(PropertyName = "domain")] 50 | public string Domain { get; set; } 51 | 52 | /// 53 | /// 54 | [JsonProperty(PropertyName = "ipAddress")] 55 | public string IpAddress { get; set; } 56 | 57 | /// 58 | /// 59 | [JsonProperty(PropertyName = "port")] 60 | public int? Port { get; set; } 61 | 62 | /// 63 | /// 64 | [JsonProperty(PropertyName = "uri")] 65 | public string Uri { get; set; } 66 | 67 | /// 68 | /// 69 | [JsonProperty(PropertyName = "id")] 70 | public int? Id { get; set; } 71 | 72 | /// 73 | /// 74 | [JsonProperty(PropertyName = "name")] 75 | public string Name { get; set; } 76 | 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /Elite/API/Models/PowerShellLauncher.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class PowerShellLauncher 13 | { 14 | /// 15 | /// Initializes a new instance of the PowerShellLauncher class. 16 | /// 17 | public PowerShellLauncher() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the PowerShellLauncher class. 24 | /// 25 | /// Possible values include: 26 | /// 'Net40', 'Net35', 'NetCore21' 27 | /// Possible values include: 'Wmic', 'Regsvr32', 28 | /// 'Mshta', 'Cscript', 'Wscript', 'PowerShell', 'Binary', 'MSBuild', 29 | /// 'InstallUtil' 30 | /// Possible values include: 'HTTP', 31 | /// 'SMB' 32 | public PowerShellLauncher(string parameterString = default(string), string powerShellCode = default(string), string encodedLauncherString = default(string), int? id = default(int?), int? listenerId = default(int?), DotNetVersion? dotNetFrameworkVersion = default(DotNetVersion?), LauncherType? type = default(LauncherType?), string name = default(string), string description = default(string), CommunicationType? commType = default(CommunicationType?), bool? validateCert = default(bool?), bool? useCertPinning = default(bool?), string smbPipeName = default(string), int? delay = default(int?), int? jitterPercent = default(int?), int? connectAttempts = default(int?), System.DateTime? killDate = default(System.DateTime?), string launcherString = default(string), string stagerCode = default(string), string base64ILByteString = default(string)) 33 | { 34 | ParameterString = parameterString; 35 | PowerShellCode = powerShellCode; 36 | EncodedLauncherString = encodedLauncherString; 37 | Id = id; 38 | ListenerId = listenerId; 39 | DotNetFrameworkVersion = dotNetFrameworkVersion; 40 | Type = type; 41 | Name = name; 42 | Description = description; 43 | CommType = commType; 44 | ValidateCert = validateCert; 45 | UseCertPinning = useCertPinning; 46 | SmbPipeName = smbPipeName; 47 | Delay = delay; 48 | JitterPercent = jitterPercent; 49 | ConnectAttempts = connectAttempts; 50 | KillDate = killDate; 51 | LauncherString = launcherString; 52 | StagerCode = stagerCode; 53 | Base64ILByteString = base64ILByteString; 54 | CustomInit(); 55 | } 56 | 57 | /// 58 | /// An initialization method that performs custom operations like setting defaults 59 | /// 60 | partial void CustomInit(); 61 | 62 | /// 63 | /// 64 | [JsonProperty(PropertyName = "parameterString")] 65 | public string ParameterString { get; set; } 66 | 67 | /// 68 | /// 69 | [JsonProperty(PropertyName = "powerShellCode")] 70 | public string PowerShellCode { get; set; } 71 | 72 | /// 73 | /// 74 | [JsonProperty(PropertyName = "encodedLauncherString")] 75 | public string EncodedLauncherString { get; set; } 76 | 77 | /// 78 | /// 79 | [JsonProperty(PropertyName = "id")] 80 | public int? Id { get; set; } 81 | 82 | /// 83 | /// 84 | [JsonProperty(PropertyName = "listenerId")] 85 | public int? ListenerId { get; set; } 86 | 87 | /// 88 | /// Gets or sets possible values include: 'Net40', 'Net35', 'NetCore21' 89 | /// 90 | [JsonProperty(PropertyName = "dotNetFrameworkVersion")] 91 | public DotNetVersion? DotNetFrameworkVersion { get; set; } 92 | 93 | /// 94 | /// Gets or sets possible values include: 'Wmic', 'Regsvr32', 'Mshta', 95 | /// 'Cscript', 'Wscript', 'PowerShell', 'Binary', 'MSBuild', 96 | /// 'InstallUtil' 97 | /// 98 | [JsonProperty(PropertyName = "type")] 99 | public LauncherType? Type { get; set; } 100 | 101 | /// 102 | /// 103 | [JsonProperty(PropertyName = "name")] 104 | public string Name { get; set; } 105 | 106 | /// 107 | /// 108 | [JsonProperty(PropertyName = "description")] 109 | public string Description { get; set; } 110 | 111 | /// 112 | /// Gets or sets possible values include: 'HTTP', 'SMB' 113 | /// 114 | [JsonProperty(PropertyName = "commType")] 115 | public CommunicationType? CommType { get; set; } 116 | 117 | /// 118 | /// 119 | [JsonProperty(PropertyName = "validateCert")] 120 | public bool? ValidateCert { get; set; } 121 | 122 | /// 123 | /// 124 | [JsonProperty(PropertyName = "useCertPinning")] 125 | public bool? UseCertPinning { get; set; } 126 | 127 | /// 128 | /// 129 | [JsonProperty(PropertyName = "smbPipeName")] 130 | public string SmbPipeName { get; set; } 131 | 132 | /// 133 | /// 134 | [JsonProperty(PropertyName = "delay")] 135 | public int? Delay { get; set; } 136 | 137 | /// 138 | /// 139 | [JsonProperty(PropertyName = "jitterPercent")] 140 | public int? JitterPercent { get; set; } 141 | 142 | /// 143 | /// 144 | [JsonProperty(PropertyName = "connectAttempts")] 145 | public int? ConnectAttempts { get; set; } 146 | 147 | /// 148 | /// 149 | [JsonProperty(PropertyName = "killDate")] 150 | public System.DateTime? KillDate { get; set; } 151 | 152 | /// 153 | /// 154 | [JsonProperty(PropertyName = "launcherString")] 155 | public string LauncherString { get; set; } 156 | 157 | /// 158 | /// 159 | [JsonProperty(PropertyName = "stagerCode")] 160 | public string StagerCode { get; set; } 161 | 162 | /// 163 | /// 164 | [JsonProperty(PropertyName = "base64ILByteString")] 165 | public string Base64ILByteString { get; set; } 166 | 167 | } 168 | } 169 | -------------------------------------------------------------------------------- /Elite/API/Models/Profile.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class Profile 13 | { 14 | /// 15 | /// Initializes a new instance of the Profile class. 16 | /// 17 | public Profile() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the Profile class. 24 | /// 25 | public Profile(int? id = default(int?)) 26 | { 27 | Id = id; 28 | CustomInit(); 29 | } 30 | 31 | /// 32 | /// An initialization method that performs custom operations like setting defaults 33 | /// 34 | partial void CustomInit(); 35 | 36 | /// 37 | /// 38 | [JsonProperty(PropertyName = "id")] 39 | public int? Id { get; set; } 40 | 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Elite/API/Models/Regsvr32Launcher.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class Regsvr32Launcher 13 | { 14 | /// 15 | /// Initializes a new instance of the Regsvr32Launcher class. 16 | /// 17 | public Regsvr32Launcher() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the Regsvr32Launcher class. 24 | /// 25 | /// Possible values include: 'JScript', 26 | /// 'VBScript' 27 | /// Possible values include: 28 | /// 'Net40', 'Net35', 'NetCore21' 29 | /// Possible values include: 'Wmic', 'Regsvr32', 30 | /// 'Mshta', 'Cscript', 'Wscript', 'PowerShell', 'Binary', 'MSBuild', 31 | /// 'InstallUtil' 32 | /// Possible values include: 'HTTP', 33 | /// 'SMB' 34 | public Regsvr32Launcher(string parameterString = default(string), string dllName = default(string), ScriptingLanguage? scriptLanguage = default(ScriptingLanguage?), string progId = default(string), string diskCode = default(string), int? id = default(int?), int? listenerId = default(int?), DotNetVersion? dotNetFrameworkVersion = default(DotNetVersion?), LauncherType? type = default(LauncherType?), string name = default(string), string description = default(string), CommunicationType? commType = default(CommunicationType?), bool? validateCert = default(bool?), bool? useCertPinning = default(bool?), string smbPipeName = default(string), int? delay = default(int?), int? jitterPercent = default(int?), int? connectAttempts = default(int?), System.DateTime? killDate = default(System.DateTime?), string launcherString = default(string), string stagerCode = default(string), string base64ILByteString = default(string)) 35 | { 36 | ParameterString = parameterString; 37 | DllName = dllName; 38 | ScriptLanguage = scriptLanguage; 39 | ProgId = progId; 40 | DiskCode = diskCode; 41 | Id = id; 42 | ListenerId = listenerId; 43 | DotNetFrameworkVersion = dotNetFrameworkVersion; 44 | Type = type; 45 | Name = name; 46 | Description = description; 47 | CommType = commType; 48 | ValidateCert = validateCert; 49 | UseCertPinning = useCertPinning; 50 | SmbPipeName = smbPipeName; 51 | Delay = delay; 52 | JitterPercent = jitterPercent; 53 | ConnectAttempts = connectAttempts; 54 | KillDate = killDate; 55 | LauncherString = launcherString; 56 | StagerCode = stagerCode; 57 | Base64ILByteString = base64ILByteString; 58 | CustomInit(); 59 | } 60 | 61 | /// 62 | /// An initialization method that performs custom operations like setting defaults 63 | /// 64 | partial void CustomInit(); 65 | 66 | /// 67 | /// 68 | [JsonProperty(PropertyName = "parameterString")] 69 | public string ParameterString { get; set; } 70 | 71 | /// 72 | /// 73 | [JsonProperty(PropertyName = "dllName")] 74 | public string DllName { get; set; } 75 | 76 | /// 77 | /// Gets or sets possible values include: 'JScript', 'VBScript' 78 | /// 79 | [JsonProperty(PropertyName = "scriptLanguage")] 80 | public ScriptingLanguage? ScriptLanguage { get; set; } 81 | 82 | /// 83 | /// 84 | [JsonProperty(PropertyName = "progId")] 85 | public string ProgId { get; set; } 86 | 87 | /// 88 | /// 89 | [JsonProperty(PropertyName = "diskCode")] 90 | public string DiskCode { get; set; } 91 | 92 | /// 93 | /// 94 | [JsonProperty(PropertyName = "id")] 95 | public int? Id { get; set; } 96 | 97 | /// 98 | /// 99 | [JsonProperty(PropertyName = "listenerId")] 100 | public int? ListenerId { get; set; } 101 | 102 | /// 103 | /// Gets or sets possible values include: 'Net40', 'Net35', 'NetCore21' 104 | /// 105 | [JsonProperty(PropertyName = "dotNetFrameworkVersion")] 106 | public DotNetVersion? DotNetFrameworkVersion { get; set; } 107 | 108 | /// 109 | /// Gets or sets possible values include: 'Wmic', 'Regsvr32', 'Mshta', 110 | /// 'Cscript', 'Wscript', 'PowerShell', 'Binary', 'MSBuild', 111 | /// 'InstallUtil' 112 | /// 113 | [JsonProperty(PropertyName = "type")] 114 | public LauncherType? Type { get; set; } 115 | 116 | /// 117 | /// 118 | [JsonProperty(PropertyName = "name")] 119 | public string Name { get; set; } 120 | 121 | /// 122 | /// 123 | [JsonProperty(PropertyName = "description")] 124 | public string Description { get; set; } 125 | 126 | /// 127 | /// Gets or sets possible values include: 'HTTP', 'SMB' 128 | /// 129 | [JsonProperty(PropertyName = "commType")] 130 | public CommunicationType? CommType { get; set; } 131 | 132 | /// 133 | /// 134 | [JsonProperty(PropertyName = "validateCert")] 135 | public bool? ValidateCert { get; set; } 136 | 137 | /// 138 | /// 139 | [JsonProperty(PropertyName = "useCertPinning")] 140 | public bool? UseCertPinning { get; set; } 141 | 142 | /// 143 | /// 144 | [JsonProperty(PropertyName = "smbPipeName")] 145 | public string SmbPipeName { get; set; } 146 | 147 | /// 148 | /// 149 | [JsonProperty(PropertyName = "delay")] 150 | public int? Delay { get; set; } 151 | 152 | /// 153 | /// 154 | [JsonProperty(PropertyName = "jitterPercent")] 155 | public int? JitterPercent { get; set; } 156 | 157 | /// 158 | /// 159 | [JsonProperty(PropertyName = "connectAttempts")] 160 | public int? ConnectAttempts { get; set; } 161 | 162 | /// 163 | /// 164 | [JsonProperty(PropertyName = "killDate")] 165 | public System.DateTime? KillDate { get; set; } 166 | 167 | /// 168 | /// 169 | [JsonProperty(PropertyName = "launcherString")] 170 | public string LauncherString { get; set; } 171 | 172 | /// 173 | /// 174 | [JsonProperty(PropertyName = "stagerCode")] 175 | public string StagerCode { get; set; } 176 | 177 | /// 178 | /// 179 | [JsonProperty(PropertyName = "base64ILByteString")] 180 | public string Base64ILByteString { get; set; } 181 | 182 | } 183 | } 184 | -------------------------------------------------------------------------------- /Elite/API/Models/ScriptingLanguage.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using Newtonsoft.Json.Converters; 11 | using System.Runtime; 12 | using System.Runtime.Serialization; 13 | 14 | /// 15 | /// Defines values for ScriptingLanguage. 16 | /// 17 | [JsonConverter(typeof(StringEnumConverter))] 18 | public enum ScriptingLanguage 19 | { 20 | [EnumMember(Value = "JScript")] 21 | JScript, 22 | [EnumMember(Value = "VBScript")] 23 | VBScript 24 | } 25 | internal static class ScriptingLanguageEnumExtension 26 | { 27 | internal static string ToSerializedValue(this ScriptingLanguage? value) 28 | { 29 | return value == null ? null : ((ScriptingLanguage)value).ToSerializedValue(); 30 | } 31 | 32 | internal static string ToSerializedValue(this ScriptingLanguage value) 33 | { 34 | switch( value ) 35 | { 36 | case ScriptingLanguage.JScript: 37 | return "JScript"; 38 | case ScriptingLanguage.VBScript: 39 | return "VBScript"; 40 | } 41 | return null; 42 | } 43 | 44 | internal static ScriptingLanguage? ParseScriptingLanguage(this string value) 45 | { 46 | switch( value ) 47 | { 48 | case "JScript": 49 | return ScriptingLanguage.JScript; 50 | case "VBScript": 51 | return ScriptingLanguage.VBScript; 52 | } 53 | return null; 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Elite/API/Models/TargetIndicator.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class TargetIndicator 13 | { 14 | /// 15 | /// Initializes a new instance of the TargetIndicator class. 16 | /// 17 | public TargetIndicator() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the TargetIndicator class. 24 | /// 25 | public TargetIndicator(string computerName = default(string), string userName = default(string), int? id = default(int?), string name = default(string)) 26 | { 27 | ComputerName = computerName; 28 | UserName = userName; 29 | Id = id; 30 | Name = name; 31 | CustomInit(); 32 | } 33 | 34 | /// 35 | /// An initialization method that performs custom operations like setting defaults 36 | /// 37 | partial void CustomInit(); 38 | 39 | /// 40 | /// 41 | [JsonProperty(PropertyName = "computerName")] 42 | public string ComputerName { get; set; } 43 | 44 | /// 45 | /// 46 | [JsonProperty(PropertyName = "userName")] 47 | public string UserName { get; set; } 48 | 49 | /// 50 | /// 51 | [JsonProperty(PropertyName = "id")] 52 | public int? Id { get; set; } 53 | 54 | /// 55 | /// 56 | [JsonProperty(PropertyName = "name")] 57 | public string Name { get; set; } 58 | 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Elite/API/Models/TicketType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using Newtonsoft.Json.Converters; 11 | using System.Runtime; 12 | using System.Runtime.Serialization; 13 | 14 | /// 15 | /// Defines values for TicketType. 16 | /// 17 | [JsonConverter(typeof(StringEnumConverter))] 18 | public enum TicketType 19 | { 20 | [EnumMember(Value = "RC4")] 21 | RC4, 22 | [EnumMember(Value = "AES")] 23 | AES 24 | } 25 | internal static class TicketTypeEnumExtension 26 | { 27 | internal static string ToSerializedValue(this TicketType? value) 28 | { 29 | return value == null ? null : ((TicketType)value).ToSerializedValue(); 30 | } 31 | 32 | internal static string ToSerializedValue(this TicketType value) 33 | { 34 | switch( value ) 35 | { 36 | case TicketType.RC4: 37 | return "RC4"; 38 | case TicketType.AES: 39 | return "AES"; 40 | } 41 | return null; 42 | } 43 | 44 | internal static TicketType? ParseTicketType(this string value) 45 | { 46 | switch( value ) 47 | { 48 | case "RC4": 49 | return TicketType.RC4; 50 | case "AES": 51 | return TicketType.AES; 52 | } 53 | return null; 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Elite/API/Models/WmicLauncher.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class WmicLauncher 13 | { 14 | /// 15 | /// Initializes a new instance of the WmicLauncher class. 16 | /// 17 | public WmicLauncher() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the WmicLauncher class. 24 | /// 25 | /// Possible values include: 'JScript', 26 | /// 'VBScript' 27 | /// Possible values include: 28 | /// 'Net40', 'Net35', 'NetCore21' 29 | /// Possible values include: 'Wmic', 'Regsvr32', 30 | /// 'Mshta', 'Cscript', 'Wscript', 'PowerShell', 'Binary', 'MSBuild', 31 | /// 'InstallUtil' 32 | /// Possible values include: 'HTTP', 33 | /// 'SMB' 34 | public WmicLauncher(ScriptingLanguage? scriptLanguage = default(ScriptingLanguage?), string progId = default(string), string diskCode = default(string), int? id = default(int?), int? listenerId = default(int?), DotNetVersion? dotNetFrameworkVersion = default(DotNetVersion?), LauncherType? type = default(LauncherType?), string name = default(string), string description = default(string), CommunicationType? commType = default(CommunicationType?), bool? validateCert = default(bool?), bool? useCertPinning = default(bool?), string smbPipeName = default(string), int? delay = default(int?), int? jitterPercent = default(int?), int? connectAttempts = default(int?), System.DateTime? killDate = default(System.DateTime?), string launcherString = default(string), string stagerCode = default(string), string base64ILByteString = default(string)) 35 | { 36 | ScriptLanguage = scriptLanguage; 37 | ProgId = progId; 38 | DiskCode = diskCode; 39 | Id = id; 40 | ListenerId = listenerId; 41 | DotNetFrameworkVersion = dotNetFrameworkVersion; 42 | Type = type; 43 | Name = name; 44 | Description = description; 45 | CommType = commType; 46 | ValidateCert = validateCert; 47 | UseCertPinning = useCertPinning; 48 | SmbPipeName = smbPipeName; 49 | Delay = delay; 50 | JitterPercent = jitterPercent; 51 | ConnectAttempts = connectAttempts; 52 | KillDate = killDate; 53 | LauncherString = launcherString; 54 | StagerCode = stagerCode; 55 | Base64ILByteString = base64ILByteString; 56 | CustomInit(); 57 | } 58 | 59 | /// 60 | /// An initialization method that performs custom operations like setting defaults 61 | /// 62 | partial void CustomInit(); 63 | 64 | /// 65 | /// Gets or sets possible values include: 'JScript', 'VBScript' 66 | /// 67 | [JsonProperty(PropertyName = "scriptLanguage")] 68 | public ScriptingLanguage? ScriptLanguage { get; set; } 69 | 70 | /// 71 | /// 72 | [JsonProperty(PropertyName = "progId")] 73 | public string ProgId { get; set; } 74 | 75 | /// 76 | /// 77 | [JsonProperty(PropertyName = "diskCode")] 78 | public string DiskCode { get; set; } 79 | 80 | /// 81 | /// 82 | [JsonProperty(PropertyName = "id")] 83 | public int? Id { get; set; } 84 | 85 | /// 86 | /// 87 | [JsonProperty(PropertyName = "listenerId")] 88 | public int? ListenerId { get; set; } 89 | 90 | /// 91 | /// Gets or sets possible values include: 'Net40', 'Net35', 'NetCore21' 92 | /// 93 | [JsonProperty(PropertyName = "dotNetFrameworkVersion")] 94 | public DotNetVersion? DotNetFrameworkVersion { get; set; } 95 | 96 | /// 97 | /// Gets or sets possible values include: 'Wmic', 'Regsvr32', 'Mshta', 98 | /// 'Cscript', 'Wscript', 'PowerShell', 'Binary', 'MSBuild', 99 | /// 'InstallUtil' 100 | /// 101 | [JsonProperty(PropertyName = "type")] 102 | public LauncherType? Type { get; set; } 103 | 104 | /// 105 | /// 106 | [JsonProperty(PropertyName = "name")] 107 | public string Name { get; set; } 108 | 109 | /// 110 | /// 111 | [JsonProperty(PropertyName = "description")] 112 | public string Description { get; set; } 113 | 114 | /// 115 | /// Gets or sets possible values include: 'HTTP', 'SMB' 116 | /// 117 | [JsonProperty(PropertyName = "commType")] 118 | public CommunicationType? CommType { get; set; } 119 | 120 | /// 121 | /// 122 | [JsonProperty(PropertyName = "validateCert")] 123 | public bool? ValidateCert { get; set; } 124 | 125 | /// 126 | /// 127 | [JsonProperty(PropertyName = "useCertPinning")] 128 | public bool? UseCertPinning { get; set; } 129 | 130 | /// 131 | /// 132 | [JsonProperty(PropertyName = "smbPipeName")] 133 | public string SmbPipeName { get; set; } 134 | 135 | /// 136 | /// 137 | [JsonProperty(PropertyName = "delay")] 138 | public int? Delay { get; set; } 139 | 140 | /// 141 | /// 142 | [JsonProperty(PropertyName = "jitterPercent")] 143 | public int? JitterPercent { get; set; } 144 | 145 | /// 146 | /// 147 | [JsonProperty(PropertyName = "connectAttempts")] 148 | public int? ConnectAttempts { get; set; } 149 | 150 | /// 151 | /// 152 | [JsonProperty(PropertyName = "killDate")] 153 | public System.DateTime? KillDate { get; set; } 154 | 155 | /// 156 | /// 157 | [JsonProperty(PropertyName = "launcherString")] 158 | public string LauncherString { get; set; } 159 | 160 | /// 161 | /// 162 | [JsonProperty(PropertyName = "stagerCode")] 163 | public string StagerCode { get; set; } 164 | 165 | /// 166 | /// 167 | [JsonProperty(PropertyName = "base64ILByteString")] 168 | public string Base64ILByteString { get; set; } 169 | 170 | } 171 | } 172 | -------------------------------------------------------------------------------- /Elite/API/Models/WscriptLauncher.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Code generated by Microsoft (R) AutoRest Code Generator. 3 | // Changes may cause incorrect behavior and will be lost if the code is 4 | // regenerated. 5 | // 6 | 7 | namespace Covenant.API.Models 8 | { 9 | using Newtonsoft.Json; 10 | using System.Linq; 11 | 12 | public partial class WscriptLauncher 13 | { 14 | /// 15 | /// Initializes a new instance of the WscriptLauncher class. 16 | /// 17 | public WscriptLauncher() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// Initializes a new instance of the WscriptLauncher class. 24 | /// 25 | /// Possible values include: 'JScript', 26 | /// 'VBScript' 27 | /// Possible values include: 28 | /// 'Net40', 'Net35', 'NetCore21' 29 | /// Possible values include: 'Wmic', 'Regsvr32', 30 | /// 'Mshta', 'Cscript', 'Wscript', 'PowerShell', 'Binary', 'MSBuild', 31 | /// 'InstallUtil' 32 | /// Possible values include: 'HTTP', 33 | /// 'SMB' 34 | public WscriptLauncher(ScriptingLanguage? scriptLanguage = default(ScriptingLanguage?), string progId = default(string), string diskCode = default(string), int? id = default(int?), int? listenerId = default(int?), DotNetVersion? dotNetFrameworkVersion = default(DotNetVersion?), LauncherType? type = default(LauncherType?), string name = default(string), string description = default(string), CommunicationType? commType = default(CommunicationType?), bool? validateCert = default(bool?), bool? useCertPinning = default(bool?), string smbPipeName = default(string), int? delay = default(int?), int? jitterPercent = default(int?), int? connectAttempts = default(int?), System.DateTime? killDate = default(System.DateTime?), string launcherString = default(string), string stagerCode = default(string), string base64ILByteString = default(string)) 35 | { 36 | ScriptLanguage = scriptLanguage; 37 | ProgId = progId; 38 | DiskCode = diskCode; 39 | Id = id; 40 | ListenerId = listenerId; 41 | DotNetFrameworkVersion = dotNetFrameworkVersion; 42 | Type = type; 43 | Name = name; 44 | Description = description; 45 | CommType = commType; 46 | ValidateCert = validateCert; 47 | UseCertPinning = useCertPinning; 48 | SmbPipeName = smbPipeName; 49 | Delay = delay; 50 | JitterPercent = jitterPercent; 51 | ConnectAttempts = connectAttempts; 52 | KillDate = killDate; 53 | LauncherString = launcherString; 54 | StagerCode = stagerCode; 55 | Base64ILByteString = base64ILByteString; 56 | CustomInit(); 57 | } 58 | 59 | /// 60 | /// An initialization method that performs custom operations like setting defaults 61 | /// 62 | partial void CustomInit(); 63 | 64 | /// 65 | /// Gets or sets possible values include: 'JScript', 'VBScript' 66 | /// 67 | [JsonProperty(PropertyName = "scriptLanguage")] 68 | public ScriptingLanguage? ScriptLanguage { get; set; } 69 | 70 | /// 71 | /// 72 | [JsonProperty(PropertyName = "progId")] 73 | public string ProgId { get; set; } 74 | 75 | /// 76 | /// 77 | [JsonProperty(PropertyName = "diskCode")] 78 | public string DiskCode { get; set; } 79 | 80 | /// 81 | /// 82 | [JsonProperty(PropertyName = "id")] 83 | public int? Id { get; set; } 84 | 85 | /// 86 | /// 87 | [JsonProperty(PropertyName = "listenerId")] 88 | public int? ListenerId { get; set; } 89 | 90 | /// 91 | /// Gets or sets possible values include: 'Net40', 'Net35', 'NetCore21' 92 | /// 93 | [JsonProperty(PropertyName = "dotNetFrameworkVersion")] 94 | public DotNetVersion? DotNetFrameworkVersion { get; set; } 95 | 96 | /// 97 | /// Gets or sets possible values include: 'Wmic', 'Regsvr32', 'Mshta', 98 | /// 'Cscript', 'Wscript', 'PowerShell', 'Binary', 'MSBuild', 99 | /// 'InstallUtil' 100 | /// 101 | [JsonProperty(PropertyName = "type")] 102 | public LauncherType? Type { get; set; } 103 | 104 | /// 105 | /// 106 | [JsonProperty(PropertyName = "name")] 107 | public string Name { get; set; } 108 | 109 | /// 110 | /// 111 | [JsonProperty(PropertyName = "description")] 112 | public string Description { get; set; } 113 | 114 | /// 115 | /// Gets or sets possible values include: 'HTTP', 'SMB' 116 | /// 117 | [JsonProperty(PropertyName = "commType")] 118 | public CommunicationType? CommType { get; set; } 119 | 120 | /// 121 | /// 122 | [JsonProperty(PropertyName = "validateCert")] 123 | public bool? ValidateCert { get; set; } 124 | 125 | /// 126 | /// 127 | [JsonProperty(PropertyName = "useCertPinning")] 128 | public bool? UseCertPinning { get; set; } 129 | 130 | /// 131 | /// 132 | [JsonProperty(PropertyName = "smbPipeName")] 133 | public string SmbPipeName { get; set; } 134 | 135 | /// 136 | /// 137 | [JsonProperty(PropertyName = "delay")] 138 | public int? Delay { get; set; } 139 | 140 | /// 141 | /// 142 | [JsonProperty(PropertyName = "jitterPercent")] 143 | public int? JitterPercent { get; set; } 144 | 145 | /// 146 | /// 147 | [JsonProperty(PropertyName = "connectAttempts")] 148 | public int? ConnectAttempts { get; set; } 149 | 150 | /// 151 | /// 152 | [JsonProperty(PropertyName = "killDate")] 153 | public System.DateTime? KillDate { get; set; } 154 | 155 | /// 156 | /// 157 | [JsonProperty(PropertyName = "launcherString")] 158 | public string LauncherString { get; set; } 159 | 160 | /// 161 | /// 162 | [JsonProperty(PropertyName = "stagerCode")] 163 | public string StagerCode { get; set; } 164 | 165 | /// 166 | /// 167 | [JsonProperty(PropertyName = "base64ILByteString")] 168 | public string Base64ILByteString { get; set; } 169 | 170 | } 171 | } 172 | -------------------------------------------------------------------------------- /Elite/Common.cs: -------------------------------------------------------------------------------- 1 | // Author: Ryan Cobb (@cobbr_io) 2 | // Project: Elite (https://github.com/cobbr/Elite) 3 | // License: GNU GPLv3 4 | 5 | using System; 6 | using System.IO; 7 | using System.Net; 8 | using System.Text; 9 | using System.Linq; 10 | using System.Reflection; 11 | using System.Collections.Generic; 12 | using System.Text.RegularExpressions; 13 | 14 | using System.Security.Cryptography; 15 | using System.Security.Cryptography.X509Certificates; 16 | 17 | namespace Elite 18 | { 19 | public static class Common 20 | { 21 | public static int EliteMenuUpperBufferLength = 2; 22 | public static int EliteMenuLowerBufferLength = 2; 23 | public static string EliteMenuLeftBuffer = " "; 24 | 25 | public static int GruntMenuGruntNameBufferLength = 13; 26 | public static int GruntMenuComputerNameBufferLength = 30; 27 | public static int GruntMenuOperatingSystemBufferLength = 35; 28 | 29 | public static int StagerMenuStagerNameBufferLength = 13; 30 | 31 | public static int ListenerMenuListenerNameBufferLength = 15; 32 | public static int ListenerMenuIsListeningBufferLength = 14; 33 | 34 | public static int HostedFileMenuListenerNameBufferLength = 11; 35 | public static int HostedFileMenuHostUriBufferLength = 30; 36 | 37 | public static string EliteRootFolder = Assembly.GetExecutingAssembly().Location.Split("bin")[0].Split("Elite.dll")[0]; 38 | public static string EliteDataFolder = EliteRootFolder + "Data" + Path.DirectorySeparatorChar; 39 | public static string EliteResourcesFolder = EliteDataFolder + "Resources" + Path.DirectorySeparatorChar; 40 | public static string EliteDownloadsFolder = EliteDataFolder + "Downloads" + Path.DirectorySeparatorChar; 41 | public static Encoding CovenantEncoding = Encoding.UTF8; 42 | } 43 | 44 | public static class Utilities 45 | { 46 | public static X509Certificate2 CreateSelfSignedCertificate(string address, string DistinguishedName = "") 47 | { 48 | if (DistinguishedName == "") { DistinguishedName = "CN=" + address; } 49 | using (RSA rsa = RSA.Create(2048)) 50 | { 51 | var request = new CertificateRequest(new X500DistinguishedName(DistinguishedName), rsa, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1); 52 | request.CertificateExtensions.Add(new X509KeyUsageExtension(X509KeyUsageFlags.DataEncipherment | X509KeyUsageFlags.KeyEncipherment | X509KeyUsageFlags.DigitalSignature, false)); 53 | request.CertificateExtensions.Add(new X509EnhancedKeyUsageExtension(new OidCollection { new Oid("1.3.6.1.5.5.7.3.1") }, false)); 54 | SubjectAlternativeNameBuilder subjectAlternativeName = new SubjectAlternativeNameBuilder(); 55 | subjectAlternativeName.AddIpAddress(IPAddress.Parse(address)); 56 | 57 | request.CertificateExtensions.Add(subjectAlternativeName.Build()); 58 | return request.CreateSelfSigned(new DateTimeOffset(DateTime.UtcNow.AddDays(-1)), new DateTimeOffset(DateTime.UtcNow.AddDays(3650))); 59 | } 60 | } 61 | 62 | public static List GetFilesForPath(string FilePath) 63 | { 64 | return Directory.GetFiles(FilePath, "*", SearchOption.AllDirectories) 65 | .Select(F => F.Split(FilePath)[1]) 66 | .Where(F => !F.Contains(".gitignore")) 67 | .ToList(); 68 | } 69 | 70 | public static List ParseParameters(string command) 71 | { 72 | return Regex.Matches(command, @"[\""].+?[\""]|[^ ]+") 73 | .Cast() 74 | .Select(m => m.Value.Trim('"')) 75 | .ToList(); 76 | } 77 | 78 | public static string GetPassword() 79 | { 80 | string password = ""; 81 | ConsoleKeyInfo nextKey = Console.ReadKey(true); 82 | while (nextKey.Key != ConsoleKey.Enter) 83 | { 84 | if (nextKey.Key == ConsoleKey.Backspace) 85 | { 86 | if (password.Length > 0) 87 | { 88 | password = password.Substring(0, password.Length - 1); 89 | Console.Write("\b \b"); 90 | } 91 | } 92 | else 93 | { 94 | password += nextKey.KeyChar; 95 | Console.Write("*"); 96 | } 97 | nextKey = Console.ReadKey(true); 98 | } 99 | return password; 100 | } 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /Elite/Data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | !Resources/ 4 | !Downloads/ 5 | -------------------------------------------------------------------------------- /Elite/Data/Downloads/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Elite/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM microsoft/dotnet:2.2-sdk AS build 2 | WORKDIR /app 3 | 4 | COPY . ./ 5 | RUN dotnet restore 6 | RUN dotnet publish -c Release -o out 7 | 8 | FROM microsoft/dotnet:2.2-runtime AS runtime 9 | WORKDIR /app 10 | COPY --from=build /app/out . 11 | COPY ./Data ./Data 12 | ENTRYPOINT ["dotnet", "Elite.dll"] 13 | -------------------------------------------------------------------------------- /Elite/Elite.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.1 6 | 7 | 8 | 9 | 7.1 10 | 11 | 12 | 13 | 7.1 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | refs\ReadLine.dll 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /Elite/EventPrinter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using Covenant.API.Models; 4 | 5 | namespace Elite 6 | { 7 | public class EventPrinter 8 | { 9 | private static object _EventLock = new object(); 10 | 11 | public bool PrintEvent(EventModel theEvent, string Context = "*") 12 | { 13 | lock (_EventLock) 14 | { 15 | if (ContextMatches(theEvent, Context)) 16 | { 17 | EliteConsole.PrintInfoLine(); 18 | switch (theEvent.Level) 19 | { 20 | case EventLevel.Highlight: 21 | EliteConsole.PrintFormattedHighlightLine(theEvent.MessageHeader); 22 | break; 23 | case EventLevel.Info: 24 | EliteConsole.PrintFormattedInfoLine(theEvent.MessageHeader); 25 | break; 26 | case EventLevel.Warning: 27 | EliteConsole.PrintFormattedWarningLine(theEvent.MessageHeader); 28 | break; 29 | case EventLevel.Error: 30 | EliteConsole.PrintFormattedErrorLine(theEvent.MessageHeader); 31 | break; 32 | default: 33 | EliteConsole.PrintFormattedInfoLine(theEvent.MessageHeader); 34 | break; 35 | } 36 | if (!string.IsNullOrWhiteSpace(theEvent.MessageBody)) 37 | { 38 | EliteConsole.PrintInfoLine(theEvent.MessageBody); 39 | } 40 | return true; 41 | } 42 | return false; 43 | } 44 | } 45 | 46 | private static bool ContextMatches(EventModel theEvent, string Context = "*") 47 | { 48 | return theEvent.Context == "*" || Context.ToLower().Contains(theEvent.Context.ToLower()); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Elite/Exceptions.cs: -------------------------------------------------------------------------------- 1 | // Author: Ryan Cobb (@cobbr_io) 2 | // Project: Elite (https://github.com/cobbr/Elite) 3 | // License: GNU GPLv3 4 | 5 | using System; 6 | 7 | namespace Elite 8 | { 9 | class CovenantDisconnectedException : Exception 10 | { 11 | public CovenantDisconnectedException(string message, Exception inner) : base(message, inner) 12 | { 13 | 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Elite/Menu/CovenantBaseMenuItem.cs: -------------------------------------------------------------------------------- 1 | // Author: Ryan Cobb (@cobbr_io) 2 | // Project: Elite (https://github.com/cobbr/Elite) 3 | // License: GNU GPLv3 4 | 5 | using System; 6 | using System.Linq; 7 | using System.Collections.Generic; 8 | 9 | using Covenant.API; 10 | 11 | using Elite.Menu.Listeners; 12 | using Elite.Menu.Launchers; 13 | using Elite.Menu.Grunts; 14 | using Elite.Menu.Users; 15 | using Elite.Menu.Indicators; 16 | 17 | namespace Elite.Menu 18 | { 19 | public class MenuCommandCovenantBaseItemShow : MenuCommand 20 | { 21 | public override void Command(MenuItem menuItem, string UserInput) 22 | { 23 | new MenuCommandHelp().Command(menuItem, UserInput); 24 | } 25 | } 26 | 27 | public class CovenantBaseMenuItem : MenuItem 28 | { 29 | public CovenantBaseMenuItem(CovenantAPI CovenantClient) : base(CovenantClient) 30 | { 31 | this.MenuTitle = "Covenant"; 32 | this.MenuDescription = "Base Covenant menu."; 33 | this.MenuOptions.Add(new GruntsMenuItem(this.CovenantClient)); 34 | this.MenuOptions.Add(new LaunchersMenuItem(this.CovenantClient)); 35 | this.MenuOptions.Add(new ListenersMenuItem(this.CovenantClient)); 36 | this.MenuOptions.Add(new CredentialsMenuItem(this.CovenantClient)); 37 | this.MenuOptions.Add(new IndicatorsMenuItem(this.CovenantClient)); 38 | try 39 | { 40 | this.MenuOptions.Add(new UsersMenuItem(this.CovenantClient)); 41 | } 42 | catch (Microsoft.Rest.HttpOperationException) 43 | { } 44 | this.AdditionalOptions.Remove(this.AdditionalOptions.FirstOrDefault(O => O.Name == "Back")); 45 | this.AdditionalOptions.Add( 46 | new MenuCommandCovenantBaseItemShow() 47 | { 48 | Name = "Show", 49 | Description = "Show Help menu.", 50 | Parameters = new List() 51 | } 52 | ); 53 | this.SetupMenuAutoComplete(); 54 | } 55 | 56 | public override void PrintMenu() 57 | { 58 | this.AdditionalOptions.FirstOrDefault(O => O.Name == "Show").Command(this, ""); 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Elite/Menu/EliteMenu.cs: -------------------------------------------------------------------------------- 1 | // Author: Ryan Cobb (@cobbr_io) 2 | // Project: Elite (https://github.com/cobbr/Elite) 3 | // License: GNU GPLv3 4 | 5 | using System; 6 | using System.Text; 7 | using System.Net.Http; 8 | using System.Collections.Generic; 9 | 10 | using Covenant.API; 11 | using Covenant.API.Models; 12 | 13 | namespace Elite.Menu 14 | { 15 | public class EliteMenu 16 | { 17 | private List MenuStack { get; set; } = new List(); 18 | private CovenantAPI CovenantClient { get; set; } 19 | 20 | public EliteMenu(CovenantAPI CovenantClient) 21 | { 22 | this.CovenantClient = CovenantClient; 23 | this.MenuStack.Add(new CovenantBaseMenuItem(this.CovenantClient)); 24 | } 25 | 26 | public string GetMenuLevelTitleStack() 27 | { 28 | StringBuilder builder = new StringBuilder(); 29 | if (this.MenuStack.Count > 1) 30 | { 31 | builder.Append(MenuStack[1].MenuTitle); 32 | for (int i = 2; i < MenuStack.Count; i++) 33 | { 34 | builder.Append("\\" + MenuStack[i].MenuTitle); 35 | } 36 | } 37 | return builder.ToString(); 38 | } 39 | 40 | public void PrintMenuLevel() 41 | { 42 | if (MenuStack.Count > 1) 43 | { 44 | EliteConsole.PrintInfo("(Covenant: "); 45 | EliteConsole.PrintHighlight(this.GetMenuLevelTitleStack()); 46 | EliteConsole.PrintInfo(") > "); 47 | } 48 | else 49 | { 50 | EliteConsole.PrintInfo("(Covenant) > "); 51 | } 52 | } 53 | 54 | public MenuItem GetCurrentMenuItem() 55 | { 56 | return this.MenuStack[this.MenuStack.Count - 1]; 57 | } 58 | 59 | public bool PrintMenu(string UserInput = "") 60 | { 61 | try 62 | { 63 | UserInput = UserInput.Trim(); 64 | if (UserInput != "") 65 | { 66 | MenuItem currentMenuItem = this.GetCurrentMenuItem(); 67 | if (UserInput.Equals("back", StringComparison.OrdinalIgnoreCase)) 68 | { 69 | if (this.MenuStack.Count > 1) { 70 | currentMenuItem.LeavingMenuItem(); 71 | this.MenuStack.RemoveAt(this.MenuStack.Count - 1); 72 | currentMenuItem = this.GetCurrentMenuItem(); 73 | currentMenuItem.ValidateMenuParameters(new string[]{}, false); 74 | } 75 | else { currentMenuItem.PrintInvalidOptionError(UserInput); } 76 | } 77 | else if (UserInput.Equals("exit", StringComparison.OrdinalIgnoreCase)) 78 | { 79 | EliteConsole.PrintFormattedWarning("Exit Elite console? [y/N] "); 80 | string input = EliteConsole.Read(); 81 | if (input.StartsWith("y", StringComparison.OrdinalIgnoreCase)) 82 | { 83 | return false; 84 | } 85 | } 86 | else 87 | { 88 | MenuItem newMenuLevelItem = currentMenuItem.GetMenuOption(UserInput); 89 | if (newMenuLevelItem != null) 90 | { 91 | this.MenuStack.Add(newMenuLevelItem); 92 | newMenuLevelItem.PrintMenu(); 93 | } 94 | else 95 | { 96 | MenuCommand menuCommandOption = currentMenuItem.GetMenuCommandOption(UserInput); 97 | if (menuCommandOption != null) 98 | { 99 | menuCommandOption.Command(currentMenuItem, UserInput); 100 | } 101 | else 102 | { 103 | currentMenuItem.PrintInvalidOptionError(UserInput); 104 | } 105 | } 106 | } 107 | currentMenuItem = this.GetCurrentMenuItem(); 108 | ReadLine.AutoCompletionHandler = currentMenuItem.TabCompletionHandler; 109 | } 110 | this.PrintMenuLevel(); 111 | 112 | return true; 113 | } 114 | catch (HttpRequestException) 115 | { 116 | EliteConsole.PrintFormattedWarning("Covenant has disconnected. Quit? [y/N] "); 117 | string input = EliteConsole.Read(); 118 | if (input.ToLower().StartsWith('y')) 119 | { 120 | return false; 121 | } 122 | } 123 | catch (Exception e) 124 | { 125 | EliteConsole.PrintFormattedErrorLine("EliteMenu Exception: " + e.Message); 126 | EliteConsole.PrintErrorLine(e.StackTrace); 127 | this.PrintMenuLevel(); 128 | return true; 129 | } 130 | this.PrintMenuLevel(); 131 | return true; 132 | } 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /Elite/Menu/Indicators/IndicatorsMenuItem.cs: -------------------------------------------------------------------------------- 1 | // Author: Ryan Cobb (@cobbr_io) 2 | // Project: Elite (https://github.com/cobbr/Elite) 3 | // License: GNU GPLv3 4 | 5 | using System; 6 | using System.Linq; 7 | using System.Collections.Generic; 8 | 9 | using Microsoft.Rest; 10 | 11 | using Covenant.API; 12 | using Covenant.API.Models; 13 | 14 | namespace Elite.Menu.Indicators 15 | { 16 | public class MenuCommandIndicatorsShow : MenuCommand 17 | { 18 | public MenuCommandIndicatorsShow() 19 | { 20 | this.Name = "Show"; 21 | this.Description = "Show Indicators"; 22 | this.Parameters = new List(); 23 | } 24 | 25 | public override void Command(MenuItem menuItem, string UserInput) 26 | { 27 | menuItem.Refresh(); 28 | IndicatorsMenuItem indicatorsMenu = ((IndicatorsMenuItem)menuItem); 29 | EliteConsoleMenu targetIndicatorsMenu = new EliteConsoleMenu(EliteConsoleMenu.EliteConsoleMenuType.List, "Target Indicators"); 30 | targetIndicatorsMenu.Columns.Add("Name"); 31 | targetIndicatorsMenu.Columns.Add("ComputerName"); 32 | targetIndicatorsMenu.Columns.Add("UserName"); 33 | indicatorsMenu.TargetIndicators.ToList().ForEach(TI => 34 | { 35 | targetIndicatorsMenu.Rows.Add(new List { 36 | TI.Name, 37 | TI.ComputerName, 38 | TI.UserName 39 | }); 40 | }); 41 | if (targetIndicatorsMenu.Rows.Count > 0) 42 | { 43 | targetIndicatorsMenu.PrintEndBuffer = false; 44 | targetIndicatorsMenu.Print(); 45 | } 46 | 47 | EliteConsoleMenu networkIndicatorsMenu = new EliteConsoleMenu(EliteConsoleMenu.EliteConsoleMenuType.List, "Network Indicators"); 48 | networkIndicatorsMenu.Columns.Add("Name"); 49 | networkIndicatorsMenu.Columns.Add("Protocol"); 50 | networkIndicatorsMenu.Columns.Add("Domain"); 51 | networkIndicatorsMenu.Columns.Add("IPAddress"); 52 | networkIndicatorsMenu.Columns.Add("Port"); 53 | networkIndicatorsMenu.Columns.Add("URI"); 54 | 55 | indicatorsMenu.NetworkIndicators.ToList().ForEach(NI => 56 | { 57 | networkIndicatorsMenu.Rows.Add(new List { 58 | NI.Name, 59 | NI.Protocol, 60 | NI.Domain, 61 | NI.IpAddress, 62 | NI.Port.ToString(), 63 | NI.Uri 64 | }); 65 | }); 66 | if (networkIndicatorsMenu.Rows.Count > 0) 67 | { 68 | networkIndicatorsMenu.PrintEndBuffer = false; 69 | networkIndicatorsMenu.Print(); 70 | } 71 | 72 | EliteConsoleMenu fileIndicatorsMenu = new EliteConsoleMenu(EliteConsoleMenu.EliteConsoleMenuType.List, "File Indicators"); 73 | fileIndicatorsMenu.Columns.Add("Name"); 74 | fileIndicatorsMenu.Columns.Add("FileName"); 75 | fileIndicatorsMenu.Columns.Add("FilePath"); 76 | fileIndicatorsMenu.Columns.Add("SHA2"); 77 | fileIndicatorsMenu.Columns.Add("SHA1"); 78 | fileIndicatorsMenu.Columns.Add("MD5"); 79 | indicatorsMenu.FileIndicators.ToList().ForEach(FI => 80 | { 81 | fileIndicatorsMenu.Rows.Add(new List { 82 | FI.Name, 83 | FI.FileName, 84 | FI.FilePath, 85 | FI.ShA2, 86 | FI.ShA1, 87 | FI.MD5 88 | }); 89 | }); 90 | if (fileIndicatorsMenu.Rows.Count > 0) 91 | { 92 | fileIndicatorsMenu.Print(); 93 | } 94 | } 95 | } 96 | 97 | public sealed class IndicatorsMenuItem : MenuItem 98 | { 99 | public List AllIndicators { get; set; } 100 | public List NetworkIndicators { get; set; } 101 | public List FileIndicators { get; set; } 102 | public List TargetIndicators { get; set; } 103 | 104 | public IndicatorsMenuItem(CovenantAPI CovenantClient) : base(CovenantClient) 105 | { 106 | this.MenuTitle = "Indicators"; 107 | this.MenuDescription = "Displays list of indicators."; 108 | 109 | this.AdditionalOptions.Add(new MenuCommandIndicatorsShow()); 110 | this.Refresh(); 111 | } 112 | 113 | public override bool ValidateMenuParameters(string[] parameters = null, bool forwardEntrance = true) 114 | { 115 | this.Refresh(); 116 | return true; 117 | } 118 | 119 | public override void PrintMenu() 120 | { 121 | this.AdditionalOptions.FirstOrDefault(O => O.Name == "Show").Command(this, ""); 122 | } 123 | 124 | public override void Refresh() 125 | { 126 | try 127 | { 128 | this.AllIndicators = this.CovenantClient.ApiIndicatorsGet().ToList(); 129 | this.NetworkIndicators = this.CovenantClient.ApiIndicatorsNetworksGet().ToList(); 130 | this.FileIndicators = this.CovenantClient.ApiIndicatorsFilesGet().ToList(); 131 | this.TargetIndicators = this.CovenantClient.ApiIndicatorsTargetsGet().ToList(); 132 | this.SetupMenuAutoComplete(); 133 | } 134 | catch (HttpOperationException e) 135 | { 136 | EliteConsole.PrintFormattedWarningLine("CovenantException: " + e.Response.Content); 137 | } 138 | } 139 | } 140 | } 141 | -------------------------------------------------------------------------------- /Elite/Menu/Launchers/LaunchersMenuItem.cs: -------------------------------------------------------------------------------- 1 | // Author: Ryan Cobb (@cobbr_io) 2 | // Project: Elite (https://github.com/cobbr/Elite) 3 | // License: GNU GPLv3 4 | 5 | using System.Linq; 6 | using System.Collections.Generic; 7 | 8 | using Microsoft.Rest; 9 | 10 | using Covenant.API; 11 | using Covenant.API.Models; 12 | 13 | namespace Elite.Menu.Launchers 14 | { 15 | public class MenuCommandLaunchersShow : MenuCommand 16 | { 17 | public MenuCommandLaunchersShow(CovenantAPI CovenantClient) : base(CovenantClient) 18 | { 19 | this.Name = "Show"; 20 | this.Description = "Displays list of Launcher options."; 21 | this.Parameters = new List(); 22 | } 23 | 24 | public override void Command(MenuItem menuItem, string UserInput) 25 | { 26 | try 27 | { 28 | List launchers = this.CovenantClient.ApiLaunchersGet().ToList(); 29 | EliteConsoleMenu menu = new EliteConsoleMenu(EliteConsoleMenu.EliteConsoleMenuType.List, "Launchers"); 30 | menu.Columns.Add("Name"); 31 | menu.Columns.Add("Description"); 32 | launchers.ForEach(L => 33 | { 34 | menu.Rows.Add(new List { L.Name, L.Description }); 35 | }); 36 | menu.Print(); 37 | } 38 | catch (HttpOperationException e) 39 | { 40 | EliteConsole.PrintFormattedWarningLine("CovenantException: " + e.Response.Content); 41 | } 42 | } 43 | } 44 | 45 | public class LaunchersMenuItem : MenuItem 46 | { 47 | public LaunchersMenuItem(CovenantAPI CovenantClient) : base(CovenantClient) 48 | { 49 | this.MenuTitle = "Launchers"; 50 | this.MenuDescription = "Displays list of launcher options."; 51 | this.MenuOptions.Add(new WmicLauncherMenuItem(this.CovenantClient)); 52 | this.MenuOptions.Add(new Regsvr32LauncherMenuItem(this.CovenantClient)); 53 | this.MenuOptions.Add(new MshtaLauncherMenuItem(this.CovenantClient)); 54 | this.MenuOptions.Add(new CscriptLauncherMenuItem(this.CovenantClient)); 55 | this.MenuOptions.Add(new WscriptLauncherMenuItem(this.CovenantClient)); 56 | this.MenuOptions.Add(new InstallUtilLauncherMenuItem(this.CovenantClient)); 57 | this.MenuOptions.Add(new MSBuildLauncherMenuItem(this.CovenantClient)); 58 | this.MenuOptions.Add(new PowerShellLauncherMenuItem(this.CovenantClient)); 59 | this.MenuOptions.Add(new BinaryLauncherMenuItem(this.CovenantClient)); 60 | 61 | this.AdditionalOptions.Add(new MenuCommandLaunchersShow(this.CovenantClient)); 62 | 63 | this.SetupMenuAutoComplete(); 64 | } 65 | 66 | public override void PrintMenu() 67 | { 68 | this.AdditionalOptions.FirstOrDefault(O => O.Name == "Show").Command(this, ""); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Elite/Menu/Listeners/ListenersMenuItem.cs: -------------------------------------------------------------------------------- 1 | // Author: Ryan Cobb (@cobbr_io) 2 | // Project: Elite (https://github.com/cobbr/Elite) 3 | // License: GNU GPLv3 4 | 5 | using System; 6 | using System.Linq; 7 | using System.Collections.Generic; 8 | 9 | using Microsoft.Rest; 10 | 11 | using Covenant.API; 12 | using Covenant.API.Models; 13 | 14 | namespace Elite.Menu.Listeners 15 | { 16 | public class MenuCommandListenersShow : MenuCommand 17 | { 18 | public MenuCommandListenersShow() 19 | { 20 | this.Name = "Show"; 21 | this.Description = "Show Listener types"; 22 | this.Parameters = new List(); 23 | } 24 | 25 | public override void Command(MenuItem menuItem, string UserInput) 26 | { 27 | menuItem.Refresh(); 28 | List Listeners = ((ListenersMenuItem)menuItem).Listeners; 29 | List ListenerTypes = ((ListenersMenuItem)menuItem).ListenerTypes; 30 | 31 | EliteConsoleMenu typeMenu = new EliteConsoleMenu(EliteConsoleMenu.EliteConsoleMenuType.List, "Listener Types"); 32 | typeMenu.Columns.Add("ListenerName"); 33 | typeMenu.Columns.Add("Description"); 34 | ListenerTypes.ToList().ForEach(L => 35 | { 36 | typeMenu.Rows.Add(new List { L.Name, L.Description }); 37 | }); 38 | typeMenu.PrintEndBuffer = false; 39 | typeMenu.Print(); 40 | 41 | EliteConsoleMenu instanceMenu = new EliteConsoleMenu(EliteConsoleMenu.EliteConsoleMenuType.List, "Active Listeners"); 42 | instanceMenu.Columns.Add("Name"); 43 | instanceMenu.Columns.Add("TypeName"); 44 | instanceMenu.Columns.Add("Status"); 45 | instanceMenu.Columns.Add("StartTime"); 46 | instanceMenu.Columns.Add("BindAddress"); 47 | instanceMenu.Columns.Add("BindPort"); 48 | Listeners.ToList().ForEach(L => 49 | { 50 | instanceMenu.Rows.Add(new List { 51 | L.Name, 52 | ListenerTypes.FirstOrDefault(LT => LT.Id == L.ListenerTypeId).Name, 53 | L.Status.ToString(), 54 | L.StartTime.ToString(), 55 | L.BindAddress, 56 | L.BindPort.ToString() 57 | }); 58 | }); 59 | instanceMenu.Print(); 60 | } 61 | } 62 | 63 | public class MenuCommandListenersRename : MenuCommand 64 | { 65 | public MenuCommandListenersRename(CovenantAPI CovenantClient) : base(CovenantClient) 66 | { 67 | this.Name = "Rename"; 68 | this.Description = "Rename a listener"; 69 | try 70 | { 71 | this.Parameters = new List { 72 | new MenuCommandParameter { Name = "Old Name" }, 73 | new MenuCommandParameter { Name = "New Name" } 74 | }; 75 | } 76 | catch (HttpOperationException e) 77 | { 78 | EliteConsole.PrintFormattedWarningLine("CovenantException: " + e.Response.Content); 79 | } 80 | } 81 | 82 | public override async void Command(MenuItem menuItem, string UserInput) 83 | { 84 | try 85 | { 86 | string[] commands = UserInput.Split(" "); 87 | if (commands.Length != 3 || !commands[0].Equals(this.Name, StringComparison.OrdinalIgnoreCase)) 88 | { 89 | menuItem.PrintInvalidOptionError(UserInput); 90 | return; 91 | } 92 | 93 | List Listeners = ((ListenersMenuItem)menuItem).Listeners; 94 | Listener listener = Listeners.FirstOrDefault(L => L.Name.Equals(commands[1], StringComparison.OrdinalIgnoreCase)); 95 | if (listener == null) 96 | { 97 | EliteConsole.PrintFormattedErrorLine("Listener with name: " + commands[1] + " does not exist."); 98 | menuItem.PrintInvalidOptionError(UserInput); 99 | return; 100 | } 101 | 102 | if (Listeners.Any(L => L.Name.Equals(commands[2], StringComparison.OrdinalIgnoreCase))) 103 | { 104 | EliteConsole.PrintFormattedErrorLine("Listener with name: " + commands[2] + " already exists."); 105 | menuItem.PrintInvalidOptionError(UserInput); 106 | return; 107 | } 108 | 109 | listener.Name = commands[2]; 110 | await this.CovenantClient.ApiListenersPutAsync(listener); 111 | } 112 | catch (HttpOperationException e) 113 | { 114 | EliteConsole.PrintFormattedWarningLine("CovenantException: " + e.Response.Content); 115 | } 116 | } 117 | } 118 | 119 | public sealed class ListenersMenuItem : MenuItem 120 | { 121 | public List ListenerTypes { get; set; } 122 | public List Listeners { get; set; } 123 | 124 | public ListenersMenuItem(CovenantAPI CovenantClient) : base(CovenantClient) 125 | { 126 | this.MenuTitle = "Listeners"; 127 | this.MenuDescription = "Displays list of listeners."; 128 | 129 | this.MenuOptions.Add(new HTTPListenerMenuItem(this.CovenantClient)); 130 | this.MenuOptions.Add(new ListenerInteractMenuItem(this.CovenantClient)); 131 | 132 | this.AdditionalOptions.Add(new MenuCommandListenersShow()); 133 | this.AdditionalOptions.Add(new MenuCommandListenersRename(CovenantClient)); 134 | } 135 | 136 | public override bool ValidateMenuParameters(string[] parameters = null, bool forwardEntrance = true) 137 | { 138 | this.Refresh(); 139 | return true; 140 | } 141 | 142 | public override void PrintMenu() 143 | { 144 | this.AdditionalOptions.FirstOrDefault(O => O.Name == "Show").Command(this, ""); 145 | } 146 | 147 | public override void Refresh() 148 | { 149 | try 150 | { 151 | this.ListenerTypes = this.CovenantClient.ApiListenersTypesGet().ToList(); 152 | this.Listeners = this.CovenantClient.ApiListenersGet().Where(L => L.Status != ListenerStatus.Uninitialized).ToList(); 153 | List listenerNames = this.Listeners.Select(L => new MenuCommandParameterValue { Value = L.Name }).ToList(); 154 | 155 | this.MenuOptions.FirstOrDefault(M => M.MenuTitle == "Interact") 156 | .MenuItemParameters 157 | .FirstOrDefault(P => P.Name == "Listener Name") 158 | .Values = listenerNames; 159 | 160 | this.AdditionalOptions.FirstOrDefault(AO => AO.Name == "Rename") 161 | .Parameters 162 | .FirstOrDefault(P => P.Name == "Old Name") 163 | .Values = listenerNames; 164 | 165 | this.SetupMenuAutoComplete(); 166 | } 167 | catch (HttpOperationException e) 168 | { 169 | EliteConsole.PrintFormattedWarningLine("CovenantException: " + e.Response.Content); 170 | } 171 | } 172 | } 173 | } 174 | -------------------------------------------------------------------------------- /Elite/refs/ReadLine.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobbr/Elite/ba3b5bca707bb2f683aedf39517cce6eb9875621/Elite/refs/ReadLine.dll -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Deprecated (Temporarily) 2 | 3 | The parent [Covenant](https://github.com/cobbr/Covenant) project no longer requires a client-side application. Elite has temporarily been deprecated. Please instead use the web interface included with the Covenant project. 4 | 5 | Elite may eventually be brought up-to-date with the Covenant project as an alternative interface, but for now this project is not updated and will not work with Covenant v0.3 or higher. 6 | 7 | # Elite 8 | 9 | Elite is a .NET core, client application built for interacting with [Covenant](https://github.com/cobbr/Covenant). 10 | 11 | ## Covenant 12 | 13 | Covenant is a .NET command and control framework that aims to highlight the attack surface of .NET, make the use of offensive .NET tradecraft easier, and serve as a collaborative command and control platform for red teamers. 14 | 15 | Covenant is an ASP.NET Core, cross-platform application that includes a robust API to enable a client-server architecture that allows for multi-user collaboration. There are three main components of Covenant's architecture: 16 | 17 | * **Covenant** - Covenant is the server-side component of the client-server architecture. Covenant runs the command and control server hosted on infrastructure shared between operators. I will also frequently use the term "Covenant" to refer to the entire overarching project that includes all components of the architecture. 18 | * **Elite** - [Elite](https://github.com/cobbr/Elite) is the client-side component of the client-server architecture. Elite is a command-line interface that operators use to interact with the Covenant server to conduct operations. 19 | * **Grunt** - A "Grunt" is the name of Covenant's implant that is deployed to targets. 20 | 21 | ## Features 22 | 23 | Covenant has several key features: 24 | 25 | * **Multi-Platform** - Covenant and Elite both target .NET Core, which makes them multi-platform. This allows these programs to run natively on Linux, MacOS, and Windows platforms. Additionally, both Covenant and Elite have docker support, allowing these programs to run within a container on any system that has docker installed. 26 | * **Multi-User** - Covenant supports multi-user collaboration. The ability to collaborate has become crucial for effective red team operations. Many users can start Elite clients that connect to the same Covenant server and operate independently or collaboratively. 27 | * **API Driven** - Covenant is driven by a server-side API that enables multi-user collaboration and is easily extendible. Additionally, Covenant includes a Swagger UI that makes development and debugging easier and more convenient. 28 | * **Listener Profiles** - Covenant supports listener "profiles" that control how the network communication between Grunt implants and Covenant listeners look on the wire. 29 | * **Encrypted Key Exchange** - Covenant implements an encrypted key exchange between Grunt implants and Covenant listeners that is largely based on a similar exchange in the [Empire project](https://github.com/EmpireProject/Empire), in addition to optional SSL encryption. This achieves the cryptographic property of forward secrecy between Grunt implants. 30 | * **Dynamic Compilation** - Covenant uses the [Roslyn API](https://github.com/dotnet/roslyn) for dynamic C# compilation. Every time a new Grunt is generated or a new task is assigned, the relevant code is recompiled and obfuscated with [ConfuserEx](https://github.com/mkaring/ConfuserEx), avoiding totally static payloads. Covenant reuses much of the compilation code from the [SharpGen](https://github.com/cobbr/sharpgen) project, which I described in much more detail [in a previous post](https://cobbr.io/SharpGen.html). 31 | * **Inline C# Execution** - Covenant borrows code and ideas from both the [SharpGen](https://github.com/cobbr/sharpgen) and [SharpShell](https://github.com/cobbr/sharpshell) projects to allow operators to execute C# one-liners on Grunt implants. This allows for similar functionality to that described in the [SharpShell post](https://cobbr.io/SharpShell.html), but allows the one-liners to be executed on remote implants. 32 | * **Tracking Indicators** - Covenant tracks "indicators" throughout an operation, and summarizes them in the `Indicators` menu. This allows an operator to conduct actions that are tracked throughout an operation and easily summarize those actions to the blue team during or at the end of an assessment for deconfliction and educational purposes. This feature is still in it's infancy and still has room for improvement. 33 | 34 | ## Users Quick-Start Guide 35 | 36 | First, you need to start Covenant! Go checkout the [Covenant README](https://github.com/cobbr/Covenant/blob/master/README.md) to see how to do that. 37 | 38 | ### Dotnet Core 39 | 40 | The easiest way to use Elite, is by installing dotnet core. You can download dotnet core for your platform from [here](https://dotnet.microsoft.com/download). 41 | 42 | Once you have installed dotnet core, we can build and run Elite using the dotnet CLI: 43 | ``` 44 | $ ~/Elite/Elite > dotnet build 45 | $ ~/Elite/Elite > dotnet run 46 | ``` 47 | 48 | ### Docker 49 | 50 | Elite can also be run with Docker. There are a couple of gotchas with Docker, so I only recommend using docker if you are familiar with docker or are willing to learn the subtle gotchas. 51 | 52 | First, build the docker image: 53 | ``` 54 | $ ~/Elite/Elite > docker build -t elite . 55 | ``` 56 | 57 | Now we can run Elite in a Docker container: 58 | ``` 59 | $ ~/Elite/Elite > docker run -it --rm --name elite -v /absolute/path/to/Elite/Data:/app/Data elite --username AdminUser --computername 60 | ``` 61 | The `--username AdminUser` and `--computername ` are arguments being passed to Elite. This instructs Elite to connect to a Covenant instance hosted at the specifiec IP address and login as a user named `AdminUser`. 62 | 63 | The `-it` parameter is a Docker parameter that indicates that we should begin Elite in an interactive tty. This is important, as Elite is an interactive console application! The `-v /absolute/path/to/Elite/Data:/app/Data` parameter mounts a shared `Data` folder between your host and container, and allows you to easily copy/paste outside tools and payloads generated during operation with Elite. Be sure to replace `/absolute/path/to/Elite/Data` with the location of your own Elite Data folder. 64 | 65 | You will also be prompted to provide a password for the `AdminUser` user. Alternatively, you can set this non-interactively with the `--password` parameter to Elite, but this will leave your password in plaintext in command history, not ideal. 66 | 67 | ### Questions and Discussion 68 | 69 | Have questions or want to chat more about Covenant/Elite? Join the #Covenant channel in the [BloodHound Gang Slack](https://bloodhoundgang.herokuapp.com/). 70 | --------------------------------------------------------------------------------