| ID |
C0052 |
| Objective(s) |
File System |
| Related ATT&CK Techniques |
None |
| Version |
2.3 |
| Created |
4 December 2020 |
| Last Modified |
30 April 2024 |
Malware writes to a file.
| Tool: capa | Mapping | APIs |
|---|
| write file on Linux | Writes File (C0052) | fputc, fputs, putc, write, fputwc, putwc, fputws, fwrite, putwchar, dprintf, vdprnitf, fprintf, vfprintf |
| write file on Windows | Writes File (C0052) | kernel32.WriteFile, kernel32.WriteFileEx, NtWriteFile, ZwWriteFile, _fwrite, fwrite, System.IO.File::WriteAllBytes, System.IO.File::WriteAllBytesAsync, System.IO.File::WriteAllLines, System.IO.File::WriteAllLinesAsync, System.IO.File::WriteAllText, System.IO.File::WriteAllTextAsync, System.IO.File::AppendAllLines, System.IO.File::AppendAllLinesAsync, System.IO.File::AppendAllText, System.IO.File::AppendAllTextAsync, System.IO.File::AppendText, System.IO.FileInfo::AppendText |
| create process memory minidump | Writes File (C0052) | dbghelp.MiniDumpWriteDump |
File System::Writes File
SHA256: e5897829835f3e9fbab71674ca06f48ff127ec014d1629817f0566203c93b732
Location: 0x4016A7
mov r9, rdi ; variable that will hold number of bytes actually written
mov r8d, ebx ; number of bytes to write
mov param_2, rsi ; pointer to buffer containing data that will be written to the file
mov param_1, r12 ; handle to the device/file to write to
mov qword ptr [rsp + local_58], 0x0 ; optional pointer to OVERLAPPED structure (in this case, it is NULL)
call qword ptr [->KERNEL32.DLL::WriteFile] ; API call to write to file specified in param_1
[1] capa v4.0, analyzed at MITRE on 10/12/2022