From 28ffe8936f6321e626d6f9a25465fbcca59d7feb Mon Sep 17 00:00:00 2001 From: kevin Date: Wed, 5 Oct 2022 20:58:43 -0400 Subject: [PATCH] interval fix, DNS AAAA Fixed bug with intervals Enabled AAAA types in DNS --- Inveigh/Program.cs | 2 +- .../Protocols/Quiddity/Quiddity/Listeners/LLMNRListener.cs | 2 +- Inveigh/Protocols/Quiddity/Quiddity/Listeners/MDNSListener.cs | 2 +- .../Quiddity/Quiddity/Listeners/NetBIOSNSListener.cs | 2 +- Inveigh/Sockets/ICMPv6Socket.cs | 4 ++-- Inveigh/Support/Arguments.cs | 2 +- Inveigh/Support/Control.cs | 4 ++-- Inveigh/Support/Output.cs | 3 ++- README.md | 2 +- 9 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Inveigh/Program.cs b/Inveigh/Program.cs index ebb3a78..57c16c4 100644 --- a/Inveigh/Program.cs +++ b/Inveigh/Program.cs @@ -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) { diff --git a/Inveigh/Protocols/Quiddity/Quiddity/Listeners/LLMNRListener.cs b/Inveigh/Protocols/Quiddity/Quiddity/Listeners/LLMNRListener.cs index 8ede4fa..d490197 100644 --- a/Inveigh/Protocols/Quiddity/Quiddity/Listeners/LLMNRListener.cs +++ b/Inveigh/Protocols/Quiddity/Quiddity/Listeners/LLMNRListener.cs @@ -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; diff --git a/Inveigh/Protocols/Quiddity/Quiddity/Listeners/MDNSListener.cs b/Inveigh/Protocols/Quiddity/Quiddity/Listeners/MDNSListener.cs index 45c7abb..6e5832f 100644 --- a/Inveigh/Protocols/Quiddity/Quiddity/Listeners/MDNSListener.cs +++ b/Inveigh/Protocols/Quiddity/Quiddity/Listeners/MDNSListener.cs @@ -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; diff --git a/Inveigh/Protocols/Quiddity/Quiddity/Listeners/NetBIOSNSListener.cs b/Inveigh/Protocols/Quiddity/Quiddity/Listeners/NetBIOSNSListener.cs index a5627e9..82e5590 100644 --- a/Inveigh/Protocols/Quiddity/Quiddity/Listeners/NetBIOSNSListener.cs +++ b/Inveigh/Protocols/Quiddity/Quiddity/Listeners/NetBIOSNSListener.cs @@ -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; } diff --git a/Inveigh/Sockets/ICMPv6Socket.cs b/Inveigh/Sockets/ICMPv6Socket.cs index 87f895a..4bc2d7e 100644 --- a/Inveigh/Sockets/ICMPv6Socket.cs +++ b/Inveigh/Sockets/ICMPv6Socket.cs @@ -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); } @@ -106,7 +106,7 @@ internal void Start() { break; } - + } } diff --git a/Inveigh/Support/Arguments.cs b/Inveigh/Support/Arguments.cs index 4c87530..e987b42 100644 --- a/Inveigh/Support/Arguments.cs +++ b/Inveigh/Support/Arguments.cs @@ -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" }); diff --git a/Inveigh/Support/Control.cs b/Inveigh/Support/Control.cs index b635763..14cf653 100644 --- a/Inveigh/Support/Control.cs +++ b/Inveigh/Support/Control.cs @@ -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(""); @@ -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(); diff --git a/Inveigh/Support/Output.cs b/Inveigh/Support/Output.cs index 3d86a1a..2bd8d27 100644 --- a/Inveigh/Support/Output.cs +++ b/Inveigh/Support/Output.cs @@ -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); } @@ -1400,6 +1400,7 @@ public static void ProcessOutput() while (Program.outputList.Count > 0) { + if (Program.console == 5) { Program.consoleList.Add(Program.outputList[0]); diff --git a/README.md b/README.md index 94f4bc7..a2982af 100644 --- a/README.md +++ b/README.md @@ -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.