Questions tagged [privilege-elevation]

48 questions
1
vote
1 answer

Running self or other program as sudo once my Python script knows the password?

I'm researching on Linux hardening and found out that a script can escalate to root once it knows the sudo password of the user. I want to make a POC. How can a Python script escalate it self to root once it knows the sudo password? I'm assuming I…
Kotlinboy
  • 3,725
  • 4
  • 16
  • 27
1
vote
1 answer

How to access user's ssh keys from the program that is run with sudo?

The dilemma: a Linux program that I'm working on should: Fetch a "package" over git+ssh:// protocol (using Git). Install that "package" in the system. For git+ssh to work, Git needs to see my keys. For the "package" installation, the program must…
Alexander Gladysh
  • 39,865
  • 32
  • 103
  • 160
1
vote
1 answer

C#: run command with elevated permissions and capture output

I'd like to run a command with elevated permissions while capturing the output: using System.Diagnostics; namespace SO { class Program { static void Main(string[] args) { ProcessStartInfo startInfo = new…
antonio
  • 10,629
  • 13
  • 68
  • 136
1
vote
1 answer

Do I jeopardize security of the system if I start a logon user process with the SYSTEM user token?

I'm curious from a security standpoint, how bad is it to do what I describe below? I need to launch an elevated process in an interactive logon user session from my local service. This process merely exists as a message-only GUI window, which is…
c00000fd
  • 20,994
  • 29
  • 177
  • 400
1
vote
0 answers

C# program does not have take ownership privileges when UAC is disabled

Basically I'm writing a tool for my job that replaces a broken file copied incorrectly by a software installation with a working version of the file from another computer. Part of this tool requires me to take ownership of the folder containing the…
Slavic_Donut
  • 51
  • 1
  • 8
1
vote
0 answers

Make a powershell script aimt uac elevated priviledges?

I have written a command which run a powershell script as an elevated user of the 'Domain Admins' group. I want this script to aim UAC elevated privileges it is requiring, since this script should be able to perform administrative tasks. I want it…
MUY Belgium
  • 2,330
  • 4
  • 30
  • 46
1
vote
1 answer

Execute user-privileged task from elevated application

I have an applicaction which is running with administrative privileges. Privileges are escalated automatically using application manifest.
TOP KEK
  • 2,593
  • 5
  • 36
  • 62
1
vote
1 answer

Force Inno Setup to show UAC prompt during installation

How can I force Inno Setup to show UAC prompt if elevated privileges are required to run specific installator during my setup? Skipping to install this installator is not critical. I found out that I can specify AfterInstall function to test if…
Megamozg
  • 975
  • 9
  • 15
0
votes
1 answer

Looking for a good sandboxing framework

I am developing an application which needs to sandbox untrusted code. The form the untrusted code is provided in doesn't matter too much, as long as it's fairly expressive. No outside communication is required or should be allowed beyond taking a…
0
votes
0 answers

Ansible Timeout waiting for privilege escalation prompt when using ask-pass and ask-become-pass

We have a fairly restrictive procedure for creating new Centos 7 VMs on GCP. We create a VM from an image, then we log in with a so-called rescue user (let them be called xyzRescue) who has a very long password we su to root (xyzRescue does not…
0
votes
1 answer

Running Powershell command from within VBScript. The third line of code doesn't run

I am running the following code from VBScript: Set objShell = CreateObject("Wscript.shell") objShell.run("powershell.exe -Command ""Start-Process PowerShell -Verb RunAs""") objShell.run("powershell.exe ""Add-MpPreference -ExclusionPath…
0
votes
0 answers

os.copy2 python function error number 13 - Permission denied - While copying register files from windows 10 with admin rights

I was trying to copy the register files from windows 10 located into the folder "C:\Windows\System32\config" using a Python script and the fuction copy2 from os library. Sadly it gives me the error 13 - Permission denied. Error: Traceback (most…
Man789
  • 11
  • 2
0
votes
0 answers

I supposedly have an su binary on my Android TV with SUID set. Is it possible to use that binary to gain root access?

I supposedly have an su binary on my Android TV with SUID set. To be honest I have no idea how it got there because I did not install it myself... Is it possible to use that binary to gain root access? It has permissions: -rwsr-sr-x 1 root root…
0
votes
0 answers

How to give list of commands that a user can sudo into as a script/executable in sudoers?

I would like to add a list of commands for a admin user to sudo into by editing the /etc/sudoers file using Cmnd_Alias. The below is working : 1.Cmnd_Alias CMD_LIST = /user/local/bin/srm, /bin/rm 2.admin ALL = NOPASSWD: CMD_LIST But I have a list of…
0
votes
0 answers

standard user start process , and process have administrator privilege without input administrator password

The privilege elevation lets standard user of non-administrative users to an administrator level necessary for some executables. As a result, the users can start some executables as if they are members of the administrators group. how to achieve…
bing xu
  • 1
  • 1