Process Hacker
svcapi.c File Reference
#include <phapp.h>
#include <secedit.h>
#include <phsvc.h>
#include <phplug.h>
#include <extmgri.h>
#include <symprv.h>
#include <accctrl.h>

Go to the source code of this file.

Typedefs

typedef struct
_PHSVCP_CAPTURED_RUNAS_SERVICE_PARAMETERS 
PHSVCP_CAPTURED_RUNAS_SERVICE_PARAMETERS
 
typedef struct
_PHSVCP_CAPTURED_RUNAS_SERVICE_PARAMETERS * 
PPHSVCP_CAPTURED_RUNAS_SERVICE_PARAMETERS
 

Functions

 C_ASSERT (sizeof(PhSvcApiCallTable)/sizeof(PPHSVC_API_PROCEDURE)==PhSvcMaximumApiNumber-1)
 
NTSTATUS PhSvcApiInitialization (VOID)
 
VOID PhSvcDispatchApiCall (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload, _Out_ PHANDLE ReplyPortHandle)
 
PVOID PhSvcValidateString (_In_ PPH_RELATIVE_STRINGREF String, _In_ ULONG Alignment)
 
NTSTATUS PhSvcProbeBuffer (_In_ PPH_RELATIVE_STRINGREF String, _In_ ULONG Alignment, _In_ BOOLEAN AllowNull, _Out_ PVOID *Pointer)
 
NTSTATUS PhSvcCaptureBuffer (_In_ PPH_RELATIVE_STRINGREF String, _In_ BOOLEAN AllowNull, _Out_ PVOID *CapturedBuffer)
 
NTSTATUS PhSvcCaptureString (_In_ PPH_RELATIVE_STRINGREF String, _In_ BOOLEAN AllowNull, _Out_ PPH_STRING *CapturedString)
 
NTSTATUS PhSvcCaptureSid (_In_ PPH_RELATIVE_STRINGREF String, _In_ BOOLEAN AllowNull, _Out_ PSID *CapturedSid)
 
NTSTATUS PhSvcCaptureSecurityDescriptor (_In_ PPH_RELATIVE_STRINGREF String, _In_ BOOLEAN AllowNull, _In_ SECURITY_INFORMATION RequiredInformation, _Out_ PSECURITY_DESCRIPTOR *CapturedSecurityDescriptor)
 
