{"id":23785,"date":"2024-10-11T15:09:47","date_gmt":"2024-10-11T13:09:47","guid":{"rendered":"https:\/\/www.nextron-systems.com\/?p=23785"},"modified":"2025-01-29T15:37:33","modified_gmt":"2025-01-29T14:37:33","slug":"in-depth-analysis-of-lynx-ransomware","status":"publish","type":"post","link":"https:\/\/www.nextron-systems.com\/2024\/10\/11\/in-depth-analysis-of-lynx-ransomware\/","title":{"rendered":"In-Depth Analysis of Lynx Ransomware"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; da_disable_devices=&#8221;off|off|off&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221; da_is_popup=&#8221;off&#8221; da_exit_intent=&#8221;off&#8221; da_has_close=&#8221;on&#8221; da_alt_close=&#8221;off&#8221; da_dark_close=&#8221;off&#8221; da_not_modal=&#8221;on&#8221; da_is_singular=&#8221;off&#8221; da_with_loader=&#8221;off&#8221; da_has_shadow=&#8221;on&#8221;][et_pb_row _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2 style=\"margin-top: 0; padding-top: 0;\">Introduction<\/h2>\n<p>Lynx ransomware is a newly emerged and sophisticated malware threat that has been active since mid-2024. Lynx ransomware has claimed over 20 victims across a range of industries. Once it infiltrates a system, it encrypts critical files, appending a &#8216;.lynx&#8217; extension, and deletes backup files like shadow copies to hinder recovery.<\/p>\n<p>Uniquely, it also sends the ransom note to available printers, adding an unexpected element to its attack strategy.<\/p>\n<p>This malware shares similarities with previous INC ransomware, indicating that they bought INC ransomware source code.<\/p>\n<p>The first sample was identified by <a href=\"https:\/\/x.com\/rivitna2\/status\/1817681737251471471\" target=\"_blank\" rel=\"noopener\">rivitna2<\/a>, checking <a href=\"https:\/\/www.virustotal.com\/gui\/file\/eaa0e773eb593b0046452f420b6db8a47178c09e6db0fa68f6a2d42c3f48e3bc\/detection\">VT<\/a> showed it had only 26 detections which is a low detection rate for a ransomware sample,so we decided to dive deeper.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/f980cc24-d90c-4ebb-92af-85fe2ca7fed4.png&#8221; title_text=&#8221;f980cc24-d90c-4ebb-92af-85fe2ca7fed4&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]Note: Rapid7 wrote a quick analysis on a Lynx ransomware sample highlighting some of its functionalities, check the blog <a target=\"_blank\" href=\"https:\/\/www.rapid7.com\/blog\/post\/2024\/09\/12\/ransomware-groups-demystified-lynx-ransomware\/\" rel=\"noopener\">here<\/a>.<\/p>\n<h2>Overview<\/h2>\n<p>Lynx ransomware employs a variety of techniques such as:<\/p>\n<ul>\n<li>Terminating processes and services.<\/li>\n<li>Directory enumeration.<\/li>\n<li>Privilege escalation.<\/li>\n<li>Deleting shadow copies.<\/li>\n<li>Encrypting all mounted drives and shared folders.<\/li>\n<li>Changing the background image.<\/li>\n<li>Printing the ransomware note.<\/li>\n<\/ul>\n<p>By default when executed the ransomware will encrypt every file on the system but in addition to that it also allows the attacker to customize the ransomware behaviour via command line flags which are highlighted below :<\/p>\n<table style=\"margin-bottom: 20px;\">\n<tbody>\n<tr>\n<td>&#8211;file <filepath><\/filepath><\/td>\n<td>Encrypt specified file<\/td>\n<\/tr>\n<tr>\n<td>&#8211;dir <dirpath><\/dirpath><\/td>\n<td>Encrypt specified directory<\/td>\n<\/tr>\n<tr>\n<td>&#8211;help<\/td>\n<td>Print every argument and it`s usage<\/td>\n<\/tr>\n<tr>\n<td>&#8211;verbose<\/td>\n<td>Enable verbosity<\/td>\n<\/tr>\n<tr>\n<td>&#8211;stop-processes<\/td>\n<td>stop processes via RestartManager<\/td>\n<\/tr>\n<tr>\n<td>&#8211;encrypt-network<\/td>\n<td>Encrypt network shares<\/td>\n<\/tr>\n<tr>\n<td>&#8211;load-drives<\/td>\n<td>Mount available volumes<\/td>\n<\/tr>\n<tr>\n<td>&#8211;hide-cmd<\/td>\n<td>Hide console window (not used)<\/td>\n<\/tr>\n<tr>\n<td>&#8211;no-background<\/td>\n<td>Don&#8217;t change background image<\/td>\n<\/tr>\n<tr>\n<td>&#8211;no-print<\/td>\n<td>Don&#8217;t print note on printers<\/td>\n<\/tr>\n<tr>\n<td>&#8211;kill<\/td>\n<td>Kill processes &amp; services<\/td>\n<\/tr>\n<tr>\n<td>&#8211;safe-mode<\/td>\n<td>Enter safe-mode (not used)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>A comprehensive list of Indicators of Compromise (IOCs) is available at the end of this article.<\/p>\n<p>In the next section, we will take a closer look at Lynx ransomware and analyze its inner workings, including key aspects such as its encryption implementation and file processing methods.<\/p>\n<h2>Full Ransomware Analysis<\/h2>\n<p>The ransomware starts by calling main function and assigning flags based on the parameters passed to the ransomware.<\/p>\n<h3>Terminate Process<\/h3>\n<p>Passing the kill flag, the malware begins by enumerating all running processes and terminates any process whose name contains any of the following words:<\/p>\n<ul>\n<li>sql<\/li>\n<li>veeam<\/li>\n<li>backup<\/li>\n<li>exchange<\/li>\n<li>java<\/li>\n<li>notepad<\/li>\n<\/ul>\n<p>First, CreateToolhelp32Snapshot is called with the TH32CS_SNAPPROCESS flag to capture a snapshot of all processes in the system. Passing 0 indicates that all processes are included.<\/p>\n<p>Next, Process32FirstW retrieves information about the first process in the snapshot and stores it in the pe structure.<\/p>\n<p>For each process, the code compares its name (pe.szExeFile) with the target process names array using a case-insensitive search function.<\/p>\n<p>If a process name matches, OpenProcess is called with the PROCESS_TERMINATE flag to obtain a handle to the process.<\/p>\n<p>Finally, TerminateProcess is called to terminate the matched process.[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/2.png&#8221; title_text=&#8221;2&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; hover_enabled=&#8221;0&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<h3>Enumerate Services Function<\/h3>\n<p>The function enumerates and terminates services along with its dependent services, if the display name or service name contains any of the words mentioned above.<\/p>\n<p>OpenSCManagerW is used to obtain a handle to the service control manager database with full access permissions.<\/p>\n<p>The services are enumerated and stored in lpServices.<\/p>\n<p>A loop processes each service in the list, checking if it matches any of the target service names.<\/p>\n<p>If a match is found, stop_services is called to stop the service along with its dependent services.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/2d64fc15-12e6-4ad8-bb4b-1e1cfa5e03ae.png&#8221; title_text=&#8221;2d64fc15-12e6-4ad8-bb4b-1e1cfa5e03ae&#8221; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Stop Services Function<\/h3>\n<p>The function attempts to stop a specified service along with its dependent services.<\/p>\n<p>OpenSCManagerW is used to obtain a handle to the Service Control Manager with full access permissions.<\/p>\n<p>OpenServiceW is used to open the specified service with the required access rights (SERVICE_QUERY_STATUS, SERVICE_ENUMERATE_DEPENDENTS, and SERVICE_STOP).<\/p>\n<p>QueryServiceStatusEx is used to query the current status of the service.<\/p>\n<p>The dependent services are enumerated and stopped recursively by calling stop_services for each dependent service.<\/p>\n<p>ControlService is called to send a stop command to the service.[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/c27e1131-30ed-44da-b2bf-9ab835c0ab2a.png&#8221; title_text=&#8221;c27e1131-30ed-44da-b2bf-9ab835c0ab2a&#8221; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/58aebdc5-c2fe-49d0-a9a6-6319c3f95b37.png&#8221; title_text=&#8221;58aebdc5-c2fe-49d0-a9a6-6319c3f95b37&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]The ransome note is base64 decoded then it&#8217;s passed to a function to<br \/>\nreplace every occurrence of <code>%id%<\/code> with the victim ID <code>66a204aee7861ae72f21b4e0<\/code><\/p>\n<pre>\nYour data is stolen and encrypted.\nYour unique identificator is %id%\nUse this TOR site to contact with us:\nhttp:\/\/lynxch2k5xi35j7hlbmwl7d6u2oz4vp2wqp6qkwol624cod3d6iqiyqd.onion\/login\n\nUse this email to contact with us:\nmartina.lestariid1898@proton.me\n\nOur blog\n ~ TOR Network: http:\/\/lynxbllrfr5262yvbgtqoyq76s7mpztcqkv6tjjxgpilpma7nyoeohyd.onion\/disclosures\n ~ Mirror #1: http:\/\/lynxblog.net\/ \n<\/pre>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/6.png&#8221; title_text=&#8221;6&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]The malware begins setting up a multi-threaded environment for the encryption operation using the Windows I\/O Completion Port mechanism.<\/p>\n<p>First, the function call populates the SystemInfo structure with information about the current system, such as the number of processors.<\/p>\n<p>The number of threads to be used is set to four times the number of processors in the system. This aims to leverage multi-threading to speed up disk encryption.<\/p>\n<p>An I\/O Completion Port is then created to manage asynchronous I\/O operations.<\/p>\n<p>0xffffffff: This parameter indicates that no file handle is associated with the completion port initially.<br \/>\n0: This parameter specifies that the completion port is not associated with an existing port.<br \/>\n0: The completion key is set to zero, and the last parameter specifies the maximum number of threads that can run concurrently. If it&#8217;s zero, it defaults to the number of processors.<\/p>\n<p>It Creates a thread for each processor to handle I\/O completion.<\/p>\n<p>Each thread runs the Encryption function and uses the CompletionPort for synchronization.<\/p>\n<p>The encryption function will be discussed later.[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/7.png&#8221; title_text=&#8221;7&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Enumerate Directory Function<\/h3>\n<p>The function attempts to create a README.txt file in a specified directory, it uses the FindFirstFileW function in order to find the first file in the directory.<\/p>\n<p>A loop iterates over each file and directory, special directories notations like &#8216;.&#8217; and &#8216;..&#8217; , as well as reparse points, are skipped.<\/p>\n<p>For each file, the function checks if it is a system file or has certain extensions such as &#8216;.exe&#8217;, &#8216;.msi&#8217;, &#8216;.dll&#8217;, &#8216;.lynx&#8217;, if the file does not match these criteria and is not named LYNX or README.txt, it is queued for encryption by creating a new thread.<\/p>\n<p>For each subdirectory, a recursive call to &#8216;enum_dir&#8217; is made.<\/p>\n<p>Special directories like &#8216;windows&#8217;, &#8216;program files&#8217;, and others are skipped to avoid processing system directories.<\/p>\n<p>It Handles &#8220;Program Files&#8221; and &#8220;Program Files (x86)&#8221; separately, for each subdirectory within, a recursive call to &#8216;enum_dir&#8217; searching for &#8220;microsoft sql server&#8221; directory to be encrypted.[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/3e1876ce-e7f7-4070-9373-60acd91c1761.png&#8221; title_text=&#8221;3e1876ce-e7f7-4070-9373-60acd91c1761&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/7584738e-5cfd-4608-84d5-c56fe0f811b3.png&#8221; title_text=&#8221;7584738e-5cfd-4608-84d5-c56fe0f811b3&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/82eabf2a-987e-455f-bc42-0a04b6aa01e5.png&#8221; title_text=&#8221;82eabf2a-987e-455f-bc42-0a04b6aa01e5&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/11.png&#8221; title_text=&#8221;11&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Prepare Encryption Function<\/h3>\n<p>This function performs several tasks:<br \/>\nIt checks if it has write access to the file that is to be encrypted.<\/p>\n<p>If it does not, it attempts privilege escalation and checks again for write access. <\/p>\n<p>If a &#8216;stop_processes_flag&#8217; flag is passed, the function attempts to terminate every process that has an open handle to the file at that moment.<\/p>\n<p>If all these attempts fail, the file will not be encrypted.[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/12-2.png&#8221; title_text=&#8221;12-2&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; hover_enabled=&#8221;0&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<h3>Check Write Access Function<\/h3>\n<p>This function essentially checks if the malware has write access to the file being encrypted.<\/p>\n<p>It does this by writing a dummy data of 36 bytes of the character &#8220;2&#8221; at the end of the file.<\/p>\n<p>It then verifies if the written data is indeed 36 bytes.<\/p>\n<p>If so then the data was written successfully, indicating that the malware has write access to the file.<\/p>\n<p>SetFilePointerEx moves the file pointer to the end of the file.<\/p>\n<p>After writing the data, the file pointer is moved back to its original position.<\/p>\n<p>Finally, SetEndOfFile truncates the file, effectively removing the written data.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/13.png&#8221; title_text=&#8221;13&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; hover_enabled=&#8221;0&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<h3>Privilege Escalation function<\/h3>\n<p>If the write check fails the ransomware will call priv_escalation which tries to enable &#8216;SeTakeOwnershipPrivilege&#8217; on the current process token.<br \/>This privilege will allow the process to take ownership of an object without being granted discretionary access, With this privilege, the user can take ownership of any securable object in the system effectively granting the ransomware write access.<\/p>\n<p>From a code perspective the following is how write access is granted:<\/p>\n<p>1- The function starts by taking ownership of a file or directory and sets its security descriptor to grant full control to a specified group.<br \/>2- AllocateAndInitializeSid is called to create a SID for the specified group.<br \/>3- The EXPLICIT_ACCESS structure is set up to define the permissions (full control) for the new ACL.<br \/>4- SetEntriesInAclW is called to create a new ACL that grants these permissions.<br \/>5- SetNamedSecurityInfoW is used to set the DACL for the file or directory.<br \/>6- A handle to the current process token is opened using OpenProcessToken.<br \/>7- LookupPrivilegeValueW is used to get the LUID for the SeTakeOwnershipPrivilege.<br \/>9- The LUID is needed to adjust the token&#8217;s privileges.<br \/>10- AdjustTokenPrivileges is called to enable the SeTakeOwnershipPrivilege for the current process access token, this privilege is required to change the owner of the file or directory.<br \/>11- SetNamedSecurityInfoW is used again to set the ownership of the file or directory to the specified SID, this step changes the owner of the file or directory to the specified SID, the OWNER_SECURITY_INFORMATION flag is used to specify that the owner is being set.<br \/>12- LookupPrivilegeValueW is used to retrieve the LUID for SeTakeOwnershipPrivilege again, which is needed to disable the privilege in the next step<br \/>13- AdjustTokenPrivileges is used to disable the SeTakeOwnershipPrivilege privilege in the current process&#8217;s access token, returning the token to its original state.<br \/>14- SetNamedSecurityInfoW is used to re-apply the DACL to ensure that the permissions are set correctly.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/14.png&#8221; title_text=&#8221;14&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; hover_enabled=&#8221;0&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<h3>Terminate Process Using Restart Manager Function<\/h3>\n<p>The function terminates every process that has an open handle to the file to be encrypted, it leverages the Restart Manager (RM) API to identify these processes and then terminates them, while avoiding the termination of &#8216;Windows Explorer&#8217;, &#8216;critical system processes&#8217;, and processes that the current user does not have permission to shut down.<\/p>\n<p>RmStartSession initiates a new Restart Manager session.<\/p>\n<p>RmRegisterResources registers the specified file as a resource to be managed within this session.<\/p>\n<p>RmGetList retrieves the list of processes currently using the specified file.<\/p>\n<p>The function then iterates through this list of processes. It ensures that it avoids terminating Windows Explorer (RmExplorer) and critical system processes (RmCritical). For each process, it verifies that the process is not the current one and opens it with PROCESS_TERMINATE access.<\/p>\n<p>It then calls TerminateProcess to terminate the process and waits for the termination to complete using WaitForSingleObject.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/15.png&#8221; title_text=&#8221;15&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]Additionally, the function decodes the ECC public key and passes it to generate_aes_key. It uses the ECC curve25519 to create a shared secret, which is then hashed with SHA512. This hashed value is used as the AES key and is passed to AESKeyExpansion to generate the round keys.<\/p>\n<p>The marker contains the following data of a total of 116 byte that will be appended at the end of the encrypted file:<\/p>\n<ul>\n<li>ECC public key (32 bytes)<\/li>\n<li>SHA512(ECC public key) (64 bytes)<\/li>\n<li>&quot;LYNX&quot;<\/li>\n<li>00 00 00 00 (unknown purpose)<\/li>\n<li>40 42 0F 00  (representing 1,000,000 &#8211; 1MB &#8211; encryption block size)<\/li>\n<li>05 00 00 00 (possibly the encryption block step &#8211; will be explained later ) <\/li>\n<li>01 00 00 00 (number of skipped blocks a block is 5MB)<\/li>\n<\/ul>\n<p>and it sets switch_value to equal 2.[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/6ae585ee-2428-4ca5-9e8c-d8aa1cf2dff6.png&#8221; title_text=&#8221;6ae585ee-2428-4ca5-9e8c-d8aa1cf2dff6&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/08f56af1-3be4-4221-a3d6-57a17972a7b6.png&#8221; title_text=&#8221;08f56af1-3be4-4221-a3d6-57a17972a7b6&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]After setting up the necessary structures and starting the asynchronous read operation, the function calls CreateIoCompletionPort to associate the file handle with the completion port.<\/p>\n<p>As the function performs operations like reading the file, it uses the OVERLAPPED structure to manage asynchronous operations. When an operation completes, it posts a completion packet to the I\/O completion port  indicating that the file is ready for encryption.<\/p>\n<p>The Encryption function waits for these completion packets using GetQueuedCompletionStatus. When it receives a completion packet, it processes the operation based on the switch_value set in the OVERLAPPED structure by prepare_encryption.<\/p>\n<p>The Encryption function receives this packet and transitions to encrypting the file data.[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/18.png&#8221; title_text=&#8221;18&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Encryption Function<\/h3>\n<p>The Encryption function starts by setting up the environment and parameters it needs to operate.<\/p>\n<p>It waits for I\/O completion packets using the GetQueuedCompletionStatus function.<br \/>\nWaiting for I\/O Completion:<\/p>\n<p>The function continuously waits for an I\/O completion packet. When a packet is received, it processes the operation based on the switch_value.<\/p>\n<p>the switch block handles 4 cases:<\/p>\n<ul>\n<li>case 0<\/li>\n<li>case 1<\/li>\n<li>case 2<\/li>\n<li>case 3<\/li>\n<\/ul>\n<p>as mentioned above the switch_value is set to 2, so we start explaning case 2.[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/19.png&#8221; title_text=&#8221;19&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>Case 2 :<\/p>\n<p>The function checks if the read_counter is equal to 0.<\/p>\n<p>read_counter is used to count how many blocks are read\/encrypted.<\/p>\n<p>which leaves us with 2 cases:<\/p>\n<p>1 &#8211; read_counter = 0 indicates that this is our first block to read\/encrypt.<\/p>\n<p>It doesn&#8217;t evaluate next_enc_block_offset.<\/p>\n<p>2 &#8211; read_counter != 0 indicates that it&#8217;s not the first block to read\/encrypt.<\/p>\n<p>if it&#8217;s not the first block to be encrypt, next_enc_block_offset is evaluated, next_enc_block_offset is used to indicate where the next block to be encrypted .<\/p>\n<p>Example:<\/p>\n<p>the malware encrypt 1MB at the start of the file and then encrypt 1MB starting at 6MB , so it skips 5MB every time.<\/p>\n<p>It also write the marker at the end of the file.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/20.png&#8221; title_text=&#8221;20&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]Case 0 :<\/p>\n<p>The function checks if the next_enc_block_offset is bigger than the filesize which means there is no more data to encrypt, and that the read_counter not equal to 0 and that means it&#8217;s not our first encryption block.<br \/>\nif so it then sets switch_code to 3 ( case 3 &#8211; ends the encryption &#8211; no more data to encrypt).<\/p>\n<p>if not then there are more data to be encrypt.[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/21.png&#8221; title_text=&#8221;21&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]Case 1 :<\/p>\n<p>the condition aims to determine how many bytes will be read\/encrypted.<br \/>\nlet&#8217;s break it down with example.[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/22.png&#8221; title_text=&#8221;22&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]let&#8217;s assume we have 6.5 MB of data to be encrypted, remember that there is a marker written at the end of the file (case 2 )so it will be 6.5MB + 0x74 bytes.<\/p>\n<p>The first 1MB will be encrypted normally, and then it start encrypting starting from 6MB which is only the last 0.5MB but the malware reads 1MB each time so it will read 0.5 MB + 0x74 byteS (which we don&#8217;t want it to be encrypted).<\/p>\n<p>The condition is trying to know how to get the right size of data to be written.<\/p>\n<p>it&#8217;s doing a simple math: lpNumberOfBytesRead + next_enc_block_offset &#8211; filesize which for the given example would be:<\/p>\n<p>lpNumberOfBytesRead = 0.5MB + 0x74 bytes<\/p>\n<p>next_enc_block_offset = 6MB<\/p>\n<p>filesize = 6.5 MB<\/p>\n<p>so the result is 0x74 , if the the result is equal to 0x74 it will basically subtract the marker size from lpNumberOfBytesRead and assign that to lpNumberOfBytesWritten, lpNumberOfBytesWritten = 0.5 MB which is what we want.[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/image1.png&#8221; title_text=&#8221;image1&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]It then increments the read_counter, which tracks how many blocks of data have been read to be encrypted.<br \/>\nThe AES-CTR round keys are prepared to encrypt the data.<\/p>\n<p>Case 3 :<\/p>\n<p>It renames the encrypted file to its final name and close all open handles.[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/23.png&#8221; title_text=&#8221;23&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]AES-CTR Encryption resulting keystream is XORed with the plaintext data to produce ciphertext.<\/p>\n<p>The nonce is incremented after each block to ensure a unique keystream for each block.<\/p>\n<p>The encrypted data is written back to the file.[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/24.png&#8221; title_text=&#8221;24&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]The function workflow is as the following:[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/image2.png&#8221; title_text=&#8221;image2&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Delete Shadow Copies Function<\/h3>\n<p>The enc_del_shadow_copies function attempts to delete shadow copies on all available drives and then proceeds to enumerate directories and encrypt them , it although encrypt network shares if the encrypt_network_flag is set.<\/p>\n<p>The function iterates over each possible drive letter (&#8216;A&#8217; to &#8216;Z&#8217;) and uses GetDriveTypeW to determine if the drive is removable, fixed, or remote.<\/p>\n<p>It ignores drives that are not of these types, such as CD-ROM drives or non-existent drives.<\/p>\n<p>CreateFileW is called with paths in the format \\\\?\\A:\\ to create file handles for each drive.<\/p>\n<p>The prefix \\\\?\\ instructs the Windows API to treat the path as a literal string and bypass normal path parsing rules, allowing the application to work with paths longer than MAX_PATH and to include special characters.<\/p>\n<p>The string A: specifies the drive letter, and the :\\ following the drive letter indicates the root directory of that drive.<\/p>\n<p>It attempts to delete shadow copies using DeviceIoControl with the control code 0x53C028 (IOCTL_VOLSNAP_SET_MAX_DIFF_AREA_SIZE), setting the maximum size to 1.<\/p>\n<p>The function enumerates each available drive to be encrypted.[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/25.png&#8221; title_text=&#8221;25&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/26.png&#8221; title_text=&#8221;26&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Encrypt Shared Folders Function<\/h3>\n<p>This function enumerates network shares, processes each shared folder found, and handles nested resources recursively.<\/p>\n<p>WNetOpenEnumW is called to start the enumeration of network resources. It uses RESOURCE_GLOBALNET to enumerate all network resources, RESOURCETYPE_ANY to include all types of resources, and 0x13u for additional options.<\/p>\n<p>WNetEnumResourceW is called in a loop to enumerate network resources. It populates the currentResource buffer with resource information and updates cCount with the number of resources.<\/p>\n<p>For each resource, the loop iterates over the currentResource array.<\/p>\n<p>If the resource&#8217;s display type is RESOURCEDISPLAYTYPE_SHARE, it indicates a shared folder. <\/p>\n<p>enum_dir is called to process the directory corresponding to the shared folder.<\/p>\n<p>If the resource has a scope indicating it is a container (RESOURCEUSAGE_CONTAINER), enc_shared_folders is called recursively to enumerate its contents.<\/p>\n<p>RESOURCEUSAGE_CONTAINER means that this resource is a container and can be further enumerated to find additional resources inside it.<\/p>\n<p>This is commonly seen in network domains, servers, or other hierarchical structures in network environments.[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/27.png&#8221; title_text=&#8221;27&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Mount Volume Function<\/h3>\n<p>The function mounts all available volumes to specific drive letters, ensuring that no drive letters are already occupied. It iterates through an array of drive letters, identifying unoccupied ones indicated by the DRIVE_NO_ROOT_DIR status.<\/p>\n<p>Using FindFirstVolumeW and FindNextVolumeW, the function iterates through all volumes.<\/p>\n<p>It then mounts each volume to an available drive letter from the lpszVolumeMountPoint array using SetVolumeMountPointW.<\/p>\n<p>This process ensures that every drive is mounted, making it possible for them to be encrypted.[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/29.png&#8221; title_text=&#8221;29&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Change Background Function<\/h3>\n<p>It creates a temporary image file named &#8220;background-image.jpg&#8221; in the temp folder. This file contains the ransom note as an image and sets it as the desktop wallpaper.[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/30.png&#8221; title_text=&#8221;30&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/31.png&#8221; title_text=&#8221;31&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Print Ransom Note Function<\/h3>\n<p>The function enumerates every printer connected to the system and sends the ransom note to be printed.<\/p>\n<p>EnumPrintersW is called to retrieve the list of printers.<\/p>\n<p>It iterates through each printer, skipping &#8220;Microsoft Print to PDF&#8221; and &#8220;Microsoft XPS Document Writer&#8221;.<\/p>\n<p>For each remaining printer, it uses StartDocPrinterW to start the document and StartPagePrinter to start a page.<\/p>\n<p>Finally, it uses WritePrinter to send the ransom note to the printer.[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/32.png&#8221; title_text=&#8221;32&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>IDA IDB<\/h3>\n<p>You can take a look at the IDA IDB for more details <a href=\"https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/lynx.idb\">here<\/a>.<\/p>\n<h1>Indicators Of Compromise<\/h1>\n<p>You can find all IOCs and links to the latest version of the detection rules<span>\u00a0<\/span><a href=\"https:\/\/github.com\/NextronSystems\/iocs\/blob\/master\/reports\/lynx_ransomware\/readme.md\">here<\/a>.<\/p>\n<p>LYNX hashes:<\/p>\n<ul>\n<li>eaa0e773eb593b0046452f420b6db8a47178c09e6db0fa68f6a2d42c3f48e3bc<\/li>\n<li>571f5de9dd0d509ed7e5242b9b7473c2b2cbb36ba64d38b32122a0a337d6cf8b<\/li>\n<li>b378b7ef0f906358eec595777a50f9bb5cc7bb6635e0f031d65b818a26bdc4ee<\/li>\n<li>ecbfea3e7869166dd418f15387bc33ce46f2c72168f571071916b5054d7f6e49<\/li>\n<li>85699c7180ad77f2ede0b15862bb7b51ad9df0478ed394866ac7fa9362bf5683<\/li>\n<\/ul>\n<p>INC hashes:<\/p>\n<ul>\n<li>64b249eb3ab5993e7bcf5c0130e5f31cbd79dabdcad97268042780726e68533f<\/li>\n<li>508a644d552f237615d1504aa1628566fe0e752a5bc0c882fa72b3155c322cef<\/li>\n<li>7f104a3dfda3a7fbdd9b910d00b0169328c5d2facc10dc17b4378612ffa82d51<\/li>\n<li>1754c9973bac8260412e5ec34bf5156f5bb157aa797f95ff4fc905439b74357a<\/li>\n<li>d147b202e98ce73802d7501366a036ea8993c4c06cdfc6921899efdd22d159c6<\/li>\n<li>05e4f234a0f177949f375a56b1a875c9ca3d2bee97a2cb73fc2708914416c5a9<\/li>\n<li>fef674fce37d5de43a4d36e86b2c0851d738f110a0d48bae4b2dab4c6a2c373e<\/li>\n<li>36e3c83e50a19ad1048dab7814f3922631990578aab0790401bc67dbcc90a72e<\/li>\n<li>869d6ae8c0568e40086fd817766a503bfe130c805748e7880704985890aca947<\/li>\n<li>ee1d8ac9fef147f0751000c38ca5d72feceeaae803049a2cd49dcce15223b720<\/li>\n<li>f96ecd567d9a05a6adb33f07880eebf1d6a8709512302e363377065ca8f98f56<\/li>\n<li>3156ee399296d55e56788b487701eb07fd5c49db04f80f5ab3dc5c4e3c071be0<\/li>\n<li>fcefe50ed02c8d315272a94f860451bfd3d86fa6ffac215e69dfa26a7a5deced<\/li>\n<li>11cfd8e84704194ff9c56780858e9bbb9e82ff1b958149d74c43969d06ea10bd<\/li>\n<li>02472036db9ec498ae565b344f099263f3218ecb785282150e8565d5cac92461<\/li>\n<li>e17c601551dfded76ab99a233957c5c4acf0229b46cd7fc2175ead7fe1e3d261<\/li>\n<li>9ac550187c7c27a52c80e1c61def1d3d5e6dbae0e4eaeacf1a493908ffd3ec7d<\/li>\n<li>ca9d2440850b730ba03b3a4f410760961d15eb87e55ec502908d2546cd6f598c<\/li>\n<li>1a7c754ae1933338c740c807ec3dcf5e18e438356990761fdc2e75a2685ebf4a<\/li>\n<li>a5925db043e3142e31f21bc18549eb7df289d7c938d56dffe3f5905af11ab97a<\/li>\n<li>7ccea71dcec6042d83692ea9e1348f249b970af2d73c83af3f9d67c4434b2dd0<\/li>\n<li>5a8883ad96a944593103f2f7f3a692ea3cde1ede71cf3de6750eb7a044a61486<\/li>\n<li>1a7c754ae1933338c740c807ec3dcf5e18e438356990761fdc2e75a2685ebf4a<\/li>\n<li>463075274e328bd47d8092f4901e67f7fff6c5d972b5ffcf821d3c988797e8e3<\/li>\n<\/ul>\n<table>\n<thead>\n<tr>\n<th>Key<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Ransomware Note Name<\/td>\n<td>README.txt<\/td>\n<\/tr>\n<tr>\n<td>Extension<\/td>\n<td>.lynx<\/td>\n<\/tr>\n<tr>\n<td>ECC<\/td>\n<td>Curve25519<\/td>\n<\/tr>\n<tr>\n<td>Encryption<\/td>\n<td>AES_CTR<\/td>\n<\/tr>\n<tr>\n<td>Background image<\/td>\n<td>background-image.jpg<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Detection<\/h2>\n<h3>Yara<\/h3>\n<pre>rule MAL_RANSOM_INC_Aug24 {\n   meta:\n      author = \"X__Junior\"\n      description = \"Detects INC ransomware and it's variants like Lynx\"\n      reference1 = \"https:\/\/x.com\/rivitna2\/status\/1817681737251471471\"\n      reference2 = \"https:\/\/twitter.com\/rivitna2\/status\/1701739812733014313\"\n      date = \"2024-08-08\"\n      hash1 = \"eaa0e773eb593b0046452f420b6db8a47178c09e6db0fa68f6a2d42c3f48e3bc\" \/\/ LYNX\n      hash2 = \"1754c9973bac8260412e5ec34bf5156f5bb157aa797f95ff4fc905439b74357a\" \/\/ INC\n      score = 80\n   strings:\n      $s1 = \"tarting full encryption in\" wide\n      $s2 = \"oad hidden drives\" wide\n      $s3 = \"ending note to printers\" ascii\n      $s4 = \"uccessfully delete shadow copies from %c:\/\" wide\n\n      $op1 = { 33 C9 03 C6 83 C0 02 0F 92 C1 F7 D9 0B C8 51 E8 }\n      $op2 = { 8B 44 24 [1-4] 6A 00 50 FF 35 ?? ?? ?? ?? 50 FF 15}\n      $op3 = { 57 50 8D 45 ?? C7 45 ?? 00 00 00 00 50 6A 00 6A 00 6A 02 6A 00 6A 02 C7 45 ?? 00 00 00 00 FF D6 FF 75 ?? E8 ?? ?? ?? ?? 83 C4 04 8B F8 8D 45 ?? 50 8D 45 ?? 50 FF 75 ?? 57 6A 02 6A 00 6A 02 FF D6 }\n      $op4 = { 6A FF 8D 4? ?? 5? 8D 4? ?? 5? 8D 4? ?? 5? 5? FF 15 ?? ?? ?? ?? 85 C0 }\n      $op5 = { 56 6A 00 68 01 00 10 00 FF 15 ?? ?? ?? ?? 8B F0 83 FE FF 74 ?? 6A 00 56 FF 15 ?? ?? ?? ?? 68 88 13 00 00 56 FF 15 ?? ?? ?? ?? 56 FF 15}\n   condition:\n      uint16(0) == 0x5A4D and\n      (\n         3 of ($s*)\n         or 3 of ($op*)\n         or (2 of ($s*) and 2 of ($op*) )\n      )\n}\n<\/pre>\n<h2>Sigma<\/h2>\n<p><a target=\"_blank\" href=\"https:\/\/github.com\/SigmaHQ\/sigma\/blob\/master\/rules\/windows\/registry\/registry_set\/registry_set_desktop_background_change.yml\" rel=\"noopener\">Potentially Suspicious Desktop Background Change Via Registry<\/a><\/p>\n<h3>Appendix A<\/h3>\n<h3>Different encryption modes<\/h3>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/over1.png&#8221; title_text=&#8221;over1&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][\/et_pb_column][\/et_pb_row][et_pb_row _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<div class=\"et_pb_module et_pb_text et_pb_text_38  et_pb_text_align_left et_pb_bg_layout_light\">\n<div class=\"et_pb_text_inner\">\n<div class=\"et_pb_module et_pb_text et_pb_text_16  et_pb_text_align_left et_pb_bg_layout_light\">\n<div class=\"et_pb_text_inner\">\n<h1>Nextron\u2019s Solutions for Enhanced Cybersecurity<\/h1>\n<p>Nextron steps in where traditional security measures might miss threats. Our digital forensics tools conduct thorough analyses of systems that show signs of unusual behavior. They effectively identify risky software and expose a range of threats that could go unnoticed by standard methods.<\/p>\n<p>Our signature collection is tailored to detect a variety of security concerns. This includes hacker tools, their remnants, unusual user activities, hidden configuration settings, and legitimate software that might be misused for attacks. Our approach is especially useful in detecting the tactics used in supply chain attacks and identifying tools that evade Antivirus and EDR systems.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"et_pb_module et_pb_text et_pb_text_39  et_pb_text_align_left et_pb_bg_layout_light\">\n<div class=\"et_pb_text_inner\">\n<h1>Contributors<\/h1>\n<ul>\n<li><a href=\"https:\/\/twitter.com\/X__Junior\" target=\"_blank\" rel=\"noopener\">Mohamed Ashraf<\/a><\/li>\n<\/ul>\n<\/div>\n<\/div>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Lynx ransomware is a newly emerged and sophisticated malware threat that has been active since mid-2024. Lynx ransomware has claimed over 20 victims across a range of industries. Once it infiltrates a system, it encrypts critical files, appending a &#8216;.lynx&#8217; extension, and deletes backup files like shadow copies to hinder recovery. Uniquely, it also sends the ransom note to available printers, adding an unexpected element to its attack strategy. This malware shares similarities with previous INC ransomware, indicating that they bought INC ransomware source code. The first sample was identified by rivitna2, checking VT showed it had only 26 detections which is a low detection rate for a ransomware sample,so we decided to dive deeper.Note: Rapid7 wrote a quick analysis on a Lynx ransomware sample highlighting some of its functionalities, check the blog here. Overview Lynx ransomware employs a variety of techniques such as: Terminating processes and services. Directory enumeration. Privilege escalation. Deleting shadow copies. Encrypting all mounted drives and shared folders. Changing the background image. Printing the ransomware note. By default when executed the ransomware will encrypt every file on the system but in addition to that it also allows the attacker to customize the ransomware behaviour via [&hellip;]<\/p>\n","protected":false},"author":21,"featured_media":23843,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[749,1,760,735],"tags":[90,762,763,124,765,761,764],"class_list":["post-23785","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-homepage","category-nextron","category-recommended","category-research","tag-analysis","tag-inc","tag-lynx","tag-malware","tag-ransom","tag-ransomware","tag-threat-research"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>In-Depth Analysis of Lynx Ransomware - Nextron Systems<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.nextron-systems.com\/2024\/10\/11\/in-depth-analysis-of-lynx-ransomware\/\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.nextron-systems.com\/2024\/10\/11\/in-depth-analysis-of-lynx-ransomware\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.nextron-systems.com\/2024\/10\/11\/in-depth-analysis-of-lynx-ransomware\/\"},\"author\":{\"name\":\"Nextron Threat Research Team\",\"@id\":\"https:\/\/www.nextron-systems.com\/#\/schema\/person\/c85023b02fb7500513bb7464c4d36a96\"},\"headline\":\"In-Depth Analysis of Lynx Ransomware\",\"datePublished\":\"2024-10-11T13:09:47+00:00\",\"dateModified\":\"2025-01-29T14:37:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.nextron-systems.com\/2024\/10\/11\/in-depth-analysis-of-lynx-ransomware\/\"},\"wordCount\":5439,\"publisher\":{\"@id\":\"https:\/\/www.nextron-systems.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.nextron-systems.com\/2024\/10\/11\/in-depth-analysis-of-lynx-ransomware\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/cyb3rops_a_cyber_lynx_glowing_eyes_virus_ransomware_threat_45d399dc-fba0-4d35-b1b2-03120d09f02d.png\",\"keywords\":[\"analysis\",\"inc\",\"lynx\",\"malware\",\"ransom\",\"ransomware\",\"threat research\"],\"articleSection\":[\"Homepage\",\"Nextron\",\"Recommended\",\"Research\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.nextron-systems.com\/2024\/10\/11\/in-depth-analysis-of-lynx-ransomware\/\",\"url\":\"https:\/\/www.nextron-systems.com\/2024\/10\/11\/in-depth-analysis-of-lynx-ransomware\/\",\"name\":\"In-Depth Analysis of Lynx Ransomware - Nextron Systems\",\"isPartOf\":{\"@id\":\"https:\/\/www.nextron-systems.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.nextron-systems.com\/2024\/10\/11\/in-depth-analysis-of-lynx-ransomware\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.nextron-systems.com\/2024\/10\/11\/in-depth-analysis-of-lynx-ransomware\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/cyb3rops_a_cyber_lynx_glowing_eyes_virus_ransomware_threat_45d399dc-fba0-4d35-b1b2-03120d09f02d.png\",\"datePublished\":\"2024-10-11T13:09:47+00:00\",\"dateModified\":\"2025-01-29T14:37:33+00:00\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.nextron-systems.com\/2024\/10\/11\/in-depth-analysis-of-lynx-ransomware\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.nextron-systems.com\/2024\/10\/11\/in-depth-analysis-of-lynx-ransomware\/#primaryimage\",\"url\":\"https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/cyb3rops_a_cyber_lynx_glowing_eyes_virus_ransomware_threat_45d399dc-fba0-4d35-b1b2-03120d09f02d.png\",\"contentUrl\":\"https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/cyb3rops_a_cyber_lynx_glowing_eyes_virus_ransomware_threat_45d399dc-fba0-4d35-b1b2-03120d09f02d.png\",\"width\":1536,\"height\":768},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.nextron-systems.com\/#website\",\"url\":\"https:\/\/www.nextron-systems.com\/\",\"name\":\"Nextron Systems\",\"description\":\"We Detect Hackers\",\"publisher\":{\"@id\":\"https:\/\/www.nextron-systems.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.nextron-systems.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.nextron-systems.com\/#organization\",\"name\":\"Nextron Systems GmbH\",\"url\":\"https:\/\/www.nextron-systems.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.nextron-systems.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2017\/11\/Nextron_0.2s_inv_symbol_only.png\",\"contentUrl\":\"https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2017\/11\/Nextron_0.2s_inv_symbol_only.png\",\"width\":260,\"height\":260,\"caption\":\"Nextron Systems GmbH\"},\"image\":{\"@id\":\"https:\/\/www.nextron-systems.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.nextron-systems.com\/#\/schema\/person\/c85023b02fb7500513bb7464c4d36a96\",\"name\":\"Nextron Threat Research Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.nextron-systems.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/93ef820b74086420190263e5fff9169f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/93ef820b74086420190263e5fff9169f?s=96&d=mm&r=g\",\"caption\":\"Nextron Threat Research Team\"},\"url\":\"https:\/\/www.nextron-systems.com\/author\/threat_research\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"In-Depth Analysis of Lynx Ransomware - Nextron Systems","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.nextron-systems.com\/2024\/10\/11\/in-depth-analysis-of-lynx-ransomware\/","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.nextron-systems.com\/2024\/10\/11\/in-depth-analysis-of-lynx-ransomware\/#article","isPartOf":{"@id":"https:\/\/www.nextron-systems.com\/2024\/10\/11\/in-depth-analysis-of-lynx-ransomware\/"},"author":{"name":"Nextron Threat Research Team","@id":"https:\/\/www.nextron-systems.com\/#\/schema\/person\/c85023b02fb7500513bb7464c4d36a96"},"headline":"In-Depth Analysis of Lynx Ransomware","datePublished":"2024-10-11T13:09:47+00:00","dateModified":"2025-01-29T14:37:33+00:00","mainEntityOfPage":{"@id":"https:\/\/www.nextron-systems.com\/2024\/10\/11\/in-depth-analysis-of-lynx-ransomware\/"},"wordCount":5439,"publisher":{"@id":"https:\/\/www.nextron-systems.com\/#organization"},"image":{"@id":"https:\/\/www.nextron-systems.com\/2024\/10\/11\/in-depth-analysis-of-lynx-ransomware\/#primaryimage"},"thumbnailUrl":"https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/cyb3rops_a_cyber_lynx_glowing_eyes_virus_ransomware_threat_45d399dc-fba0-4d35-b1b2-03120d09f02d.png","keywords":["analysis","inc","lynx","malware","ransom","ransomware","threat research"],"articleSection":["Homepage","Nextron","Recommended","Research"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.nextron-systems.com\/2024\/10\/11\/in-depth-analysis-of-lynx-ransomware\/","url":"https:\/\/www.nextron-systems.com\/2024\/10\/11\/in-depth-analysis-of-lynx-ransomware\/","name":"In-Depth Analysis of Lynx Ransomware - Nextron Systems","isPartOf":{"@id":"https:\/\/www.nextron-systems.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.nextron-systems.com\/2024\/10\/11\/in-depth-analysis-of-lynx-ransomware\/#primaryimage"},"image":{"@id":"https:\/\/www.nextron-systems.com\/2024\/10\/11\/in-depth-analysis-of-lynx-ransomware\/#primaryimage"},"thumbnailUrl":"https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/cyb3rops_a_cyber_lynx_glowing_eyes_virus_ransomware_threat_45d399dc-fba0-4d35-b1b2-03120d09f02d.png","datePublished":"2024-10-11T13:09:47+00:00","dateModified":"2025-01-29T14:37:33+00:00","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.nextron-systems.com\/2024\/10\/11\/in-depth-analysis-of-lynx-ransomware\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.nextron-systems.com\/2024\/10\/11\/in-depth-analysis-of-lynx-ransomware\/#primaryimage","url":"https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/cyb3rops_a_cyber_lynx_glowing_eyes_virus_ransomware_threat_45d399dc-fba0-4d35-b1b2-03120d09f02d.png","contentUrl":"https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2024\/10\/cyb3rops_a_cyber_lynx_glowing_eyes_virus_ransomware_threat_45d399dc-fba0-4d35-b1b2-03120d09f02d.png","width":1536,"height":768},{"@type":"WebSite","@id":"https:\/\/www.nextron-systems.com\/#website","url":"https:\/\/www.nextron-systems.com\/","name":"Nextron Systems","description":"We Detect Hackers","publisher":{"@id":"https:\/\/www.nextron-systems.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.nextron-systems.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.nextron-systems.com\/#organization","name":"Nextron Systems GmbH","url":"https:\/\/www.nextron-systems.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.nextron-systems.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2017\/11\/Nextron_0.2s_inv_symbol_only.png","contentUrl":"https:\/\/www.nextron-systems.com\/wp-content\/uploads\/2017\/11\/Nextron_0.2s_inv_symbol_only.png","width":260,"height":260,"caption":"Nextron Systems GmbH"},"image":{"@id":"https:\/\/www.nextron-systems.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.nextron-systems.com\/#\/schema\/person\/c85023b02fb7500513bb7464c4d36a96","name":"Nextron Threat Research Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.nextron-systems.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/93ef820b74086420190263e5fff9169f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/93ef820b74086420190263e5fff9169f?s=96&d=mm&r=g","caption":"Nextron Threat Research Team"},"url":"https:\/\/www.nextron-systems.com\/author\/threat_research\/"}]}},"_links":{"self":[{"href":"https:\/\/www.nextron-systems.com\/wp-json\/wp\/v2\/posts\/23785","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nextron-systems.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nextron-systems.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nextron-systems.com\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nextron-systems.com\/wp-json\/wp\/v2\/comments?post=23785"}],"version-history":[{"count":28,"href":"https:\/\/www.nextron-systems.com\/wp-json\/wp\/v2\/posts\/23785\/revisions"}],"predecessor-version":[{"id":23863,"href":"https:\/\/www.nextron-systems.com\/wp-json\/wp\/v2\/posts\/23785\/revisions\/23863"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.nextron-systems.com\/wp-json\/wp\/v2\/media\/23843"}],"wp:attachment":[{"href":"https:\/\/www.nextron-systems.com\/wp-json\/wp\/v2\/media?parent=23785"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nextron-systems.com\/wp-json\/wp\/v2\/categories?post=23785"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nextron-systems.com\/wp-json\/wp\/v2\/tags?post=23785"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}