Skip to content

Consider removing interactive shell component #2

Description

@mattifestation

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions