All Projects → DarkCoderSc → PowerRunAsAttached

DarkCoderSc / PowerRunAsAttached

Licence: Apache-2.0 license
This script allows to spawn a new interactive console as another user account in the same calling console (console instance/window).

Programming Languages

powershell
5483 projects

Projects that are alternatives of or similar to PowerRunAsAttached

PSTodoist
A powershell module for todoist
Stars: ✭ 18 (-76.92%)
Mutual labels:  powershell-module
PSRemoteOperations
A PowerShell module to invoke commands remotely through an out-of-band mechanism.
Stars: ✭ 51 (-34.62%)
Mutual labels:  powershell-module
PowerVCF
PowerVCF: A PowerShell Module for VMware Cloud Foundation
Stars: ✭ 25 (-67.95%)
Mutual labels:  powershell-module
blog-secretmanagement-powershell-module
Blog about recently introduced SecretManagement PowerShell module, our practical usage and code.
Stars: ✭ 15 (-80.77%)
Mutual labels:  powershell-module
posh
Powershell modules and functions by majkinetor
Stars: ✭ 64 (-17.95%)
Mutual labels:  powershell-module
OutSystems.SetupTools
Powershell module to install and manage the OutSystems platform
Stars: ✭ 20 (-74.36%)
Mutual labels:  powershell-module
PSelect
PowerShell DSL for aggregating data
Stars: ✭ 27 (-65.38%)
Mutual labels:  powershell-module
ps-bash-completions
Bridge to enable bash completions to be run from within PowerShell.
Stars: ✭ 61 (-21.79%)
Mutual labels:  powershell-module
PSBicep
This is the repo for the Bicep PowerShell Module.
Stars: ✭ 67 (-14.1%)
Mutual labels:  powershell-module
Sorlov.PowerShell
This is the public version of Sorlov.PowerShell Self-Hosted Executable Extensions for Powershell
Stars: ✭ 22 (-71.79%)
Mutual labels:  powershell-module
ClipboardText
Universal clipboard text support for PowerShell, notably also in PowerShell Core (cross-platform) and Windows PowerShell v2-v4
Stars: ✭ 37 (-52.56%)
Mutual labels:  powershell-module
PSDocs
Generate documentation from Infrastructure as Code (IaC).
Stars: ✭ 75 (-3.85%)
Mutual labels:  powershell-module
PSRule.Rules.CAF
A suite of rules to validate Azure resources against the Cloud Adoption Framework (CAF) using PSRule.
Stars: ✭ 54 (-30.77%)
Mutual labels:  powershell-module
Qlik-Cli-Windows
Qlik-Cli for Windows
Stars: ✭ 85 (+8.97%)
Mutual labels:  powershell-module
PSPasswordExpiryNotifications
Following PowerShell Module provides different approach to scheduling password notifications for expiring Active Directory based accounts. While most of the scripts require knowledge on HTML... this one is just one config file and a bit of tingling around with texts. Whether this is good or bad it's up to you to decide. I do plan to add an optio…
Stars: ✭ 38 (-51.28%)
Mutual labels:  powershell-module
HTTP-Connectivity-Tester
Aids in discovering HTTP and HTTPS connectivity issues. #nsacyber
Stars: ✭ 79 (+1.28%)
Mutual labels:  powershell-module
Posh Git
A PowerShell environment for Git
Stars: ✭ 5,840 (+7387.18%)
Mutual labels:  powershell-module
LeSslCertToAzure
Powershell Module that creates a SSL/TLS Certificate with Let's Encrypt Service and apply to an Azure Application Gateway.
Stars: ✭ 14 (-82.05%)
Mutual labels:  powershell-module
HostsFileManagement
Hosts file management on Windows systems using PowerShell classes
Stars: ✭ 25 (-67.95%)
Mutual labels:  powershell-module
PowerFGT
PowerShell module to manage Fortinet (FortiGate) Firewall
Stars: ✭ 80 (+2.56%)
Mutual labels:  powershell-module

PowerRunAsAttached

PowerRunAsAttached is a ported version of RunAsAttachedLocal in Powershell with inline CSharp.

This script allows to spawn a new interactive console as another user account in the same calling console (console instance/window).

One possible example is that this tool gives you with ease the possibility to do vertical / horizontal privilege escalation through your already established Netcat / WinRM session.


Usage

You can use this PowerShell Application whether as a PowerShell Script or as a PowerShell Module.

Import a new PowerShell Module (Generic Explanation)

To be available, the module must first be present in a registered module path.

You can list module paths with following command:

Write-Output $env:PSModulePath

Example Output:

C:\Users\Phrozen\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules

Copy the module file <module_name>.psm1 to desired module path.

You can use bellow command to check if your module was successfully imported:

Get-Module -ListAvailable

Example Output:

PS C:\Users\Phrozen\Desktop> Get-Module -ListAvailable


    Directory: C:\Users\Phrozen\Documents\WindowsPowerShell\Modules


ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   <version>  <module_name>                       <available_exported_commands>

<..snip..>

If you don't see them, run the following commands and check back.

Import-Module <module_name>

Import-Module <module_name>

Import a new PowerShell Script (Generic Explanation)

It is not mandatory to install this application as a PowerShell module (Even if file extension is *.psm1)

You can also load it as a PowerShell Script. Multiple methods exists including:

Invoking Commands Using:

IEX (Get-Content .\<module_name>.psm1 -Raw)

Loading script from a remote location:

IEX (New-Object Net.WebClient).DownloadString('http://127.0.0.1/<module_name>.psm1')

Available Functions

Invoke-RunAsAttached

Invoke-RunAsAttached

Spawn a new Windows command-line interpreter (cmd.exe) as another user.

Parameters

Parameter Type Default Description
Username (*) String None An existing Microsoft Windows local user account
Password (*) String None Password of specified user account

* = Mandatory Options

Example
Invoke-RunAsAttached -Username "darkcodersc" -Password "testmepliz"

Example


Demo Video

https://www.youtube.com/watch?v=n71apwuPZYw


CSharp Version: SharpRunAsAttached

You will find an alternative version of this project in pure C# HERE

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].