-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
445 additions
and
29 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,44 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
|
||
namespace SharpHoundProcessors { | ||
public class ProcessorConfig { | ||
private static readonly Lazy<Random> RandomGen = new(); | ||
//Computer Availability Arguments | ||
public int PortScanTimeout { get; set;}= 10000; | ||
public int ComputerExpiryDays { get; set; } = 60; | ||
public bool SkipPortScan { get; set; } = false; | ||
public bool SkipComputerAgeCheck { get; set; } = false; | ||
public string DNSName { get; set; } = null; | ||
|
||
//Session Processor Arguments | ||
public bool UseAlternateLocalAdminCredentials { get; set; } = false; | ||
public string AlternateLocalAdminUsername { get; set; } = null; | ||
public string AlternateLocalAdminPassword { get; set; } = null; | ||
public string OverrideCurrentUserName { get; set; } = null; | ||
public bool SkipRegistryLoggedOn { get; set; } = false; | ||
|
||
//Ldap Property Processor | ||
public bool CollectAllProperties { get; set; } = false; | ||
|
||
//Throttle | ||
public int Throttle { get; set; } = 0; | ||
public int Jitter { get; set; } = 0; | ||
|
||
public async Task Delay() | ||
{ | ||
if (Throttle == 0) | ||
return; | ||
|
||
if (Jitter == 0) | ||
{ | ||
await Task.Delay(Throttle); | ||
return; | ||
} | ||
|
||
var percent = (int)Math.Floor((double)(Jitter * (Throttle / 100))); | ||
var delay = Throttle + RandomGen.Value.Next(-percent, percent); | ||
await Task.Delay(delay); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
namespace SharpHoundCommonLib.Enums; | ||
|
||
public static class OutputNames { | ||
public static string Domain = "domain"; | ||
public static string Name = "name"; | ||
public static string DistinguishedName = "distinguishedname"; | ||
public static string DomainSID = "domainsid"; | ||
public const string Domain = "domain"; | ||
public const string Name = "name"; | ||
public const string DistinguishedName = "distinguishedname"; | ||
public const string DomainSID = "domainsid"; | ||
public const string SAMAccountName = "samaccountname"; | ||
public const string IsACLProtected = "isaclprotected"; | ||
public const string MSA = "msa"; | ||
public const string GMSA = "gmsa"; | ||
public const string HasLAPS = "haslaps"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters