All Projects → giuseppe → become-root

giuseppe / become-root

Licence: other
minimal tool for creating a new user namespace with multiple UIDs/GIDs mapped inside

Programming Languages

c
50402 projects - #5 most used programming language
M4
1887 projects

Projects that are alternatives of or similar to become-root

Sudo killer
A tool to identify and exploit sudo rules' misconfigurations and vulnerabilities within sudo for linux privilege escalation.
Stars: ✭ 1,073 (+3151.52%)
Mutual labels:  sudo
Sudo
Development repository for sudo cookbook
Stars: ✭ 113 (+242.42%)
Mutual labels:  sudo
getroot
🛠️ Tool to bypass my school's security system to get sudo privileges on MacOS
Stars: ✭ 34 (+3.03%)
Mutual labels:  sudo
Sudo rails
🔒 Sudo mode for your Rails controllers
Stars: ✭ 66 (+100%)
Mutual labels:  sudo
Ansible Role Bootstrap
Prepare your system to be managed by Ansible.
Stars: ✭ 106 (+221.21%)
Mutual labels:  sudo
Suda.vim
🥪 An alternative sudo.vim for Vim and Neovim, limited support sudo in Windows
Stars: ✭ 247 (+648.48%)
Mutual labels:  sudo
Delayed Admin
A self-control tool for system administrators.
Stars: ✭ 36 (+9.09%)
Mutual labels:  sudo
please
please, a sudo clone
Stars: ✭ 40 (+21.21%)
Mutual labels:  sudo
Awesome Terminal Commands
An awesome resource listing and explaining various commonly used *nix commands
Stars: ✭ 109 (+230.3%)
Mutual labels:  sudo
ssu
Extremely simple su utility
Stars: ✭ 56 (+69.7%)
Mutual labels:  sudo
Gtfonow
Automatic privilege escalation for misconfigured capabilities, sudo and suid binaries
Stars: ✭ 68 (+106.06%)
Mutual labels:  sudo
Castle Winbuntu
Homesick Castle for use on WSL.
Stars: ✭ 87 (+163.64%)
Mutual labels:  sudo
sudosh
Shell wrapper to run a login shell with `sudo` as the current user for the purpose of audit logging
Stars: ✭ 87 (+163.64%)
Mutual labels:  sudo
Sudo pair
Plugin for sudo that requires another human to approve and monitor privileged sudo sessions
Stars: ✭ 1,077 (+3163.64%)
Mutual labels:  sudo
Mis-Comandos-Linux
📋 Lista descrita de mis 💯 comandos favoritos ⭐ en GNU/Linux 💻
Stars: ✭ 28 (-15.15%)
Mutual labels:  sudo
Gsudo
A Sudo for Windows - run elevated without spawning a new Console Host Window
Stars: ✭ 1,016 (+2978.79%)
Mutual labels:  sudo
Sudo
Order bash to do things by shouting.
Stars: ✭ 155 (+369.7%)
Mutual labels:  sudo
ansible-role-admin-users
Ansible role to manage admin users, authorized keys and sudo access.
Stars: ✭ 18 (-45.45%)
Mutual labels:  sudo
paternoster
Paternoster allows you to run Ansible playbooks like ordinary Python or Bash scripts.
Stars: ✭ 121 (+266.67%)
Mutual labels:  sudo
fakesudo
sudo almost as fake as your ma
Stars: ✭ 15 (-54.55%)
Mutual labels:  sudo

become-root

Minimal tool (when compiled with CFLAGS='-s', the binary is around 10Kb) for launching a program into a new user namespace and have multiple users mapped.

The subuidmap and subgidmap tools are required for setting up the user namespace.

The current user is mapped to the root user into the namespace, while any additional uid/gid in /etc/subuid and /etc/subgid is mapped starting with the ID 1.

Build

Assuming you have the autotools and gcc installed:

$ ./autogen.sh && ./configure && make

Options

Some options are available:

  • a: create all the namespaces
  • c: create a CGroup namespace
  • i: create an IPC namespace
  • m: create a mount namespace
  • n: create a network namespace
  • p: create a PID namespace and fork
  • u: create an UTS namespace
  • P: mount a new /proc
  • S: mount a new /sys
  • N: configure the network with slirp4netns

Examples

$ become-root unshare -m echo hi from a new user and mount namespace
hi from a new user and mount namespace

$ become-root cat /proc/self/uid_map
         0       1000          1
         1     110000      65536

$ become-root id
uid=0(root) gid=0(root) groups=0(root),65534(nfsnobody) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

$ become-root -aPS ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0 246344  2016 pts/7   R+   13:58   0:00 ps aux
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].