| ID |
C0051 |
| Objective(s) |
File System |
| Related ATT&CK Techniques |
None |
| Version |
2.3 |
| Created |
4 December 2020 |
| Last Modified |
30 April 2024 |
Malware reads a file.
| Tool: capa | Mapping | APIs |
|---|
| read file on Windows | Read File (C0051) | kernel32.ReadFile, ReadFileEx, NtReadFile, ZwReadFile, LZRead, _read, fread, System.IO.File::ReadAllBytes, System.IO.File::ReadAllBytesAsync, System.IO.File::ReadAllLines, System.IO.File::ReadAllLinesAsync, System.IO.File::ReadAllText, System.IO.File::ReadAllTextAsync, System.IO.File::ReadLines |
| read file via mapping | Read File (C0051) | kernel32.MapViewOfFile, kernel32.UnmapViewOfFile, kernel32.CreateFileMapping |
| read file on Linux | Read File (C0051) | fgetc, fgets, getc, getchar, read, getline, getdelim, fgetwc, getwc, fscanf, vfscanf, fread |
| read .ini file | Read File (C0051) | GetPrivateProfileInt, GetPrivateProfileString, GetPrivateProfileStruct, GetPrivateProfileSection, GetPrivateProfileSectionNames, GetFullPathName |
File System::Read File
SHA256: e5897829835f3e9fbab71674ca06f48ff127ec014d1629817f0566203c93b732
Location: 0x401762
mov r9, rdi ; variable that will hold number of bytes actually read from file
mov r8d, ebx ; number of bytes to read
mov param_2, rsi ; pointer to buffer that will hold content read from file
mov param_1, r12 ; handle to the device/file to read from
mov qword ptr [rsp + local_58], 0x0 ; optional pointer to OVERLAPPED structure (in this case, it is NULL)
call qword ptr [->KERNEL32.DLL::ReadFile] ; API call to read file specified in param_1
[1] capa v4.0, analyzed at MITRE on 10/12/2022