FileCreate event
@MarioHewardt đang làm issue này rồi.
Từ ngày 28/6/2024.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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.
- Ngôn ngữ chính
- C
- Star
- 2.2k
- Fork
- 222
- Merge trung bình
- 4 giờ 50 phút
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/Sysmon-Linux
-
ProcessCreate: ParentImage is empty when the parent starts the process from a non-main threadĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
microsoft/Sysmon-Linux#253 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
microsoft/Sysmon-Linux#252 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
microsoft/Sysmon-Linux#247 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 12/100
microsoft/Sysmon-Linux#246 · 3 bình luận ·
-
Sysmon service executable remains `(deleted)` after restart, causing repeated needrestart restarts and systemd start-limit-hitCó thể làm lại được @MarioHewardt đã nhận 31 ngày trước và không có pull request nào đang mở. Đang mở
microsoft/Sysmon-Linux#244 · 1 người được giao ·
Tất cả issue của microsoft/Sysmon-Linux
Issue tương tự
-
Implement looks_size reporterĐang mởenhancement good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
bug multiplayer status: planned
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
ChupathingyCE/chupathingyce#851 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
HigherOrderCO/Bend#2104 ·
-
Research radar digest 2026-W46Đang mởresearch-radar
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue help wanted program
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
hffgzktbcc-blip/ounce-core#297 ·
Maintainer thường phản hồi trong vòng 1 ngày