MCPcopy Create free account
hub / github.com/dobin/RedEdr / GetSectionPermissions

Function GetSectionPermissions

RedEdrShared/utils.cpp:273–292  ·  view source on GitHub ↗

For Section permissions (not page permissions)

Source from the content-addressed store, hash-verified

271
272// For Section permissions (not page permissions)
273std::string GetSectionPermissions(DWORD characteristics) {
274 std::string permissions = "---";
275
276 // Check for readable flag
277 if (characteristics & IMAGE_SCN_MEM_READ) {
278 permissions[0] = 'R';
279 }
280
281 // Check for writable flag
282 if (characteristics & IMAGE_SCN_MEM_WRITE) {
283 permissions[1] = 'W';
284 }
285
286 // Check for executable flag
287 if (characteristics & IMAGE_SCN_MEM_EXECUTE) {
288 permissions[2] = 'X';
289 }
290
291 return permissions;
292}
293
294/*
295std::string GetSectionPermissions(DWORD characteristics) {

Callers 1

EnumerateModuleSectionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected