Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion security/import_hiding.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ KC_NOINLINE inline void* find_module_by_hash(uint64_t name_hash) {

__try {
#if KC_IMPORT_HIDING_LOCK_MODULE_LIST
if (KeGetCurrentIrql() == PASSIVE_LEVEL) {
if (KeGetCurrentIrql() != PASSIVE_LEVEL) {
__try {
KeEnterCriticalRegion();
in_critical = true;
Expand Down
2 changes: 2 additions & 0 deletions security/integrity.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ KC_NOINLINE inline bool find_text_section(void* base, uintptr_t& text_va, uint32
}

// fallback: first section with IMAGE_SCN_MEM_EXECUTE
#ifndef IMAGE_SCN_MEM_EXECUTE
constexpr uint32_t IMAGE_SCN_MEM_EXECUTE = 0x20000000;
#endif
for (uint16_t i = 0; i < nt->FileHeader.NumberOfSections; ++i) {
if (section[i].Characteristics & IMAGE_SCN_MEM_EXECUTE) {
text_va = reinterpret_cast<uintptr_t>(base) + section[i].VirtualAddress;
Expand Down