| 273 | } |
| 274 | |
| 275 | bool IScanner::ScanProcessSections(HANDLE hProcess) |
| 276 | { |
| 277 | SCANNER_LOG(LL_SYS, "Section scanner has been started! Target process: %u(%p)", g_winapiApiTable->GetProcessId(hProcess), hProcess); |
| 278 | |
| 279 | if (!IS_VALID_HANDLE(hProcess)) |
| 280 | { |
| 281 | SCANNER_LOG(LL_ERR, "Target handle is NOT valid!"); |
| 282 | return true; |
| 283 | } |
| 284 | |
| 285 | if (!g_nmApp->DynamicWinapiInstance()->IsValidHandle(hProcess)) |
| 286 | { |
| 287 | SCANNER_LOG(LL_ERR, "Target process is NOT active!"); |
| 288 | return true; |
| 289 | } |
| 290 | |
| 291 | auto szProcessName = CProcessFunctions::GetProcessName(hProcess); |
| 292 | if (szProcessName.empty()) |
| 293 | { |
| 294 | SCANNER_LOG(LL_ERR, "Process name read fail! Target process: %p Error: %u", hProcess, g_winapiApiTable->GetLastError()); |
| 295 | return false; |
| 296 | } |
| 297 | SCANNER_LOG(LL_SYS, "Process image name: %s", szProcessName.c_str()); |
| 298 | |
| 299 | // Check dig. sign informations, if signed pass it, it can be take so much time |
| 300 | |
| 301 | return EnumerateSections(hProcess); |
| 302 | } |
nothing calls this directly
no test coverage detected