FileCreate event
@MarioHewardt ya está trabajando en esto.
Desde el 28/6/2024.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Describe the bug
When utilizing the creat system call to generate a new file, a FileCreate event is triggered. Conversely, no such event is reported when employing the open system call for file creation. Additionally, attempting to open an already existing file with the creat system call results in a FileCreate event being generated
To Reproduce
I wrote a simple programm to test it.
create a new file with creat system call
#include
#include
#include
int main(int, char**)
{
mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
char* pathname = "./test";
int fd = creat(pathname, mode); //A call to creat() is equivalent to calling open() with flags equal to O_CREAT|O_WRONLY|_TRUNC.
if(fd < 0)
{
printf("failed\n");
}
else{
printf("successfull\n");
}
}
create a new file with open system call
#include
#include
#include
int main()
{
mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
char* pathname = "./test";
int fd = open(pathname, O_CREAT|O_WRONLY|O_TRUNC, mode); //this is equivalent to creat
if(fd < 0)
{
printf("failed\n");
}
else{
printf("successfull\n");
}
}
Sysmon version
Sysmon v1.3.3
Distro/kernel version
Ubuntu 22.04.2 LTS 6.5.0-28-generic
Sysmon configuration
Additional context
I discovered that Sysmon logs a FileCreate event upon receiving the syscall number __NR_CREAT, and it records a FileOpen event when encountering __NR_OPEN during the open system call. Within the open system call hook point handler, Sysmon evaluates the equivalence of the access, change, and modification times associated with the file. If all these timestamps match and the duration between the event times is under 100 milliseconds, it triggers a FileOpen event (which seemingly contradicts the notion of file creation). Notably, Sysmon does not perform this timestamp comparison in the creat system call hook point, consequently report FileCreate event in each creat system call even if the file already exist.
- Lenguaje dominante
- C
- Estrellas
- 2.2k
- Forks
- 222
- Merge medio
- 4 h 50 min
- PR fusionados (30 d)
- 3
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/Sysmon-Linux
-
ProcessCreate: ParentImage is empty when the parent starts the process from a non-main threadAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
microsoft/Sysmon-Linux#253 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
microsoft/Sysmon-Linux#252 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
microsoft/Sysmon-Linux#247 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 12/100
microsoft/Sysmon-Linux#246 · 3 comentarios ·
-
Sysmon service executable remains `(deleted)` after restart, causing repeated needrestart restarts and systemd start-limit-hitQuizá libre de nuevo @MarioHewardt la tomó hace 31 días y no hay ningún pull request abierto. Abierto
microsoft/Sysmon-Linux#244 · 1 asignado ·
Todos los issues de microsoft/Sysmon-Linux
Issues similares
-
Implement looks_size reporterAbiertoenhancement good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
bug multiplayer status: planned
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
ChupathingyCE/chupathingyce#851 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
HigherOrderCO/Bend#2104 ·
-
Research radar digest 2026-W46Abiertoresearch-radar
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
good first issue help wanted program
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
hffgzktbcc-blip/ounce-core#297 ·
Los mantenedores suelen responder en 1 día