-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Thist is great and I'm glad you made a PowerShell port of this! You mentioned that you might like to merge this into PowerSploit and I would love to see it in there. Thanks for sharing this with me. I have a few suggestions though that I hope you'd consider.
I'm not a fan of custom, interactive shells in PowerShell because then they constrain you to you custom shell and prevent you from interacting with the other components of PowerShell. If I were to write this, I would implement this using individual commands. For example, I might have something like the following:
$Sess = New-WMIShellSession -ComputerName Server01 -UserName Foo\Administrator -Namespace root\evilnamespace
Invoke-WmiShellCommand -Session $Sess -ScriptBlock { Write-Host 'foo' } # Output would go to stdout
$Sess | Disconnect-WmiShellSession
Also, Since you're using the *WmiObject cmdlets, I'd bring along as many of their parameters as reasonable.
Other than that, I love the idea and I hope to see it included in PowerSploit!
Thanks!
-Matt