privacysavvy

privacysavvy

Saturday, June 1, 2024

Faking the Import Address Table (IAT)

Hello I am presenting a straightforward method to increase the difficulty for malware analysts or to evade detection by EDR. This technique is not overly complex; in fact, it is quite simple. As it is known, the malware analyst learn to understand…
Read on blog or Reader
Site logo image Cyber Security Architect | Red/Blue Teaming | Exploit/Malware Analysis Read on blog or Reader

Faking the Import Address Table (IAT)

rioasmara

June 2

Hello

I am presenting a straightforward method to increase the difficulty for malware analysts or to evade detection by EDR. This technique is not overly complex; in fact, it is quite simple.

As it is known, the malware analyst learn to understand the behavior of malware through an examination of the Import Address Table. An excellent tool for swiftly conducting such analysis is PEStudio.

The developer of the malware will employ creative techniques to evade analysis, such as dynamically loading the API call during runtime. As a result, the Import Address Table (IAT) will not list the required API call, compelling analysts to delve into the code in order to comprehend the malware's interaction with the operating system.

When the Import Address Table (IAT) is significantly reduced through the application of dynamic loading, it may raise further suspicion. If all API calls are resolved dynamically, the IAT will only display minimal information, potentially indicating a cause for malware evasion concern.

To minimize suspicion, the malware developer may choose to fabricate a spurious API call for inclusion in the Import Address Table (IAT). This could involve incorporating fake API call. Nonetheless, the developer must ensure that the malware's behavior remains unaffected by the inclusion of these fabricated calls. One way to achieve this is by creating dead code, thereby preventing the fake API call from being executed during runtime, as illustrated by the simple code snippet below.

 #include <iostream> #include <Windows.h>   VOID FakingAPICall() {  	int i = 5;  	if (i < 2) { 		unsigned __int64 i = MessageBoxA(NULL, NULL, NULL, NULL); 		i = GetLastError(); 		i = SetCriticalSectionSpinCount(NULL, NULL); 		i = GetWindowContextHelpId(NULL); 		i = GetWindowLongPtrW(NULL, NULL); 		i = RegisterClassW(NULL); 		i = IsWindowVisible(NULL); 		i = ConvertDefaultLocale(NULL); 		i = MultiByteToWideChar(NULL, NULL, NULL, NULL, NULL, NULL); 		i = IsDialogMessageW(NULL, NULL); 	} }  int main() {     std::cout << "Hello World!\n"; 	FakingAPICall(); } 

The API call will not be executed as the condition will never be met. Nevertheless, by including the above code, all those API calls will be ensured to be included in the IAT table.

To ensure that the dead code is not eliminated by the compiler during the compilation optimization process, it is a must to disable any optimizations, as demonstrated below.

Comment
Like
You can also reply to this email to leave a comment.

Cyber Security Architect | Red/Blue Teaming | Exploit/Malware Analysis © 2024. Manage your email settings or unsubscribe.

WordPress.com and Jetpack Logos

Get the Jetpack app

Subscribe, bookmark, and get real-time notifications - all from one app!

Download Jetpack on Google Play Download Jetpack from the App Store
WordPress.com Logo and Wordmark title=

Automattic, Inc. - 60 29th St. #343, San Francisco, CA 94110  

at June 01, 2024
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

More budget ≠ more tools. Here's a better approach

Security budgets are at a record high. But how you spend them matters more than how much. ...

  • Dork List
    ...
  • End of week Artemis update - July 18th 2025
    A round-up of our ILS focused news from this week ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌...
  • Artemis London 2025: Under two months to go
    Register now to attend at the lowest price ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌...

Search This Blog

  • Home

About Me

privacysavvy
View my complete profile

Report Abuse

Blog Archive

  • June 2026 (57)
  • May 2026 (73)
  • April 2026 (94)
  • March 2026 (92)
  • February 2026 (76)
  • January 2026 (77)
  • December 2025 (79)
  • November 2025 (73)
  • October 2025 (88)
  • September 2025 (79)
  • August 2025 (71)
  • July 2025 (89)
  • June 2025 (78)
  • May 2025 (95)
  • April 2025 (85)
  • March 2025 (78)
  • February 2025 (31)
  • January 2025 (50)
  • December 2024 (39)
  • November 2024 (42)
  • October 2024 (54)
  • September 2024 (83)
  • August 2024 (2665)
  • July 2024 (3210)
  • June 2024 (2908)
  • May 2024 (3025)
  • April 2024 (3132)
  • March 2024 (3115)
  • February 2024 (2893)
  • January 2024 (3169)
  • December 2023 (3031)
  • November 2023 (3021)
  • October 2023 (2352)
  • September 2023 (1900)
  • August 2023 (2009)
  • July 2023 (1878)
  • June 2023 (1594)
  • May 2023 (1716)
  • April 2023 (1657)
  • March 2023 (1737)
  • February 2023 (1597)
  • January 2023 (1574)
  • December 2022 (1543)
  • November 2022 (1684)
  • October 2022 (1617)
  • September 2022 (1310)
  • August 2022 (1676)
  • July 2022 (1375)
  • June 2022 (1458)
  • May 2022 (1297)
  • April 2022 (1464)
  • March 2022 (1491)
  • February 2022 (1249)
  • January 2022 (1282)
  • December 2021 (1663)
  • November 2021 (3139)
  • October 2021 (3253)
  • September 2021 (3136)
  • August 2021 (732)
Powered by Blogger.