https://github.com/phrozenio/run-as-attached-networked
RunAsAttached is a program to run a console as another user and keep new console attached to caller console. Support reverse shell mode (Ex: Netcat)
https://github.com/phrozenio/run-as-attached-networked
delphi pascal penetration-testing remote-access runas runasadmin
Last synced: 3 months ago
JSON representation
RunAsAttached is a program to run a console as another user and keep new console attached to caller console. Support reverse shell mode (Ex: Netcat)
- Host: GitHub
- URL: https://github.com/phrozenio/run-as-attached-networked
- Owner: PhrozenIO
- Created: 2020-05-18T16:23:14.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-25T16:43:47.000Z (over 3 years ago)
- Last Synced: 2025-06-21T11:05:39.960Z (11 months ago)
- Topics: delphi, pascal, penetration-testing, remote-access, runas, runasadmin
- Language: Pascal
- Homepage:
- Size: 1.36 MB
- Stars: 76
- Watchers: 7
- Forks: 18
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Local version
You can find another variant of this program which doesn't requires Networking function and also compatible with any application like Netcat, Telnet etc... here : https://github.com/DarkCoderSc/run-as-attached-local
RunAsAttached (Local) version is more stable.
The goal of Networked version was to demonstrate inter-process communication using Socket programming.
# RunAsAttached (Networked) - 32bit / 64bit
RunAsAttached is a program to run a console as another user and keep new console attached to caller console. Support reverse shell mode (Ex: Netcat)
## Demo video (Click on bellow image)
[](https://www.youtube.com/watch?v=nT8ub6Q1R0c)
## Changelogs
### 18/05/2020
- First release
### 20/05/2020
- Major bug fixed when using Netcat / Telnet etc..
- Stability improved
## Description
Unlike on UNIX based systems, on Microsoft Windows you can't run command as another user without spawning a new process then a new console window.
This is quite annoying while doing Penetration Testing but not only!
This application is a "hack" to run a new console attached to callers console. This is one method to achieve that goal.
This method is using Client / Server architecture to communicate between two processes. By default it will create a local server (listening on localhost and random port above 50 000) but you can decided to connect back to another address/port (Ex: a Netcat listener)
## Notes
It is a beta release, it is working fine, but many things requires some optimization including:
* Networking: This is the first technique that comes to my mind for different reasons, I will dig more about a better way. The main issue encoutered is related to disconnection. If remote conection is unexpectly (dirty) closed, it may not know about that, this is mainly because of the way I designed how I handled both Stdout/Stderr and Networking. I have some good ideas to solve that issue. It is still considered as minor, could be annoying tho.
* Argument Parsing: I will enhance the clarity of that part.
## What you will learn
Even if you don't find useful this program, you may find some interesting piece of codes:
- Winsock2 Programming
- Global Mutex (Cross Users)
- Threading
- Windows API
- Pipes