(e *event.Event)
| 48 | } |
| 49 | |
| 50 | func (m memProcessor) ProcessEvent(e *event.Event) (*event.Event, bool, error) { |
| 51 | if e.Category == event.Mem { |
| 52 | pid := e.Params.MustGetPid() |
| 53 | if e.IsVirtualAlloc() { |
| 54 | // retrieve info about the range of pages and enrich the event |
| 55 | // with allocation protection options and the type of pages in |
| 56 | // the allocated region. If the region is mapped, we try to find |
| 57 | // the backing file name |
| 58 | addr := e.Params.MustGetUint64(params.MemBaseAddress) |
| 59 | region := m.regionProber.Query(pid, addr) |
| 60 | if region != nil { |
| 61 | if region.IsMapped() { |
| 62 | e.AppendParam(params.FilePath, params.DOSPath, region.GetMappedFile()) |
| 63 | } |
| 64 | e.AppendEnum(params.MemPageType, region.Type, MemPageTypes) |
| 65 | e.AppendFlags(params.MemProtect, region.Protect, event.MemProtectionFlags) |
| 66 | e.AppendParam(params.MemProtectMask, params.AnsiString, region.ProtectMask()) |
| 67 | } |
| 68 | } |
| 69 | proc := m.psnap.FindAndPut(pid) |
| 70 | if proc != nil { |
| 71 | e.AppendParam(params.Exe, params.Path, proc.Exe) |
| 72 | e.AppendParam(params.ProcessName, params.AnsiString, proc.Name) |
| 73 | } |
| 74 | return e, false, nil |
| 75 | } |
| 76 | return e, true, nil |
| 77 | } |
nothing calls this directly
no test coverage detected