uac | Live Response collection script for Incident Response | Cybersecurity library

 by   tclahr Shell Version: v2.6.0 License: Apache-2.0

kandi X-RAY | uac Summary

kandi X-RAY | uac Summary

uac is a Shell library typically used in Security, Cybersecurity applications. uac has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

UAC is a Live Response collection tool for Incident Response that makes use of native binaries to automate the collection of Unix-like systems artifacts. It was created to facilitate and speed up data collection, and depend less on remote support during incident response engagements. UAC reads artifacts files on the fly and, based on their contents, collects relevant artifacts. This makes UAC very customizable and extensible.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              uac has a low active ecosystem.
              It has 420 star(s) with 64 fork(s). There are 21 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 4 open issues and 25 have been closed. On average issues are closed in 31 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of uac is v2.6.0

            kandi-Quality Quality

              uac has no bugs reported.

            kandi-Security Security

              uac has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              uac is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              uac releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of uac
            Get all kandi verified functions for this library.

            uac Key Features

            No Key Features are available at this moment for uac.

            uac Examples and Code Snippets

            No Code Snippets are available at this moment for uac.

            Community Discussions

            QUESTION

            How can I determine what what is in the Win10 UAC prompt in Python?
            Asked 2021-May-12 at 18:58

            Here's was appears to be an odd question at least from what I've been able to turn up in Google. I'm not trying to determine IF there's a UAC prompt (I've got a couple of reliably ways to do that, win32gui,GetForegroundWindow() returns a 0, or win32gui.screenshot returns exception OSError at least in my case)

            I'm also not looking to BYPASS the UAC, at least from python, I have an update process that's kicking off automatically that I need to get through the UAC. I don't have control of the update process so I don't think it's a good candidate for disabling the UAC with Python. I could just disable the UAC in Win10, but I'd prefer not to if possible. I do have a couple of methods for bypassing the UAC, in one instance where I'm running this in vitualbox I believe I can use VBoxManage guestcontrol to sent keystrokes to the guest system, for a stand alone system I have a microcontroller connected as a USB HID Keyboard, with a basic deadman switch (using the scroll lock to pass data between the python and the microcontroller acting as the HID keyboard) if it doesn't get the signal it sends left arrow enter to bypass the UAC.

            What I'm trying to do, and getting stymied with, is verifying that the UAC popup is actually from the update process that I want to accept the UAC prompt for, and not some other random, possibly nefarious application trying to elevate privileges. I can use the tasklist to verify the UAC is up, but I'm not seeing any way to see WHAT caused the UAC prompt. The update process is kicked off from an application that's always running, so I can't check to see if the process itself it running, because it's running under normal operation, I just want to accept the UAC when it's attempting to elevate privileges to update. I've been using a combination of using win32gui.GetWindowText and win32gui.EnumWindows to look for specific window titles, and for differentiating between windows with the same title, taking a screenshot and using OpenCV to match different object that appear in the windows. Both of those methods fail though when UAC is up, which is why I can use them to detect UAC as I mentioned before.

            I suppose I could use a USB camera to take a screenshot of the system, but I'd like to be able to run this headless.

            Anybody have an idea on a way to accomplish this, as the tree said to the lumberjack, I'm stumped.

            ...

            ANSWER

            Answered 2021-May-12 at 18:58

            If you run a process as administrator, no user account control prompt will appear. You could manually run your process as administrator. You need system privileges to interact with a user account control prompt.

            Source https://stackoverflow.com/questions/67415047

            QUESTION

            Cannot create a windows service with SC.exe using WPF App after its installation C#
            Asked 2021-May-11 at 15:23

            I created a WPF Desktop Application as well as a Worker Service (all .NET 6.0 Preview 3), packed them in a .MSI Setup File using Microsoft Visual Studio Installer Projects extension, which installs the WPF Application on the machine.

            While the application installs and functions correctly, I had to somehow implement the service installation which should run after the WPF Application would be installed. I created a function for that, which runs sc.exe as administrator and installs the service using Process.Start(), which looks like this:

            ...

            ANSWER

            Answered 2021-May-11 at 15:23

            As I further proceeded to analyze all the possible factors, I finally noticed what was causing the issue in this case.

            Generally, the paths generated by Visual Studio don't have any spaces, and because of that they can be written as a command argument without double quotes. In my case, the paths which contained the Project files also didn't have any spaces, which caused the commands without double quotes to be executed normally. The installation path, however, did contain spaces, as it's designed to be more user-friendly, which caused this piece of code to not execute as intended:

            Source https://stackoverflow.com/questions/67486469

            QUESTION

            Function converting mRNA to peptide sequence depending on the reading frame does not work correctly
            Asked 2021-May-08 at 17:11

            I am trying to write a fuction that translates an mRNA sequence to a peptide sequence depending on the nucleotide from which we start counting codons (either the first nucleotide, the second or the third). I have a code for it, but when I print the three results (of the three peptides) I only get a sequence for the first peptide. The last two are blank. Any idea what the problem might be? And how could I return all three peptides by default?

            ...

            ANSWER

            Answered 2021-May-08 at 17:11

            It always return after first if check. It should be:

            Source https://stackoverflow.com/questions/67450015

            QUESTION

            How to elevate account on start / install with standard user?
            Asked 2021-May-07 at 19:37

            Is it possible to enable /disable touchscreen trough hid (Human Interface Devices in "Control Panel\All Control Panel Items\Device Manager") with standard user right (without elevated-privileges / admin access-rights) ?
            I'm programing an application in C#. If I don't start my application trough "run as" on Visual Studio, security is blocking access.

            What are my alternatives with my current setup / limitation:

            • Standard user (basic right)
            • Admin account with password in a secure encrypted file.
            • The standard user cannot grant permission trough UAC because he don't have right.
            • Using this code to check if user have elevated/admin right: return new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator);

            Currently tested and not working:
            1. Process with startInfo.Verb = "runas"; Standard user can't accept UAC to run a process that require admin privilege / elevated. Elevating process privilege programmatically?

            2. App.manifest: Standard user can't accept UAC to run an app that require admin privilege / elevated. How do I force my .NET application to run as administrator?

            Potential alternatives ?

            1. ACL ???
            2. App.manifest: with an install.msi from my "IT team packager with Zenwork or SCCM" to deploy it on computers user ?
            3. Service that run as "local service" or "system" and an app to call methods of service with an install.msi from my "IT team packager with Zenwork or SCCM" to deploy it on computers user ?
            ...

            ANSWER

            Answered 2021-May-06 at 17:31

            If you don't want to prompt the UAC in the moment of the administrative operation (using runas), or on every program start (via manifest), you need to create a Service or a Scheduled Task once, at first program setup. A lot of programs use this technique such as Chrome for updates, which normally don't require elevated privileges but for few occasional operations.

            Choosing the service method means that you must implement an IPC mechanism for example via named pipe so the low privilege program can talk to the service and ask to execute the desired operation. Keep in mind that the service will always run in background and you shouldn't expose too much permissive operations otherwise other malicious programs could use your service to elevate themselves, or you'll need also an authentication method.

            For the scheduled task you could use the same executable with a command line argument like /disabletouch. You only need to manually trigger the task from the low privilege instance. There are the TaskScheduler COM interface (some open-source wrappers exists around it) and the schtasks tool that allow task creation and manual triggers. The task can be created for running as Administrator or SYSTEM account. As for the service allow only strict and harmless elevated operations to prevent misuse.

            Source https://stackoverflow.com/questions/66945543

            QUESTION

            PE injection fails if injector gets launched by specific application?
            Asked 2021-Apr-18 at 12:46

            Short disclaimer: As this question includes topics regarding hacking/pentesting, I'd like to state that this question is only asked for educational purposes as part of a school project. To prevent possible abuse, I will only post code that is necessary for understanding the problem.

            To demonstrate dangers and vulnerabilities of Windows 10, I'm currently writing a small C++/WinAPI application that utilizes two common techniques:

            • A UAC bypass using the "fodhelper technique" (this works by simply setting a specific registry value to the path of the executable which is supposed to be elevated and then launching an automatically elevated Windows executable called "fodhelper.exe", which will then read the registry value and execute it as command/launch the specified application).
            • Performing PE injection, i.e. running a PE file from the address space of the current process (based on this example from github). The PE that gets injected in my program is a simple C++ Console Application (x86) that prints a message box. The shellcode is hardcoded in the injector binary (x86).

            I managed to perform both of these techniques successfully in independent files. However, once I combine these two methods (i.e. first elevating, then injecting), a weird error appears.

            Description of the problem

            When the injector gets started manually (by double clicking), everything works fine, but when the injector is launched by System32\fodhelper.exe (x64) as a result of the UAC bypass, the following happens: After the injection has finished, the console window of the injected application appears, but instead of continuing the execution, I receive a bunch of error messages stating "The code execution cannot proceed because [garbage characters].dll was not found". This indicates that something went wrong with the offsets, and the Windows loader is trying to read the imports at a wrong position.

            To summarize: The code injection works fine, unless the injector was started by fodhelper.exe. In this case the injected PE file is unable to run.

            Things I have tried so far to find the origin of the issue
            • Debugging the injection using GetLastError and printing the various memory addresses used during the injection. There is no difference if the file is manually started (and the injection is successful) or if it gets started by fodhelper.exe (and the injection fails).
            • Replace the WriteProcessMemory calls with WriteFile to compare the output file when the injector gets manually launched or by fodhelper.exe. Both output files are exactly the same and runnable. This indicates that the injection itself is not the problem, but the Windows loader seems to act differently.
            • Manually elevating the injector using UAC or by using an elevated command prompt. In both cases, the injection is successful.
            • Copying fodhelper.exe to another location (for example to the desktop) and launching this copy. In this case, the injection is successful. The injection only fails if the injector gets started by the original fodhelper.exe in the System32 folder.

            It seems that the injection behaves completely identical, but the indicators show that due to some unknown impact of fodhelper.exe that gets passed down to the injector, the Windows loader seems to behave differently.

            I appreciate any explanation or assumption! Feel free to ask if you require more information.

            Minimal reproducible example

            (with limited debug info and comments): https://0bin.net/paste/UPRIg12n#6nJvBok72UcDvIa56c-XEss7AibIh1Zrs+c3sUzvQMj

            Note: See how the injection works if you exclude the elevateProcess function or manually elevate the exe with UAC, and how it fails when including said function.

            Edit

            According to the answer by user RbMm, this error is a result of a specific exploit protection attribute (PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY with the EnableModuleTamperingProtection value) that gets automatically applied onto fodhelper.exe and seemingly gets inherited by all child processes. According to this, removing/resetting this attribute when launching the target process should fix the error. So far I've tried the following, but couldn't achieve any change in the outcome:

            ...

            ANSWER

            Answered 2021-Apr-18 at 02:07

            when process created via RunAs with elevation - the appinfo.dll call RAiLaunchAdminProcess function (this is in some svchost.exe) and this function, pass STARTUPINFOEX (and EXTENDED_STARTUPINFO_PRESENT flag) to CreateProcessAsUser. and here - lpAttributeList, in particular PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY attribute key is used for set several exploit mitigation policy for the child process (fodhelper.exe in your case). and here EnableModuleTamperingProtection is set for child process tree. effect of this - when system resolve import descriptor, it check (inside LdrpGetImportDescriptorForSnap) for this mitigation flag, and if it enabled - call LdrpCheckPagesForTampering api, it return true, if SharedOriginal is 0, this means this is a copy-on-write private copy of the EXE/IAT -- hence 'tampered' with. after this LdrpMapCleanModuleView is called. at this point your try begin breaking

            possible first public info about this, from Alex Ionescu -

            LdrpCheckPagesForTampering/LdrpMapCleanModuleView (RS3) are pretty cool antihollowing mitigations (EPROCESS.EnableModuleTamperingProtection)

            if you by self launch new process, you of course not call UpdateProcThreadAttribute for set PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY and in this case, your code sometime work. really only random and sometime - here exist many other errors and bad codding

            Source https://stackoverflow.com/questions/67141766

            QUESTION

            QProcess how to request windows UAC to bypass password using runAs for admin level commands from an admin account
            Asked 2021-Apr-08 at 00:58

            Question: Can anyone explain to me how to call UAC? At this point, I need to elevate a Powershell session. All of the other methods I've used in the past or see here require a password. I need to bypass the password. Please see the write up under the following function for more information:

            ...

            ANSWER

            Answered 2021-Apr-06 at 22:17

            The way I read your question you wish to avoid the UAC prompt entirely. This is not possible so long as you run the program from a interactive login session with UAC enabled on the system.

            It is possible to avoid the need to enter the Administrator password by logging in to that account but you will still need a UAC prompt in order to run with the elevated Administrator token rather than the limited token that most programs use.

            Note that if your program is a service then the program will run in a session that does not provide for the split user token and instead all programs will run with the complete token (although most privileges will still be disabled until/unless a process enables them).

            Source https://stackoverflow.com/questions/66976865

            QUESTION

            Struggling to find the number of distinct amino acids
            Asked 2021-Mar-24 at 18:27
            def amino_acids(mrna):
                aa_dict = {'CUU': 'Leu', 'UAG': '---', 'ACA': 'Thr', 'AAA': 'Lys', 'AUC': 'Ile',
             'AAC': 'Asn','AUA': 'Ile', 'AGG': 'Arg', 'CCU': 'Pro', 'ACU': 'Thr',
             'AGC': 'Ser','AAG': 'Lys', 'AGA': 'Arg', 'CAU': 'His', 'AAU': 'Asn',
             'AUU': 'Ile','CUG': 'Leu', 'CUA': 'Leu', 'CUC': 'Leu', 'CAC': 'His',
             'UGG': 'Trp','CAA': 'Gln', 'AGU': 'Ser', 'CCA': 'Pro', 'CCG': 'Pro',
             'CCC': 'Pro', 'UAU': 'Tyr', 'GGU': 'Gly', 'UGU': 'Cys', 'CGA': 'Arg',
             'CAG': 'Gln', 'UCU': 'Ser', 'GAU': 'Asp', 'CGG': 'Arg', 'UUU': 'Phe',
             'UGC': 'Cys', 'GGG': 'Gly', 'UGA':'---', 'GGA': 'Gly', 'UAA': '---',
             'ACG': 'Thr', 'UAC': 'Tyr', 'UUC': 'Phe', 'UCG': 'Ser', 'UUA': 'Leu',
             'UUG': 'Leu', 'UCC': 'Ser', 'ACC': 'Thr', 'UCA': 'Ser', 'GCA': 'Ala',
             'GUA': 'Val', 'GCC': 'Ala', 'GUC': 'Val', 'GGC':'Gly', 'GCG': 'Ala',
             'GUG': 'Val', 'GAG': 'Glu', 'GUU': 'Val', 'GCU': 'Ala', 'GAC': 'Asp',
             'CGU': 'Arg', 'GAA': 'Glu', 'AUG': 'Met', 'CGC': 'Arg'}
                
                mrna_list = [aa_dict[mrna[i:i + 3]] for i in range(0, len(mrna) - 1, 3)]
                count = 0
                while True:
                    if mrna_list[count] == '---':
                        
                        mrna_list = mrna_list[:count]
                        break
                    else:
                        count += 1
                conversion_result = tuple(mrna_list)
                return [conversion_result, count]
            
            ...

            ANSWER

            Answered 2021-Mar-24 at 18:27

            To get only the unique elements of a list, you can usually just convert it to a set and back (at least, when it only contains simple things like strings or numbers). You can then find the number of unique elements by taking the length of that set:

            Source https://stackoverflow.com/questions/66786981

            QUESTION

            Running python program with admin priviledges without the UAC prompt
            Asked 2021-Mar-21 at 01:33

            I am making a python app and compiled it using pyinstaller. There is no problem when the user installs the app only for himself/herself , but when he/she installs for all users, it gives a permission denied error.

            It's basically a chatbot I made for a project. When the program is run the first time, it takes some basic data from the user and stores in a file. There's no problem when the program is installed for that user only,i.e., the program in stored in the user's appdata folder.

            But when the user tries to install it for all users, i.e., the program is stored in the program files(x86) folder, it gives a permission error as the folder is system protected.

            I tried to bypass it by adding the --uac-admin flag, but it is not convenient to go through the UAC prompt every time the user wants to run the program.

            I wanted to know if there was a way to run the program as admin without the UAC prompt.

            Any help would be highly appreciated!

            ...

            ANSWER

            Answered 2021-Mar-21 at 01:33
            • you want all users to be able to modify your application in it's Program Files (x86) folder
            • so have your installation program change the permissions on your folder
            • so that Everyone has Full Control to the folder

            If you've decided that anyone should be able to modify your chat program at any time without having to be an administrator: then give them permission.

            Here's some pseudocode that will grant Full Control to all users.

            Source https://stackoverflow.com/questions/66253255

            QUESTION

            Azure devops interactive agent as admin
            Asked 2021-Mar-16 at 14:53

            I have a Windows 10 Enterprise VM running an Azure Devops Agent in Interactive mode. The agent runs using the only user the machine has, and it is an Administrator with UAC disabled. However, when executing tasks that require an elevated command prompt, as registering dlls, the command fails with the following error message:

            ...

            ANSWER

            Answered 2021-Jan-29 at 02:56

            In the Azure DevOps, If you want to access local file in the azure devops pipeline via self-hosted agent, It accesses the file via service account instead of Personal account.

            Workaround

            We could open check the file permission and configure the service account permission. service account format User/Administrator/Administrators({Agent.ComputerName}\User/Administrator/Administrators)

            Also, we could change the agent service account to your owner account.

            Steps: Open service on the agent machine and search the agent service account, check the pic below, just change the account name and password to yours, then It will use this account to perform the operation.

            Source https://stackoverflow.com/questions/65930479

            QUESTION

            WinAPI: How do you get the "Verified Publisher" the UAC shows for signed binaries?
            Asked 2021-Mar-12 at 01:52

            I need to verify an .exe and ensure the publisher name matches the expected name (not based on a key since that can change as new code signing certificates are issued, the name is always the same).

            I found samples of using WinVerifyTrust to verify a signed .exe, but I also need the "Verified Publisher" that the UAC shows for signed executables. How do I get that using the Windows API functions in c or c++ ?

            TIA!!

            ...

            ANSWER

            Answered 2021-Mar-12 at 01:52

            This is done by using WinVerifyTrust in conjunction with CryptQueryObject.

            Please note, I did not write this code. I copied this from some site a while ago.. Probably Microsoft or a dev blog. You should simply be able to copy this in to a new C console project and compile/run it.

            This is what it outputs:

            Source https://stackoverflow.com/questions/66592981

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install uac

            You can download it from GitHub.

            Support

            Project documentation page: https://tclahr.github.io/uac-docs.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link