public async static Task InitializeImplantTemplates(ICovenantService service, CovenantContext context) { if (!context.ImplantTemplates.Any()) { var templates = new ImplantTemplate[] { new ImplantTemplate { Name = "GruntHTTP", Description = "A Windows implant written in C# that communicates over HTTP.", Language = ImplantLanguage.CSharp, CommType = CommunicationType.HTTP, ImplantDirection = ImplantDirection.Pull, CompatibleDotNetVersions = new List <Common.DotNetVersion> { Common.DotNetVersion.Net35, Common.DotNetVersion.Net40 } }, new ImplantTemplate { Name = "GruntSMB", Description = "A Windows implant written in C# that communicates over SMB.", Language = ImplantLanguage.CSharp, CommType = CommunicationType.SMB, ImplantDirection = ImplantDirection.Push, CompatibleDotNetVersions = new List <Common.DotNetVersion> { Common.DotNetVersion.Net35, Common.DotNetVersion.Net40 } }, new ImplantTemplate { Name = "GruntBridge", Description = "A customizable implant written in C# that communicates with a custom C2Bridge.", Language = ImplantLanguage.CSharp, CommType = CommunicationType.Bridge, ImplantDirection = ImplantDirection.Push, CompatibleDotNetVersions = new List <Common.DotNetVersion> { Common.DotNetVersion.Net35, Common.DotNetVersion.Net40 } }, new ImplantTemplate { Name = "Brute", Description = "A cross-platform implant built on .NET Core 3.1.", Language = ImplantLanguage.CSharp, CommType = CommunicationType.HTTP, ImplantDirection = ImplantDirection.Pull, CompatibleDotNetVersions = new List <Common.DotNetVersion> { Common.DotNetVersion.NetCore31 } }, new ImplantTemplate { Name = "GruntHTTPPortForward", Description = "A Windows implant written in C# that communicates over HTTP. Contains reverse port forward functionality.", Language = ImplantLanguage.CSharp, CommType = CommunicationType.HTTP, ImplantDirection = ImplantDirection.Pull, CompatibleDotNetVersions = new List <Common.DotNetVersion> { Common.DotNetVersion.Net35, Common.DotNetVersion.Net40 } } }; templates.ToList().ForEach(t => t.ReadFromDisk()); await service.CreateImplantTemplates(templates); await service.CreateEntities( new ListenerTypeImplantTemplate { ListenerType = await service.GetListenerTypeByName("HTTP"), ImplantTemplate = await service.GetImplantTemplateByName("GruntHTTP") }, new ListenerTypeImplantTemplate { ListenerType = await service.GetListenerTypeByName("HTTP"), ImplantTemplate = await service.GetImplantTemplateByName("GruntSMB") }, new ListenerTypeImplantTemplate { ListenerType = await service.GetListenerTypeByName("Bridge"), ImplantTemplate = await service.GetImplantTemplateByName("GruntBridge") }, new ListenerTypeImplantTemplate { ListenerType = await service.GetListenerTypeByName("Bridge"), ImplantTemplate = await service.GetImplantTemplateByName("GruntSMB") }, new ListenerTypeImplantTemplate { ListenerType = await service.GetListenerTypeByName("HTTP"), ImplantTemplate = await service.GetImplantTemplateByName("Brute") }, new ListenerTypeImplantTemplate { ListenerType = await service.GetListenerTypeByName("HTTP"), ImplantTemplate = await service.GetImplantTemplateByName("GruntHTTPPortForward") } ); } }