Red de conocimiento informático - Conocimiento del nombre de dominio - Forzar modificación del código fuente

Forzar modificación del código fuente

; Para plataformas tipo NT, obtenga permisos de apagado/reinicio.

Ajustar el proceso del token

HDLProcessHandle local:DWORD

HDLTokenHandle local:DWORD

TmpLuid local:LUIDCUST

Tkp local:TOKEN_PRIVS

tkpLOCALNewButIgnored:TOKEN _ PRIVS

LBufferneed local:DWORD

TBuff local[32]:bytes

ptBuff local: DWORD

Llame a GetCurrentProcess para obtener el identificador del proceso actual

mov hdlProcessHandle, eax se guarda en hdlProcessHandle

lea eax, la dirección del búfer temporal en tBuffeax

p>

mov ptBuff, eax establece el puntero al búfer temporal

mov byte PTR [eax], 0; inicializa el búfer

Llama a OpenProcessToken; , hdlProcessHandle, 40, ADDR hdlTokenHandle

Call LookupPrivilegeValue, ptBuff, SADD("SeShutdownPrivilege"), ADDR tmpLuid

lea eax, dirección de tmpLuidtmpLuid en eax

; contenido de tmpLuid put ecx:edx

mov ecx, (LUIDCUST PTR [eax]). Utilice la parte

mov edx, (LUIDCUST PTR [eax]), ignorehigh32bitpart

lea eax, tkptkp a la dirección de eax

mov (TOKEN_PRIVS PTR [eax]) . privilegiocount, 1

mov (TOKEN_PRIVS PTR [eax]), theluid.usedpart, ecx

mov (TOKEN_PRIVS PTR [eax]), theluid.ignorehigh32bitpart, edx

mov (TOKEN_PRIVS PTR [eax]). Atributos, 2

Llame a AjustarTokenPrivileges, hdlTokenHandle, 0, ADDR tkp,\

ADDR·Tekponius·Butinied·ADDR·Buvernied

Remojar en agua lo suaviza

AdjustToken endp

Proceso de cierre de sesión

Llamar a ExitWindowsEx, EWX_LOGOFF, 0. Cerrar sesión en la máquina

Remojar en agua para suavizarla

Cerrar sesión AHORA finaliza

Cerrar el proceso actual

Llamar a SalirWindowsEx, EWX _ apagar+EWX _ FORCE+ EWX _ apagado, NULL apaga la máquina

Remojar en agua para suavizar

Cerrar el final actual

Reiniciar proceso AHORA

Llame a ExitWindowsEx, EWX_REBOOT, 0 ;Reinicie la máquina

Remojar en agua para suavizarla

Reiniciar AHORA endp

Cópielo usted mismo e ingresalo