From 56633a8dcce19091bb3e8684ff8ca5beb9a130df Mon Sep 17 00:00:00 2001 From: Maurice Heumann Date: Sat, 12 Jun 2021 23:09:24 +0200 Subject: [PATCH] Make sure to unprotect tls --- src/client/loader/loader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/loader/loader.cpp b/src/client/loader/loader.cpp index dadc9f1..9f2f241 100644 --- a/src/client/loader/loader.cpp +++ b/src/client/loader/loader.cpp @@ -188,7 +188,7 @@ void loader::load_tls(const utils::nt::library& target, const utils::nt::library const auto tls_size = source_tls->EndAddressOfRawData - source_tls->StartAddressOfRawData; const auto tls_index = *reinterpret_cast(target_tls->AddressOfIndex); - *reinterpret_cast(source_tls->AddressOfIndex) = tls_index; + utils::hook::set(source_tls->AddressOfIndex, tls_index); DWORD old_protect; VirtualProtect(PVOID(target_tls->StartAddressOfRawData),