2019-01-20 23:25:31 +00:00
|
|
|
<#
|
2018-07-23 08:55:15 +00:00
|
|
|
.Synopsis
|
|
|
|
Quick PortScan / EgressBuster
|
|
|
|
|
|
|
|
PortScan / EgressBuster 2017
|
|
|
|
Rob Maslen @rbmaslen
|
|
|
|
|
|
|
|
.DESCRIPTION
|
2019-01-20 23:25:31 +00:00
|
|
|
PS C:\> Usage: PortScan [-Hosts <Comma delimited list of domain names or IP addresses>] [-Ports <Ports>] [-Threads <Concurrent Thread>] [-Delay <Delay>] [-RevDNS] [-Closed] <Show Closed Ports> [-Live] <Live updates in the console, don't use in C2>
|
2018-07-23 08:55:15 +00:00
|
|
|
.EXAMPLE
|
2019-01-20 23:25:31 +00:00
|
|
|
PS C:\> PortScan -Hosts "127.0.0.1" -Ports 1-65535 -Threads 10000
|
2018-07-23 08:55:15 +00:00
|
|
|
.EXAMPLE
|
2019-01-20 23:25:31 +00:00
|
|
|
PS C:\> PortScan -Hosts "192.168.1.0/24" -Ports 1-65535 -Threads 10000
|
2018-07-23 08:55:15 +00:00
|
|
|
.EXAMPLE
|
2019-01-20 23:25:31 +00:00
|
|
|
PS C:\> PortScan -Hosts "192.168.1.1-50" -Ports "80,443,55" -Threads 10000 -RevDNS
|
2018-07-23 08:55:15 +00:00
|
|
|
.EXAMPLE
|
2019-01-20 23:25:31 +00:00
|
|
|
PS C:\> PortScan -Hosts "192.168.1.1-50" -Ports "80,443,55" -Threads 1 -Delay 1
|
|
|
|
.EXAMPLE
|
|
|
|
PS C:\> PortScan -Hosts "192.168.1.1-50" -Ports "80,443,55" -Threads 1 -Delay 1 -RevDNS
|
|
|
|
.EXAMPLE
|
|
|
|
PS C:\> PortScan -Hosts "host1.local,hos2.local,127.0.0.1" -Ports "80,443,55" -Threads 1 -Delay 1
|
|
|
|
.EXAMPLE
|
|
|
|
PS C:\> PortScan -Hosts "host1.local,hos2.local,127.0.0.1" -Ports "80,443,55" -Threads 1 -Delay 30
|
|
|
|
.EXAMPLE
|
|
|
|
PS C:\> PortScan -Hosts "host1.local,hos2.local,127.0.0.1" -Ports "80,443,55" -Threads 1 -Delay 1 -Closed
|
|
|
|
.EXAMPLE
|
|
|
|
PS C:\> PortScan -Hosts "host1.local,hos2.local,127.0.0.1" -Ports "80,443,55" -Threads 1 -Delay 30 -Closed -Live
|
2018-07-23 08:55:15 +00:00
|
|
|
#>
|
2019-01-20 23:25:31 +00:00
|
|
|
|
2018-07-23 08:55:15 +00:00
|
|
|
$pscanloaded = $null
|
|
|
|
function PortScan {
|
|
|
|
param(
|
2019-01-20 23:25:31 +00:00
|
|
|
[Parameter(Mandatory=$true)][string]$Hosts,
|
2018-07-23 08:55:15 +00:00
|
|
|
[Parameter(Mandatory=$false)][string]$Ports="1-1000",
|
2019-01-20 23:25:31 +00:00
|
|
|
[Parameter(Mandatory=$false)][string]$Threads=1000,
|
|
|
|
[Parameter(Mandatory=$false)][int]$Delay=0,
|
|
|
|
[switch]$RevDNS,
|
|
|
|
[switch]$Closed,
|
|
|
|
[switch]$Live
|
2018-07-23 08:55:15 +00:00
|
|
|
)
|
2019-01-20 23:25:31 +00:00
|
|
|
$ps = "H4sIAAAAAAAEAO19CXhcxZFwvTcz7705NW9mNCMbGcknY0sykk+ZU7Ik2wLbki35ig3yWBrLg0fz5JmRD3wgc5MA4Q4QIDaBJBBIuJJAYDd2Qg42yW74AknYgBeykJBsDthsEnZ/sP+q6n4zo8NAdpP/33+/XzD1qqq7q6urq6ur+43kFR+5ARwA4MTPiRMAT4L4aYIP/hnGT6DqqwF4wv39yU8qy78/uXtbKlc9mLX6s4mB6t5EJmPlq7ckq7NDmepUprq1o6t6wOpLzvb7PdOkjM42gOWKAy6Btk223FdhSrVXqQe4FAlN8I4fQlCNnyNMBhlXhd4AxSeAwnz6cUDTFVSV/i8+Cw/+eQjldoCQ+znHOIN8FcCHj/ynACo/hE0KP6ifUUIaSC8roWfnk7vzpPdBOa5LoaB3iYjNs7O5bC9I3Y6AGOjlI+s14f+zs8m01St0JZ1Z1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PAIPieMpwtNtcvKsSUXXskuInl5Tudry409p49U5rgTHR23q/VST1GBFaQs3r6sXIizYuypp6Ih6izg5C3LazrlMGrchPIsG5hS7CDHqhc3/yMGZI/njvvs8ejwzMnm0eTVlSsYd5lkkWPT6isx6T5Se/rJbM36YCUewE6SXnP+X0XWLrnMCwO0x/fAk2J8K9TcbrIFy6IsWoNZs3OXULy
|
2018-07-23 08:55:15 +00:00
|
|
|
|
2019-01-20 23:25:31 +00:00
|
|
|
$status = "[+] Loading Assembly v4"
|
2018-07-23 08:55:15 +00:00
|
|
|
|
2019-01-20 23:25:31 +00:00
|
|
|
if ($psversiontable.PSVersion.Major -lt 4)
|
|
|
|
{
|
|
|
|
$ps = $ps2
|
|
|
|
$status = "[+] Loading Assembly v2"
|
|
|
|
}
|
|
|
|
try
|
|
|
|
{
|
|
|
|
$Delay = $Delay *1000
|
|
|
|
if ($pscanloaded -ne "TRUE")
|
|
|
|
{
|
|
|
|
$script:pscanloaded = "TRUE"
|
|
|
|
echo $status
|
|
|
|
[System.IO.MemoryStream] $output = New-Object System.IO.MemoryStream(45000)
|
|
|
|
[System.IO.MemoryStream] $gzdll = New-Object System.IO.MemoryStream(,[System.Convert]::FromBase64String($ps))
|
|
|
|
$gzipStream = New-Object System.IO.Compression.GzipStream $gzdll, ([IO.Compression.CompressionMode]::Decompress)
|
2019-01-20 23:37:09 +00:00
|
|
|
try {
|
|
|
|
$buffer = New-Object byte[](32000);
|
|
|
|
while ($true)
|
|
|
|
{
|
|
|
|
$read = $gzipStream.Read($buffer, 0, 32000)
|
|
|
|
if ($read -le 0)
|
|
|
|
{
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
$output.Write($buffer, 0, $read)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
finally
|
|
|
|
{
|
|
|
|
Write-Verbose "Closing streams and newly decompressed file"
|
|
|
|
$gzipStream.Close();
|
|
|
|
$output.Close();
|
|
|
|
$gzdll.Close();
|
|
|
|
}
|
2019-01-20 23:25:31 +00:00
|
|
|
$assembly = [System.Reflection.Assembly]::Load($output.ToArray())
|
2018-10-01 12:32:24 +00:00
|
|
|
}
|
2019-01-20 23:25:31 +00:00
|
|
|
}
|
|
|
|
catch
|
|
|
|
{
|
|
|
|
echo $_.Exception.Message
|
|
|
|
}
|
2018-10-01 12:32:24 +00:00
|
|
|
|
2019-01-20 23:25:31 +00:00
|
|
|
try
|
|
|
|
{
|
|
|
|
[PortScanner_Dll.Scanner.TCPConnectScanner]::VisualResults = $Live
|
|
|
|
$scanner = [PortScanner_Dll.Scanner.TCPConnectScanner]::PerformTCPConnectScan("$Hosts","$Ports","$Delay","$Threads", $RevDNS, $Closed)
|
|
|
|
$scanner.Results
|
|
|
|
}
|
|
|
|
catch
|
|
|
|
{
|
|
|
|
echo $_.Exception.Message
|
2018-10-01 12:32:24 +00:00
|
|
|
}
|
2018-07-23 08:55:15 +00:00
|
|
|
}
|