Skip to content

Commit

Permalink
Merge pull request #10 from dreamkinn/main
Browse files Browse the repository at this point in the history
Added shellcode arguments functionality
  • Loading branch information
Aetsu authored Oct 27, 2023
2 parents 73cbbe7 + e5c900b commit 242165c
Show file tree
Hide file tree
Showing 84 changed files with 119 additions and 25 deletions.
4 changes: 4 additions & 0 deletions OffensivePipeline/Modules/Donut.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ public ModuleOutput Run()
config.Bypass = 3; //Behavior for bypassing AMSI/WLDP : 1=None, 2=Abort on fail, 3=Continue on fail.(default)
config.InputFile = exe;
config.Payload = Path.Combine(_moduleOutput.OutputPath, $"{_tool.name}.bin");
if (_tool.toolArguments != "") {
LogHelpers.PrintOk($"\t - Arguments passed to shellcode : \"{_tool.toolArguments}\"");
config.Args = _tool.toolArguments;
}
int ret = Generator.Donut_Create(ref config);
message = "\t\t[+] No errors!";
LogHelpers.PrintOk(message);
Expand Down
10 changes: 6 additions & 4 deletions OffensivePipeline/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ static void cleanTools()
Directory.CreateDirectory(Conf.outputPath);
}

public static void LaunchPipeline(string toolName=null)
public static void LaunchPipeline(string toolName=null, string toolArguments=null)
{
List<ToolConfig> lTools = new List<ToolConfig>();
if (toolName != null)
{
lTools = YmlHelpers.ReadYmls(toolName);
lTools = YmlHelpers.ReadYmls(toolName, toolArguments);
}
else
{
Expand Down Expand Up @@ -214,7 +214,7 @@ static void Main(string[] args)
- List all tools:
OffensivePipeline.exe list
- Load seatbelt tool:
OffensivePipeline.exe t seatbelt
OffensivePipeline.exe t seatbelt [-a/--args] [args]
- Load all tools:
OffensivePipeline.exe all
";
Expand Down Expand Up @@ -254,11 +254,13 @@ OffensivePipeline.exe all
command.Description = "Load the specified tool";
command.HelpOption("-?|-h|--help");
var toolArgument = command.Argument("[tool]", "Tool to build.");
var toolArguments = command.Option("-a|--args", "Command-line arguments to pass to the Donut shellcode, will override the yaml value", CommandOptionType.SingleValue);

command.OnExecute(() =>
{
if (toolArgument.Value != null)
{
LaunchPipeline(toolArgument.Value);
LaunchPipeline(toolArgument.Value, toolArguments.Value());
}
Console.WriteLine();
return 0;
Expand Down
4 changes: 3 additions & 1 deletion OffensivePipeline/ToolConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace OffensivePipeline
{
public class ToolConfig
{
public ToolConfig(string name, string description, string gitLink, string solutionPath, string language, string plugins, string authUser, string authToken)
public ToolConfig(string name, string description, string gitLink, string solutionPath, string language, string plugins, string authUser, string authToken, string toolArguments)
{
this.name = name;
this.description = description;
Expand All @@ -18,6 +18,7 @@ public ToolConfig(string name, string description, string gitLink, string soluti
this.plugins = plugins.Split(',').Select(s => s.Trim()).ToList<string>();
this.authUser = authUser;
this.authToken = authToken;
this.toolArguments = toolArguments;
}

public string name { get; set; }
Expand All @@ -28,5 +29,6 @@ public ToolConfig(string name, string description, string gitLink, string soluti
public List<string> plugins { get; set; }
public string authUser { get; set; }
public string authToken { get; set; }
public string toolArguments { get; set; }
}
}
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/ADCSPwn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/ADCollector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/ADFSDump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/ADSearch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/BetterSafetyKatz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/Certify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/DeployPrinterNightmare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/EDD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/ForgeCert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/Group3r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/KrbRelay.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/KrbRelayUp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/LockLess.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/PassTheCert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/PurpleSharp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
3 changes: 2 additions & 1 deletion OffensivePipeline/Tools/Rubeus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ tool:
language: c#
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SafetyKatz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SauronEye.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SearchOutlook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
3 changes: 2 additions & 1 deletion OffensivePipeline/Tools/Seatbelt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ tool:
language: c#
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharPersist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
3 changes: 2 additions & 1 deletion OffensivePipeline/Tools/Sharp-SMBExec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ tool:
language: c#
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpAppLocker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpBypassUAC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpCOM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpChisel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
3 changes: 2 additions & 1 deletion OffensivePipeline/Tools/SharpChromium.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ tool:
language: c#
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpCloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpCookieMonster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpCrashEventLog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
3 changes: 2 additions & 1 deletion OffensivePipeline/Tools/SharpDPAPI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ tool:
language: c#
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpDir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpDump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpEDRChecker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpExec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
3 changes: 2 additions & 1 deletion OffensivePipeline/Tools/SharpGPOAbuse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ tool:
language: c#
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpHandler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpHose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
3 changes: 2 additions & 1 deletion OffensivePipeline/Tools/SharpHound3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ tool:
language: c#
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpKatz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpLAPS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpMapExec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpMiniDump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
3 changes: 2 additions & 1 deletion OffensivePipeline/Tools/SharpMove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ tool:
language: c#
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpNamedPipePTH.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpNoPSExec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpPrinter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
3 changes: 2 additions & 1 deletion OffensivePipeline/Tools/SharpRDP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ tool:
language: c#
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpReg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpSCCM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpSQLPwn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpScribbles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpSearch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpSecDump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpShares.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpSniper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
1 change: 1 addition & 0 deletions OffensivePipeline/Tools/SharpSphere.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tool:
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
toolArguments:
3 changes: 2 additions & 1 deletion OffensivePipeline/Tools/SharpSpray.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ tool:
language: c#
plugins: RandomGuid, RandomAssemblyInfo, BuildCsharp, ConfuserEx, Donut
authUser:
authToken:
authToken:
toolArguments:
Loading

0 comments on commit 242165c

Please sign in to comment.