calebstewart / pwncat

Fancy reverse and bind shell handler
https://pwncat.readthedocs.io
MIT License
2.63k stars 258 forks source link

[FEATURE #106] Token Impersonation Ability and BadPotato PoC #144

Closed calebstewart closed 3 years ago

calebstewart commented 3 years ago

Description of Changes

Fixes #106.

Added an execute ability named UserToken under pwncat.facts.windows. This execute ability will utilize a leaked user token to impersonate the identity of another user. The enumerate.token.potato module implements the BadPotato technique to leak a SYSTEM token. This can then be used to impersonate the system account. These two pieces allow pwncat's escalate command to effectively escalate to the NT AUTHORITY\SYSTEM account.

Please note any noqa: comments needed to appease flake8.

Major Changes Implemented:

Pre-Merge Tasks

For issues with pre-merge tasks, see CONTRIBUTING.md

Screenshot of BadPotato in Action

image