Giter VIP home page Giter VIP logo

adjusttokenprivileges's Introduction

AdjustTokenPrivileges

Adjusts the privileges of the token for a given proccess

QUICK and dirty POC based on Fashion Proof's (Mark Mo) https://github.com/fashionproof/EnableAllTokenPrivs/blob/master/EnableAllTokenPrivs.ps1 In some cases you land in a high integrity proccess, but the token have only some privileges enabled for that proccess. This program permits enable all privileges in the token, for a given PID. We used it in the context of Covenant C2 operations, so we tweaked the code to adjust the privileges inside the covenant process.

You must note that depending on how the covenant grunt was deployed, you will need to provide different PID (to be confirmed):

  • For Powershell launched grunts: Actual powershell process PID
  • For binary grunts: The Parent Process PID.
  • For injected grunts: The injected Process PID (remember that must be high integrity process)

You can check the actual pid using powershell: $pid

Or view all proccesses PIDs with Get-Process

To invoke the prorgram you need to pass the PID of the process to be adjusted as parameter.

Example: $pid 1234

AdjustTokenprivileges.exe 1234

IMPORTANT NOTE: Adjusting the token enabling all privileges is NOT OPSEC safe. Adjust the code to the purposes of your specific use case.

adjusttokenprivileges's People

Watchers

Javier Antunez avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.