Dive into anti analysis of Emotet loader

ZYWU
2 min readMar 31, 2019

--

We discussed the cryptor in the previous post. As for the loader part, we are going to document some carefully designs, which are use to evade security products.

Encrypt partial data at the beginning of the buffer.
The cryptor procedure decrypts a buffer that contains API names, payloads, and loader.

Later the loader decrypts the first few bytes to correct API name, and used by loader itself.

My guess is, some security products scan the newly allocated memory to match the heuristic patterns. By encrypting first few bytes, it makes the confusion.

Also, the following scripts is available for decrypting payload:

Carefully setting the payload’s metadata in LDR_MODULE and PEB.

The sample doesn’t do process injection to other process, instead it runs the payload in its own process.

It inserts the new value to the entry point, dll base, size of image to LDR_MODULE.

Correcting the image base of PEB.

My guess is — to make the process looks normal in order to evade scanning from security products.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

ZYWU
ZYWU

No responses yet

Write a response