Skip to content

Commit

Permalink
interval fix, DNS AAAA
Browse files Browse the repository at this point in the history
Fixed bug with intervals
Enabled AAAA types in DNS
  • Loading branch information
Kevin-Robertson committed Oct 6, 2022
1 parent 5116878 commit 28ffe89
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Inveigh/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class Program
public static string netbiosDomain = Environment.UserDomainName;
public static string dnsDomain = "";
public static ulong smb2Session = 5548434740922023936; // todo check
public static string version = "2.0.8";
public static string version = "2.0.9";

static void Main(string[] arguments)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void Start(IPAddress ipAddress, string replyIP, string replyIPv6, int run
{
Thread.Sleep(10);

if (!isRunning || stopwatchRunTime.IsRunning && stopwatchRunTime.Elapsed.Minutes >= runTime)
if (!isRunning || stopwatchRunTime.IsRunning && stopwatchRunTime.Elapsed.TotalMinutes >= runTime)
{
isRunning = false;
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public void Start(IPAddress ipAddress, string replyIP, string replyIPv6, int run
{
Thread.Sleep(10);

if (!isRunning || stopwatchRunTime.IsRunning && stopwatchRunTime.Elapsed.Minutes >= runTime)
if (!isRunning || stopwatchRunTime.IsRunning && stopwatchRunTime.Elapsed.TotalMinutes >= runTime)
{
isRunning = false;
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void Start(IPAddress ipAddress, string replyIP, int runTime)
{
Thread.Sleep(10);

if (!isRunning || stopwatchRunTime.IsRunning && stopwatchRunTime.Elapsed.Minutes >= runTime)
if (!isRunning || stopwatchRunTime.IsRunning && stopwatchRunTime.Elapsed.TotalMinutes >= runTime)
{
break;
}
Expand Down
4 changes: 2 additions & 2 deletions Inveigh/Sockets/ICMPv6Socket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ internal void Start()
if (Program.icmpv6Interval > 0)
{

while (Program.isRunning && stopwatchInterval.Elapsed.Seconds <= Program.icmpv6Interval)
while (Program.isRunning && stopwatchInterval.Elapsed.TotalSeconds <= Program.icmpv6Interval)
{
Thread.Sleep(10);
}
Expand All @@ -106,7 +106,7 @@ internal void Start()
{
break;
}

}

}
Expand Down
2 changes: 1 addition & 1 deletion Inveigh/Support/Arguments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public static bool ValidateArguments()
string[] authArguments = { nameof(Program.argHTTPAuth), nameof(Program.argProxyAuth), nameof(Program.argWPADAuth), nameof(Program.argWebDAVAuth) };
string[] authArgumentValues = { Program.argHTTPAuth, Program.argProxyAuth, Program.argWPADAuth, Program.argWebDAVAuth };
allValid &= Utilities.ValidateStringArguments(authArguments, authArgumentValues, new string[] { "ANONYMOUS", "BASIC", "NTLM" });
allValid &= Utilities.ValidateStringArrayArguments(nameof(Program.argDNSTypes), Program.argDNSTypes, new string[] { "A", "SOA", "SRV" });
allValid &= Utilities.ValidateStringArrayArguments(nameof(Program.argDNSTypes), Program.argDNSTypes, new string[] { "A", "AAAA", "SOA", "SRV" });
allValid &= Utilities.ValidateStringArrayArguments(nameof(Program.argDNSSRV), Program.argDNSSRV, new string[] { "LDAP", "KERBEROS", "KPASSWORD", "GC" });
allValid &= Utilities.ValidateStringArrayArguments(nameof(Program.argNBNSTypes), Program.argNBNSTypes, new string[] { "00", "03", "20", "1B", "1C", "1D", "1E" });
allValid &= Utilities.ValidateStringArrayArguments(nameof(Program.argMDNSQuestions), Program.argMDNSQuestions, new string[] { "QM", "QU" });
Expand Down
4 changes: 2 additions & 2 deletions Inveigh/Support/Control.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static void ControlLoop(string consoleLevel, int consoleQueueLimit, int c
isPromptRefresh = false;
}

if (consoleStatus > 0 && Program.enabledConsoleOutput && stopwatchConsoleStatus.Elapsed.Minutes >= consoleStatus)
if (consoleStatus > 0 && Program.enabledConsoleOutput && stopwatchConsoleStatus.Elapsed.TotalMinutes >= consoleStatus)
{
Shell.GetCleartextUnique("");
Shell.GetNTLMv1Unique("");
Expand All @@ -90,7 +90,7 @@ public static void ControlLoop(string consoleLevel, int consoleQueueLimit, int c
stopwatchConsoleStatus.Start();
}

if (runTime > 0 && Program.enabledConsoleOutput && stopwatchRunTime.Elapsed.Minutes >= runTime)
if (runTime > 0 && Program.enabledConsoleOutput && stopwatchRunTime.Elapsed.TotalMinutes >= runTime)
{
Output.Queue(String.Format("[*] {0} Inveigh is exiting due to reaching run time", Output.Timestamp()));
StopInveigh();
Expand Down
3 changes: 2 additions & 1 deletion Inveigh/Support/Output.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ public static void GetHelp(string arg)
if (nullarg || string.Equals(arg, "DNSTYPES"))
{
string argument = "DNSTYPES";
string description = "Default=A: (A, SOA, SRV) Comma separated list of DNS types to spoof.";
string description = "Default=A: (A, AAAA, SOA, SRV) Comma separated list of DNS types to spoof.";
OutputHelp(argument, description);
}

Expand Down Expand Up @@ -1400,6 +1400,7 @@ public static void ProcessOutput()

while (Program.outputList.Count > 0)
{

if (Program.console == 5)
{
Program.consoleList.Add(Program.outputList[0]);
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Spoofers:
-DNSTTL Default=30: DNS TTL in seconds.
-DNSTYPES Default=A: (A, SOA, SRV) Comma separated list of DNS types to spoof.
-DNSTYPES Default=A: (A, AAAA, SOA, SRV) Comma separated list of DNS types to spoof.
-ICMPv6 Default=Enabled: (Y/N) sending ICMPv6 router advertisements.
Expand Down

0 comments on commit 28ffe89

Please sign in to comment.