StackPID returns the process id as seen the creator from the callstack execution perspective. For example, the pid associated with CreateProcess events is the parent, not the process being created.
()
| 266 | // the pid associated with CreateProcess events is the |
| 267 | // parent, not the process being created. |
| 268 | func (e *Event) StackPID() uint32 { |
| 269 | if e.IsCreateProcess() { |
| 270 | if e.IsSurrogateProcess() { |
| 271 | return e.Params.MustGetUint32(params.ProcessRealParentID) |
| 272 | } |
| 273 | return e.Params.MustGetPpid() |
| 274 | } |
| 275 | return e.PID |
| 276 | } |
| 277 | |
| 278 | // IsCreateRemoteThread indicates if the remote thread creation occurred. |
| 279 | func (e *Event) IsCreateRemoteThread() bool { |
no test coverage detected