NTSTATUS PhSvcApiDefault (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiPlugin (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcpCaptureRunAsServiceParameters (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload, _Out_ PPH_RUNAS_SERVICE_PARAMETERS Parameters, _Out_ PPHSVCP_CAPTURED_RUNAS_SERVICE_PARAMETERS CapturedParameters)
 
VOID PhSvcpReleaseRunAsServiceParameters (_In_ PPHSVCP_CAPTURED_RUNAS_SERVICE_PARAMETERS CapturedParameters)
 
NTSTATUS PhSvcpValidateRunAsServiceParameters (_In_ PPH_RUNAS_SERVICE_PARAMETERS Parameters)
 
NTSTATUS PhSvcApiExecuteRunAsCommand (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiUnloadDriver (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiControlProcess (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiControlService (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiCreateService (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiChangeServiceConfig (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcpUnpackRoot (_In_ PPH_RELATIVE_STRINGREF PackedData, _In_ PVOID CapturedBuffer, _In_ SIZE_T Length, _Out_ PVOID *ValidatedBuffer)
 
NTSTATUS PhSvcpUnpackBuffer (_In_ PPH_RELATIVE_STRINGREF PackedData, _In_ PVOID CapturedBuffer, _In_ PVOID *OffsetInBuffer, _In_ SIZE_T Length, _In_ ULONG Alignment, _In_ BOOLEAN AllowNull)
 
NTSTATUS PhSvcpUnpackStringZ (_In_ PPH_RELATIVE_STRINGREF PackedData, _In_ PVOID CapturedBuffer, _In_ PVOID *OffsetInBuffer, _In_ BOOLEAN Multi, _In_ BOOLEAN AllowNull)
 
NTSTATUS PhSvcApiChangeServiceConfig2 (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiSetTcpEntry (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiControlThread (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiAddAccountRight (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiInvokeRunAsService (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiIssueMemoryListCommand (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiPostMessage (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiSendMessage (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiCreateProcessIgnoreIfeoDebugger (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiSetServiceSecurity (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiLoadDbgHelp (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 
NTSTATUS PhSvcApiWriteMiniDumpProcess (_In_ PPHSVC_CLIENT Client, _Inout_ PPHSVC_API_PAYLOAD Payload)
 

Variables

PPHSVC_API_PROCEDURE PhSvcApiCallTable []
 

Typedef Documentation

typedef struct _PHSVCP_CAPTURED_RUNAS_SERVICE_PARAMETERS PHSVCP_CAPTURED_RUNAS_SERVICE_PARAMETERS
typedef struct _PHSVCP_CAPTURED_RUNAS_SERVICE_PARAMETERS * PPHSVCP_CAPTURED_RUNAS_SERVICE_PARAMETERS

Function Documentation

C_ASSERT ( sizeof(PhSvcApiCallTable)/sizeof(PPHSVC_API_PROCEDURE = =PhSvcMaximumApiNumber-1)
NTSTATUS PhSvcApiAddAccountRight ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 1190 of file svcapi.c.

NTSTATUS PhSvcApiChangeServiceConfig ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 724 of file svcapi.c.

NTSTATUS PhSvcApiChangeServiceConfig2 ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 914 of file svcapi.c.

NTSTATUS PhSvcApiControlProcess ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 476 of file svcapi.c.

NTSTATUS PhSvcApiControlService ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 537 of file svcapi.c.

NTSTATUS PhSvcApiControlThread ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 1141 of file svcapi.c.

NTSTATUS PhSvcApiCreateProcessIgnoreIfeoDebugger ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 1299 of file svcapi.c.

NTSTATUS PhSvcApiCreateService ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 642 of file svcapi.c.

NTSTATUS PhSvcApiDefault ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 308 of file svcapi.c.

NTSTATUS PhSvcApiExecuteRunAsCommand ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 437 of file svcapi.c.

NTSTATUS PhSvcApiInitialization ( VOID  )

Definition at line 66 of file svcapi.c.

NTSTATUS PhSvcApiInvokeRunAsService ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 1221 of file svcapi.c.

NTSTATUS PhSvcApiIssueMemoryListCommand ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 1243 of file svcapi.c.

NTSTATUS PhSvcApiLoadDbgHelp ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 1375 of file svcapi.c.

NTSTATUS PhSvcApiPlugin ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 316 of file svcapi.c.

NTSTATUS PhSvcApiPostMessage ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 1259 of file svcapi.c.

NTSTATUS PhSvcApiSendMessage ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 1279 of file svcapi.c.

NTSTATUS PhSvcApiSetServiceSecurity ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 1318 of file svcapi.c.

NTSTATUS PhSvcApiSetTcpEntry ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 1086 of file svcapi.c.

NTSTATUS PhSvcApiUnloadDriver ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 459 of file svcapi.c.

NTSTATUS PhSvcApiWriteMiniDumpProcess ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload 
)

Definition at line 1398 of file svcapi.c.

NTSTATUS PhSvcCaptureBuffer ( _In_ PPH_RELATIVE_STRINGREF  String,
_In_ BOOLEAN  AllowNull,
_Out_ PVOID *  CapturedBuffer 
)

Definition at line 152 of file svcapi.c.

NTSTATUS PhSvcCaptureSecurityDescriptor ( _In_ PPH_RELATIVE_STRINGREF  String,
_In_ BOOLEAN  AllowNull,
_In_ SECURITY_INFORMATION  RequiredInformation,
_Out_ PSECURITY_DESCRIPTOR *  CapturedSecurityDescriptor 
)

Definition at line 255 of file svcapi.c.

NTSTATUS PhSvcCaptureSid ( _In_ PPH_RELATIVE_STRINGREF  String,
_In_ BOOLEAN  AllowNull,
_Out_ PSID *  CapturedSid 
)

Definition at line 223 of file svcapi.c.

NTSTATUS PhSvcCaptureString ( _In_ PPH_RELATIVE_STRINGREF  String,
_In_ BOOLEAN  AllowNull,
_Out_ PPH_STRING CapturedString 
)

Definition at line 187 of file svcapi.c.

VOID PhSvcDispatchApiCall ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload,
_Out_ PHANDLE  ReplyPortHandle 
)

Definition at line 73 of file svcapi.c.

NTSTATUS PhSvcpCaptureRunAsServiceParameters ( _In_ PPHSVC_CLIENT  Client,
_Inout_ PPHSVC_API_PAYLOAD  Payload,
_Out_ PPH_RUNAS_SERVICE_PARAMETERS  Parameters,
_Out_ PPHSVCP_CAPTURED_RUNAS_SERVICE_PARAMETERS  CapturedParameters 
)

Definition at line 357 of file svcapi.c.

VOID PhSvcpReleaseRunAsServiceParameters ( _In_ PPHSVCP_CAPTURED_RUNAS_SERVICE_PARAMETERS  CapturedParameters)

Definition at line 398 of file svcapi.c.

NTSTATUS PhSvcProbeBuffer ( _In_ PPH_RELATIVE_STRINGREF  String,
_In_ ULONG  Alignment,
_In_ BOOLEAN  AllowNull,
_Out_ PVOID *  Pointer 
)

Definition at line 123 of file svcapi.c.

NTSTATUS PhSvcpUnpackBuffer ( _In_ PPH_RELATIVE_STRINGREF  PackedData,
_In_ PVOID  CapturedBuffer,
_In_ PVOID *  OffsetInBuffer,
_In_ SIZE_T  Length,
_In_ ULONG  Alignment,
_In_ BOOLEAN  AllowNull 
)

Definition at line 818 of file svcapi.c.

NTSTATUS PhSvcpUnpackRoot ( _In_ PPH_RELATIVE_STRINGREF  PackedData,
_In_ PVOID  CapturedBuffer,
_In_ SIZE_T  Length,
_Out_ PVOID *  ValidatedBuffer 
)

Definition at line 803 of file svcapi.c.

NTSTATUS PhSvcpUnpackStringZ ( _In_ PPH_RELATIVE_STRINGREF  PackedData,
_In_ PVOID  CapturedBuffer,
_In_ PVOID *  OffsetInBuffer,
_In_ BOOLEAN  Multi,
_In_ BOOLEAN  AllowNull 
)

Definition at line 851 of file svcapi.c.

NTSTATUS PhSvcpValidateRunAsServiceParameters ( _In_ PPH_RUNAS_SERVICE_PARAMETERS  Parameters)

Definition at line 423 of file svcapi.c.

PVOID PhSvcValidateString ( _In_ PPH_RELATIVE_STRINGREF  String,
_In_ ULONG  Alignment 
)

Definition at line 98 of file svcapi.c.

Variable Documentation