Run Vlc Player as Root

Playing with VLC Binary (just for fun / learning)

  1. Open vlc binary in a hex editor
# yum / dnf / apt-get / pacman install ghex - if ghex is not installed
ghex /usr/bin/vlc
  1. Now search for the string geteuid (use find, type it on the right side)
    you’ll see something like:
geteuid._libc_start_main
  1. Replace geteuid with getppid so it becomes:
getppid._libc_start_main
  1. Save, close and run:
vlc

Note

This is just messing around to understand how binaries work under the hood.
Don’t do this on a system you actually care about, things can break real quick 😄

If your terminal looks weird (If you see -bash-xxx instead of root@smjrifle)

  1. Open:
vim ~/.bashrc
  1. Add:
export PS1='[\u@\h \W]\$ '
  1. Restart terminal