Reversing Conti Ransomware

Static and Dynamic Analysis.

Introduction:

In this particular blog Arkbird and i are analyzing the two versions of Conti Ransomware Version 2 (v2) and Version 3 (v3).

Conti Ransom (v2) Analysis:

Static Analysis(Basic):
Hash’s:
Hash’s of Conti v2 Ransom.
Libraries:
lib’s used in Conti Malware.
Strings:
Strings found during static analysis of Conti Ransom v2.
Imports:
Static Analysis(Advanced)
entry function:
<a href="https://medium.com/media/217f0b88984b2871bc80c3880251874b/href">https://medium.com/media/217f0b88984b2871bc80c3880251874b/href</a>Graph of entry function of Conti v2 ransom.
stack_ops function:
<a href="https://medium.com/media/ac58a3e5b134fdc3d7158cc292a5e4a6/href">https://medium.com/media/ac58a3e5b134fdc3d7158cc292a5e4a6/href</a>Graph of stack_ops function.
scrambling function:
<a href="https://medium.com/media/90792674554925fbd1f13317750b77b5/href">https://medium.com/media/90792674554925fbd1f13317750b77b5/href</a>Graph of scrambling function.
xor_and_heap_ops function:
<a href="https://medium.com/media/cab0b6abbc14a796b3f5db9466f24545/href">https://medium.com/media/cab0b6abbc14a796b3f5db9466f24545/href</a>graph of of xor_and_heap_ops function.
write_payload_fetch_some_module_abort_ps function:
<a href="https://medium.com/media/0b6b2f700b6431f5f668b41bfad5bc46/href">https://medium.com/media/0b6b2f700b6431f5f668b41bfad5bc46/href</a>graph of of write_payload_fetch_some_module_abort_ps function.
load_kernel32_fetch_thread_ps_info function:
<a href="https://medium.com/media/44beb273dde3278759ba08721a68c02d/href">https://medium.com/media/44beb273dde3278759ba08721a68c02d/href</a>graph of load_kernel32_fetch_thread_ps_info function.
scrambling function:
<a href="https://medium.com/media/f8e11fd827ecc5b84b873cee76f005a1/href">https://medium.com/media/f8e11fd827ecc5b84b873cee76f005a1/href</a>graph of scrambling function.
get_starup_info_of_sys function:
<a href="https://medium.com/media/f6649919bac86b20041019839475cf57/href">https://medium.com/media/f6649919bac86b20041019839475cf57/href</a>graph of get_starup_info_of_sys function.
write_payload_pop_from_counter_reg function:
<a href="https://medium.com/media/e8a4c09968f12187b380bbfc01ae6a39/href">https://medium.com/media/e8a4c09968f12187b380bbfc01ae6a39/href</a>graph of write_payload_pop_from_counter_reg function.
unhooking_scarmble_ops function:
<a href="https://medium.com/media/c373a98b77763a354470a4bb9b7db7ee/href">https://medium.com/media/c373a98b77763a354470a4bb9b7db7ee/href</a>graph of unhooking_scarmble_ops function.
encrypting function:
<a href="https://medium.com/media/c2ce0446837b28d3154ad2e1b04bae61/href">https://medium.com/media/c2ce0446837b28d3154ad2e1b04bae61/href</a>graph of of encrypting function.

xor_func_smnthg_encrypt function:

<a href="https://medium.com/media/cbde42bae28bf93053a9d8190de74442/href">https://medium.com/media/cbde42bae28bf93053a9d8190de74442/href</a>graph of of xor_func_smnthg_encrypt function.
hook_around function:
<a href="https://medium.com/media/5eb1ddec53774c56d03ea603d94adb94/href">https://medium.com/media/5eb1ddec53774c56d03ea603d94adb94/href</a>graph of hook_around function.
callr_of_cs_ps_ops_unhooking function:
<a href="https://medium.com/media/9d22d52e07971c9002064384014a098b/href">https://medium.com/media/9d22d52e07971c9002064384014a098b/href</a>graph of callr_of_cs_ps_ops_unhooking function.
call_cs&ps_ops function:
<a href="https://medium.com/media/a4fadd0a00b8ff72601b1e868f0bca6f/href">https://medium.com/media/a4fadd0a00b8ff72601b1e868f0bca6f/href</a>graph of of call_cs&ps_ops function.
free_up_stack function:
<a href="https://medium.com/media/937ebb768b4537e027d0645306156404/href">https://medium.com/media/937ebb768b4537e027d0645306156404/href</a>graph of of free_up_stack function.

Conti Ransom (v3) Analysis:

Static Analysis(Basic):
Hash’s:
Hash’s of Conti ransom v3.
Imports:
Imports of Conti Ransom v3.
Static Analysis(Advanced)
entry function:
<a href="https://medium.com/media/d19c4b6626e923bc9934a00a42341217/href">https://medium.com/media/d19c4b6626e923bc9934a00a42341217/href</a>Graph of entry function of v3 Conti Ransom.
fetch_sys_info function:
<a href="https://medium.com/media/2fe042d25cfa934cbd2b109abe32aaa4/href">https://medium.com/media/2fe042d25cfa934cbd2b109abe32aaa4/href</a>Graph of of fetch_sys_info function.
encrypt_xor_ops function:
<a href="https://medium.com/media/6365ababf3296d9aed248c3aed8b085a/href">https://medium.com/media/6365ababf3296d9aed248c3aed8b085a/href</a>Graph of encrypt_xor_ops function.
pop_scamble_or_xor:
<a href="https://medium.com/media/51eef5b3b7eb655bbd6626ed7bf08b7f/href">https://medium.com/media/51eef5b3b7eb655bbd6626ed7bf08b7f/href</a>Graph of pop_scamble_or_xor function.
main function:
<a href="https://medium.com/media/e4503b8e5ae847d8d0a3cdf9ab7fcf9e/href">https://medium.com/media/e4503b8e5ae847d8d0a3cdf9ab7fcf9e/href</a>graph of main function.
pop_rg_vals_from_stack function:
<a href="https://medium.com/media/2f27c68e0b9b186ac3d4c29b68fab2ce/href">https://medium.com/media/2f27c68e0b9b186ac3d4c29b68fab2ce/href</a>graph of pop_rg_vals_from_stack function.
Dynamic Analysis:

While running .exe dynamically following are the IPs that are hosting this ransom.

C2 server:
malware traffic from these IPs.
Yara Rule for v3 Conti Ransom:
<a href="https://medium.com/media/2fd8375a5a54195d3d71245a227d0bfe/href">https://medium.com/media/2fd8375a5a54195d3d71245a227d0bfe/href</a>

Conclusion:

As from our discussion, we can conclude that main part of (v2) loader is very much similar to emotet and its not much likely to focus on whereas it had become difficult to analyze the sample in October as it shows that this Conti Ransom Group had been very active during that time interval and had migrated to (v3).

That’s all for today.

Article Link: https://medium.com/@0xthreatintel/reversing-conti-ransomware-bfce15019e74?source=rss-a15183055fd6------2