diff --git a/atomics/Indexes/index.yaml b/atomics/Indexes/index.yaml index 465802e1..084b625d 100644 --- a/atomics/Indexes/index.yaml +++ b/atomics/Indexes/index.yaml @@ -100010,10 +100010,10 @@ discovery: ' get_prereq_command: | - New-Item -Type Directory (split-path #{port_file}) -ErrorAction ignore | Out-Null + New-Item -Type Directory (split-path "#{port_file}") -ErrorAction ignore | Out-Null Invoke-WebRequest "#{portfile_url}" -OutFile "#{port_file}" executor: - command: "$ports = Get-content #{port_file}\n$file = \"#{output_file}\"\n$totalopen + command: "$ports = Get-content \"#{port_file}\"\n$file = \"#{output_file}\"\n$totalopen = 0\n$totalports = 0\nNew-Item $file -Force\nforeach ($port in $ports) {\n \ $test = new-object system.Net.Sockets.TcpClient\n $wait = $test.beginConnect(\"allports.exposed\", $port, $null, $null)\n $wait.asyncwaithandle.waitone(250, $false) | Out-Null\n diff --git a/atomics/Indexes/windows-index.yaml b/atomics/Indexes/windows-index.yaml index f9272631..2bee4f86 100644 --- a/atomics/Indexes/windows-index.yaml +++ b/atomics/Indexes/windows-index.yaml @@ -85532,10 +85532,10 @@ discovery: ' get_prereq_command: | - New-Item -Type Directory (split-path #{port_file}) -ErrorAction ignore | Out-Null + New-Item -Type Directory (split-path "#{port_file}") -ErrorAction ignore | Out-Null Invoke-WebRequest "#{portfile_url}" -OutFile "#{port_file}" executor: - command: "$ports = Get-content #{port_file}\n$file = \"#{output_file}\"\n$totalopen + command: "$ports = Get-content \"#{port_file}\"\n$file = \"#{output_file}\"\n$totalopen = 0\n$totalports = 0\nNew-Item $file -Force\nforeach ($port in $ports) {\n \ $test = new-object system.Net.Sockets.TcpClient\n $wait = $test.beginConnect(\"allports.exposed\", $port, $null, $null)\n $wait.asyncwaithandle.waitone(250, $false) | Out-Null\n diff --git a/atomics/T1016/T1016.md b/atomics/T1016/T1016.md index 3991e21b..0382f94b 100644 --- a/atomics/T1016/T1016.md +++ b/atomics/T1016/T1016.md @@ -198,7 +198,7 @@ Upon successful execution, powershell will read top-128.txt (ports) and contact ```powershell -$ports = Get-content #{port_file} +$ports = Get-content "#{port_file}" $file = "#{output_file}" $totalopen = 0 $totalports = 0 @@ -241,7 +241,7 @@ if (Test-Path "#{port_file}") {exit 0} else {exit 1} ``` ##### Get Prereq Commands: ```powershell -New-Item -Type Directory (split-path #{port_file}) -ErrorAction ignore | Out-Null +New-Item -Type Directory (split-path "#{port_file}") -ErrorAction ignore | Out-Null Invoke-WebRequest "#{portfile_url}" -OutFile "#{port_file}" ```