privileges

Run shellcode as root in a buffer overflow attack?

Run shellcode as root in a buffer overflow attack? I’m trying to exploit the following code: #include <stdio.h> #include <string.h> int main(int argc, char** argv){ char buffer[100]; strcpy(buffer, argv[1]); return 0; } with the following command ./vuln $(python -c "import sys; sys.stdout.buffer.write(b’x90’*60 + b’x31xc0x50x68x2fx2fx73x68x68x2fx62x69x6ex89xe3x89xc1x89xc2xb0x0bxcdx80x31xc0x40xcdx80′ + b’x40xd6xffxff’*6)") The first part is the NOPs, the second part …

Total answers: 2

How does rfkill work without being root (or using sudo)?

How does rfkill work without being root (or using sudo)? I saw this statement at the end of this answer: PS: I have no idea why rfkill works when run as an unprivileged user. On my Mint, it doesn’t have a setuid or setgid bit. I was curious, and looked on my Arch system. Here’s …

Total answers: 1

Super-user privileges for Chromium browser

Super-user privileges for Chromium browser After apt-get install chromium and running it on Debian 12, ps alx | grep -e ^F -e ^5.*chromium returns: F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 5 1000 3452315 3452313 20 0 33884428 16712 do_sys S ? 0:00 /usr/lib/chromium/chromium –type=zygote –crashpad-handler-pid=3452306 –enable-crash-reporter=,built on Debian …

Total answers: 1

Granting privileges using visudo still prevents user to execute command

Granting privileges using visudo still prevents user to execute command Following this solution, I want to grant to the user daemon the execution of /bin/date. Here what I did: find the user that apache2 uses when spawning: # ps | grep httpd 252 root /usr/bin/httpd -k start 260 daemon /usr/bin/httpd -k start 262 daemon /usr/bin/httpd …

Total answers: 1

Is it possible to grant a specific privilege to a user without sudo?

Is it possible to grant a specific privilege to a user without sudo? I’m not going to add sudo in my Buildroot environment for RPi 3 B+ since I just need apache2 to update my system time with date -s TIME. Is there a way to grant this permission without installing and configure sudo? Asked …

Total answers: 1

How do I have two group owners

How do I have two group owners I have a file where I want there to be not one but two groups who can have extra privileges to access it. But when I chown or chgrp it to a group it always erases the previous group. How do I add a group owner without deleting …

Total answers: 1

Why it is possible for normal users to power off computer?

Why it is possible for normal users to power off computer? I used the command poweroff and unexpectedly the system went off. I didn’t used sudo therefore I didn’t expect computer to be turned off. Why it was possible for me to use this command without root privilege? Asked By: Amir reza Riahi || Source …

Total answers: 1

How to use the "setuid" bit?

How to use the "setuid" bit? I created a small script as the root user… #!/bin/bash cat /etc/shadow and set the setuid bit and placed it within the guest folder. When I ran the script as guest, it showed permission denied. Why? I had the root setuid bit set on it which should execute it …

Total answers: 1

make all the processes of a given user killable by anyone

make all the processes of a given user killable by anyone On a shared server, I would like to have some very low priority users such that whenever an other user (also without root privileges) needs the resources, they can kill any of the low priority users’ processes. Is it possible to allow something like …

Total answers: 3

What determines which Linux commands require root access?

What determines which Linux commands require root access? What determines which Linux commands require root access? I understand the reasons why it is desirable that, say, apt-get should require root privilege; but what distinguishes these commands from the rest? Is it simply a matter of the ownership and execute permissions of the executable? Asked By: …

Total answers: 3

cant add user to sudo group in centOS 7 i386(no GUI,Its minimal)

cant add user to sudo group in centOS 7 i386(no GUI,Its minimal) I had install centOS 7 minimal version in my virtualbox in Ubuntu mate. It has no GUI. It is totally CLI. My user name is Smit and able to login in to it. But when i type command sudo yum update and enter …

Total answers: 3

Do I have to type su every time?

Do I have to type su every time? I have created a user. useradd -M -d /usr/my_user my_user chown -R my_user. /usr/my_user Now as a root I can type: su – my_user -c /usr/my_user/some_dir/script.sh but if I want to do more complicated things, for example navigate between my_user folders I have to type the su …

Total answers: 2

How can a file manager mount a drive without root?

How can a file manager mount a drive without root? I’ve been reading this question about why mount must be run as root (with some exceptions), and I was wondering, if mounting a drive requires root (generally), how does a graphical file manager (Nautilus, Thunar, etc) do it? Does it have anything to do with …

Total answers: 3

Vulnerability demonstration on Ubuntu 9.04

Vulnerability demonstration on Ubuntu 9.04 For a class on IT security, I want to demonstrate privilege escalation to the students. To do so, I looked through the exploit/linux/local list in the Metasploit Framework, finding (among others) exploit/linux/local/sock_sendpage from August 2009. I set up a VM with 32-bit Ubuntu Server 9.04 (http://old-releases.ubuntu.com/releases/9.04/ubuntu-9.04-server-amd64.iso) from April 2009. uname …

Total answers: 2

Is it possible to run 'unshare -n [program]' as an unprivileged user?

Is it possible to run 'unshare -n [program]' as an unprivileged user? I want to run a program without any internet access, e.g. unshare -n ping 127.0.0.1. As an unprivileged user, it returns Operation not permitted, as a privileged user, it returns the desired Network is unreachable. Is there any way to make it work …

Total answers: 3

Allow regular users to SSH using a private key they cannot read

Allow regular users to SSH using a private key they cannot read Let’s say I have a set of machines (called here the customers’ machines) that only a small list of people (called the support staff) is allowed to SSH into, using only one account by machine (the support access account). The support staff are …

Total answers: 6

Bash cannot act as nobody and nogroup?

Bash cannot act as nobody and nogroup? I have a log file that was created by nobody:nogroup, which is activity being logged to, I wanted to emulate adding a message to that log file. My first thought was to: $ sudo su nobody This account is currently not available. Asked By: ThorSummoner || Source An …

Total answers: 2

Which Linux capability do I need in order to write to /proc/sys/vm/drop_caches?

Which Linux capability do I need in order to write to /proc/sys/vm/drop_caches? I am trying to clear my filesystem cache from inside a docker container, like so: docker run –rm ubuntu:vivid sh -c “/bin/echo 3 > /proc/sys/vm/drop_caches” If I run this command I get sh: 1: cannot create /proc/sys/vm/drop_caches: Read-only file system which is expected, …

Total answers: 3