In my last article on Chinoxy backdoor, this version has its configuration in a resource called NNKK and it is deciphered. The purpose of this article is to explain the unpacking and deciphering of the configuration of this backdoor.
The backdoor is loading with the program confax.exe, a utility of Logitech for the Bluetooth.
The function called by confax.exe is LGBT_Launch.
In checking this function,
The entry of the thread is pointed by the address DAT_10011fe0. this address is in the section .bss. This section has rwx and the entropy is very high.
Before the unpack, there are not a call with the function using this resource.
And at the address DAT_10011fe0, there is just data without code.
So the unpack procedure is using the entrypoint of the backdoor, and the code is executing when confax.exe load LBTServ.dll.
The entrypoint of the dll, the function interesting is FUN_10007800.
the code call the function 10007770 with two parameters: an handle on the dll and the key hceqhqn of the xor.
In this function, the xor is at the end of the function after manipulating the the &DAT_1001a7dc for a copy.
the xor function is located at 10007730.
And after the function, if the dll is dumped. We found the good function of the thread and the function manipulating the resource.
So we check the function 10005c50 using this resource called by the thread.
In this function, the ressource is locked and two keys are catching:
The keys are just top of the resource of TYPELIB.
And the deciphered function is the function 10005bf0.
the param1 is the pointer on the resource and the param 2 the number of the step for the loop deciphering.
In python, the algorithm is the following. with the RatDecoders, we found the resource
from malwareconfig import fileparser
rsc = file_info.pe_resource_by_name(‘NNKK’)
res=b’’.join([chr((key_1[i%12] ^ key_2[i%12]) & 0x27 ^ key_1[i%12] ^ rsc[i]).encode() for i in range(0,0x1300)])
we have like result:
with a little cleaning, and base64 ninja, we have the result.
This IOCs has been already done.
the purpose of this article is to explain to unpack quickly the Chinoxy backdoor and retrieve the configuration without reverse the backdoor.
Article Link: https://medium.com/@Sebdraven/how-to-unpack-chinoxy-backdoor-and-decipher-the-configuration-of-the-backdoor-4ffd98ca2a02?source=rss-11d98531eebe------2