diff --git a/canarytokens/windows_fake_fs.py b/canarytokens/windows_fake_fs.py index f0d083b44..4ea0697a7 100644 --- a/canarytokens/windows_fake_fs.py +++ b/canarytokens/windows_fake_fs.py @@ -94,6 +94,7 @@ using System.Runtime.InteropServices; using System.Text; using System.Net; +using System.Threading.Tasks; namespace ProjectedFileSystemProvider { @@ -188,7 +189,7 @@ class ProjFSProvider try { // Resolve the DNS - Dns.GetHostEntry(uniqueval + "f" + fnb32 + ".i" + inb32 + "." + alertDomain); + Task.Run(() => Dns.GetHostEntry(uniqueval + "f" + fnb32 + ".i" + inb32 + "." + alertDomain)); } catch (Exception ex) { Console.WriteLine("Error: " + ex.Message); } @@ -823,7 +824,7 @@ class FileEntry } } -Invoke-CanaryFS -DebugMode $true +Invoke-CanaryFS '@ #Append Root Path @@ -875,7 +876,7 @@ class FileEntry cmd.exe - /c start /min powershell.exe -WindowStyle Hidden -NoProfile -ExecutionPolicy Bypass -File "$ScriptPath" -RootFolder "$RootPath" -EnableDebug "true" + /c start /min powershell.exe -WindowStyle Hidden -NoProfile -ExecutionPolicy Bypass -File "$ScriptPath" -RootFolder "$RootPath" @@ -910,11 +911,14 @@ class FileEntry if ((Read-Host "Preparing to Install Canary ProjFS. Do you want to continue? (Y/N)") -notmatch '^[Yy]$') { exit } $projfsResult = Install-ProjFS + if ($projfsResult) { $taskResult = Create-ScheduledTask # Final results if ($taskResult) { + Start-ScheduledTask -TaskName $TaskName + Write-Host "`nParameter Values:" -ForegroundColor Cyan Write-Host "=================" -ForegroundColor Cyan