General

  • Target
    42a7a7f00c5bc728b55b49a20d8266a84df393c363da27299b3c159de418cb26.bin.exe
  • Size 525KB
  • Sample261110-n58yzsxt7r
  • SHA256 42a7a7f00c5bc728b55b49a20d8266a84df393c363da27299b3c159de418cb26
  • MD5 SHA1 SHA512 SSDEEP TLSH

Malware Config

Extracted

Path
  • C:\Users\Admin\AppData\Local\Temp\pip-target-hxndtk32\lib\python\Crypto\Cipher\__pycache__\_mode_siv.cpython-312.pyc

Ransom Note
  • � ����{�j�4����������������������������d�Z�ddlmZ�ddlmZ�ddlmZmZmZm Z �dgZ ddl m Z �ddl mZ�ddlmZ�dd lmZ�dd lmZ�erdd lmZ�eeeef���Z�G�d ��d�������Zd ��Zy)z- Synthetic Initialization Vector (SIV) mode. �����)� annotations)�compare_digest)� TYPE_CHECKING�Optional�Union�overload�SivMode)� unhexlify)�Method)�_S2V)� is_buffer)� bytes_to_long)� ModuleTypec�������������������������e�Zd�ZdZdd�Zd��Zdd�Zdd�Zdd�Zdd�Z dd�Z dd �Z dd �Z e dd ���������Ze � � � � � �dd ���������Z �d � � � � �dd�Ze dd���������Ze � � � � � � � �dd���������Z �d � � � � � � �d d�Zy )!r ���a���Synthetic Initialization Vector (SIV). This is an Authenticated Encryption with Associated Data (`AEAD`_) mode. It provides both confidentiality and authenticity. The header of the message may be left in the clear, if needed, and it will still be subject to authentication. The decryption step tells the receiver if the message comes from a source that really knows the secret key. Additionally, decryption detects if any part of the message - including the header - has been modified or corrupted. Unlike other AEAD modes such as CCM, EAX or GCM, accidental reuse of a nonce is not catastrophic for the confidentiality of the message. The only effect is that an attacker can tell when the same plaintext (and same associated data) is protected with the same key. The length of the MAC is fixed to the block size of the underlying cipher. The key size is twice the length of the key of the underlying cipher. This mode is only available for AES ciphers. +--------------------+---------------+-------------------+ | Cipher | SIV MAC size | SIV key length | | | (bytes) | (bytes) | +====================+===============+===================+ | AES-128 | 16 | 32 | +--------------------+---------------+-------------------+ | AES-192 | 16 | 48 | +--------------------+---------------+-------------------+ | AES-256 | 16 | 64 | +--------------------+---------------+-------------------+ See `RFC5297`_ and the `original paper`__. .. _RFC5297: https://tools.ietf.org/html/rfc5297 .. _AEAD: http://blog.cryptographyengineering.com/2012/05/how-to-choose-authenticated-encryption.html .. __: http://www.cs.ucdavis.edu/~rogaway/papers/keywrap.pdf c�����������������t����|j�������������������|�_��������� �||�_��������||�_��������t��������|�������dvrt ��������dt��������|�������z����������|�@t ��������|�������s t ��������d��������t��������|�������dk(��r t ��������d��������t��������|�������|�_�������� �t��������|�������dz��}d�|�_ ��������t��������|d�|�||�j��������������������������|�_ ��������||d��|�_ ���������|j������������������|d�|�|j������������������fi�|���t��������j ������������������t��������j"������������������t��������j$������������������t��������j&������������������t��������j(������������������g|�_��������y�)N)� ����0����@���zIncorrect key length (%d bytes)z?When provided, the nonce must be bytes, bytearray or memoryviewr���z*When provided, the nonce must be non-empty����)� ciphermod� cipher_params)� block_size�_factory�_cipher_params�len� ValueErrorr ���� TypeError�bytes�nonce�_mac_tagr ����_kdf�_subkey_cipher�new�MODE_ECBr ����UPDATE�ENCRYPT�DECRYPT�DIGEST�VERIFY�_next)�self�factory�keyr����kwargs� subkey_sizes��� �[C:\Users\Admin\AppData\Local\Temp\pip-target-hxndtk32\lib\python\Crypto/Cipher/_mode_siv.py�__init__zSivMode.__init__D���s�����!�,�,���@��� �$��� �s�8�<� '��>��S��I�J� J� � ��U�#�� a�b�b��5�z�Q�� �!M�N�N��u��D�J� ���#�h�!�m� �)-�� ���\�k�*�g�T�M`�M`�a�� �!�+�,�/���� �� � �C� ��%�w�'7�'7�B�6�B���m�m�V�^�^�V�^�^�V�]�]�TZ�Ta�Ta�b�� �����c�����������������������t��������|�������}|dz��}�|�j������������������j������������������|�j������������������|�j������������������j������������������f|dd�|�j ��������������������S�)z*Create a new CTR cipher from V in SIV model �������������r2���)� initial_valuer���)r���r���r#���r"����MODE_CTRr���)r+����v�v_int�qs��� r0����_create_ctr_cipherzSivMode._create_ctr_cipherf���s`��������a� �� �6� 6�� �t�}�}� � � � � ����!7�!7� �GH�PS� �W[�Wj�Wj� �� r2���c�����������������.����t���������j������������������|�j������������������vr t��������d��������t���������j������������������t���������j������������������t���������j ������������������t���������j ������������������t���������j������������������g|�_��������|�j������������������j������������������|��������|�S�)a���Protect one associated data component For SIV, the associated data is a sequence (*vector*) of non-empty byte strings (*components*). This method consumes the next component. It must be called once for each of the components that constitue the associated data. Note that the components have clear boundaries, so that: >>> cipher.update(b"builtin") >>> cipher.update(b"securely") is not equivalent to: >>> cipher.update(b"built") >>> cipher.update(b"insecurely") If there is no associated data, this method must not be called. Args: component (bytes/bytearray/memoryview): The next associated data component. z<update() can only be called immediately after initialization) r ���r%���r*���r���r&���r'���r(���r)���r!����update)r+���� components��� r0���r;���zSivMode.updateo���s`������4� �=�=�� � � *��Z�[� [��m�m�V�^�^�V�^�^�V�]�]�TZ�Ta�Ta�b�� � � � ����#�� r2���c����������������������t��������d��������)z� For SIV, encryption and MAC authentication must take place at the same point. This method shall not be used. Use `encrypt_and_digest` instead. zEencrypt() not allowed for SIV mode. Use encrypt_and_digest() instead.�r����r+���� plaintexts��� r0����encryptzSivMode.encrypt�������������_�`�`r2���c����������������������t��������d��������)z� For SIV, decryption and verification must take place at the same point. This method shall not be used. Use `decrypt_and_verify` instead. zEdecrypt() not allowed for SIV mode. Use decrypt_and_verify() instead.r>���)r+���� ciphertexts��� r0����decryptzSivMode.decrypt����rB���r2���c�����������������������t���������j������������������|�j������������������vr t��������d��������t���������j������������������g|�_��������|�j�������������������|�j ������������������j ��������������������������|�_��������|�j������������������S�)a ��Compute the *binary* MAC tag. The caller invokes this function at the very end. This method returns the MAC that shall be sent to the receiver, together with the ciphertext. Returns: the MAC, as a byte string. zAdigest() cannot be called when decrypting or validating a message)r ���r(���r*���r���r ���r!����derive�r+���s��� r0����digestzSivMode.digest����sU������� �=�=�� � � *��_�`� `��m�m�_�� � �=�=� � �I�I�,�,�.�D�M��}�}�r2���c�����������������>�����|�j��������������������������j��������������������������S�)z�Compute the *printable* MAC tag. This method is like `digest`. Returns: the MAC, as a hexadecimal string. )rI����hexrH���s��� r0���� hexdigestzSivMode.hexdigest����s��������{�{�}� � �"�"r2���c���������������������t���������j������������������|�j������������������vr t��������d��������t���������j������������������g|�_��������|�j�������������������|�j ������������������j ��������������������������|�_��������t��������|�j������������������|�������s t��������d��������y)a<��Validate the *binary* MAC tag. The caller invokes this function at the very end. This method checks if the decrypted message is indeed valid (that is, if the key is correct) and it has not been tampered with while in transit. Args: received_mac_tag (bytes/bytearray/memoryview): This is the *binary* MAC, as received from the sender. Raises: ValueError: if the MAC does not match. The message has been tampered with or the key is incorrect. z3verify() cannot be called when encrypting a messageNzMAC check failed) r ���r)���r*���r���r ���r!���rG���r���r���)r+����received_mac_tags��� r0����verifyzSivMode.verify����sk������$� �=�=�� � � *��Q�R� R��m�m�_�� � �=�=� � �I�I�,�,�.�D�M��d�m�m�-=�>��/�0� 0��?r2���c�����������������8�����|�j������������������t��������|���������������y)ak��Validate the *printable* MAC tag. This method is like `verify`. Args: hex_mac_tag (string): This is the *printable* MAC, as received from the sender. Raises: ValueError: if the MAC does not match. The message has been tampered with or the key is incorrect. N)rO���r ���)r+���� hex_mac_tags��� r0���� hexverifyzSivMode.hexverify����s������� � � �I�k�*�+r2���c�����������������������y��N��r?���s��� r0����encrypt_and_digestzSivMode.encrypt_and_digest����s������LOr2���c�����������������������y�rT���rU���)r+���r@����outputs��� r0���rV���zSivMode.encrypt_and_digest����s�������!r2���Nc����������������������t���������j������������������|�j������������������vr t��������d��������t���������j������������������g|�_��������t ��������|�d�������r%|�j ������������������j������������������|�j��������������������������|�j ������������������j������������������|��������|�j ������������������j��������������������������|�_ ��������|�j������������������|�j�������������������������}|j������������������||��������|�j������������������fS�)a)��Perform encrypt() and digest() in one step. Args: plaintext (bytes/bytearray/memoryview): The piece of data to encrypt. Keyword Args: output (bytearray/memoryview): The location where the ciphertext must be written to. If ``None``, the ciphertext is returned. Returns: The tuple ``(ciphertext, tag)``, both ``bytes``. The ciphertext is ``None`` when the ``output`` parameter specified a location for the result. z@encrypt() can only be called after initialization or an update()r����rX���) r ���r&���r*���r���r(����hasattrr!���r;���r���rG���r ���r9���rA���)r+���r@���rX����ciphers��� r0���rV���zSivMode.encrypt_and_digest����s�������$� �>�>���� +��^�_� _��m�m�_�� �� �4�� !� �I�I� � �T�Z�Z� (� � � ����#�� � �(�(�*�� ��(�(����7���~�~�i��~�7����F�Fr2���c�����������������������y�rT���rU���)r+���rD����mac_tags��� r0����decrypt_and_verifyzSivMode.decrypt_and_verify��s������PSr2���c�����������������������y�rT���rU���)r+���rD���r^���rX���s��� r0���r_���zSivMode.decrypt_and_verify��s�������r2���c����������������������t���������j������������������|�j������������������vr t��������d��������t���������j������������������g|�_��������|�j ������������������|�������|�_��������|�j ������������������j������������������||��������}t��������|�d�������r%|�j������������������j������������������|�j��������������������������|�j������������������j������������������|�|n|��������|�j������������������|��������|S�)a���Perform decryption and verification in one step. A cipher object is stateful: once you have decrypted a message you cannot decrypt (or encrypt) another message with the same object. You cannot reuse an object for encrypting or decrypting other data with the same key. This function does not remove any padding from the plaintext. Args: ciphertext (bytes/bytearray/memoryview): The piece of data to decrypt. It can be of any length. mac_tag (bytes/bytearray/memoryview): This is the *binary* MAC, as received from the sender. Keyword Args: output (bytearray/memoryview): The location where the plaintext must be written to. If ``None``, the plaintext is returned. Returns: the plaintext as ``bytes`` or ``None`` when the ``output`` parameter specified a location for the result. Raises: ValueError: if the MAC does not match. The message has been tampered with or the key is incorrect. z@decrypt() can only be called after initialization or an update()rZ���r���) r ���r'���r*���r���r)���r9����_cipherrE���r[���r!���r;���r���rO���)r+���rD���r^���rX���r@���s��� r0���r_���zSivMode.decrypt_and_verify��s�������B� �>�>���� +��^�_� _��m�m�_�� ���.�.�w�7�� ��L�L�(�(��F�(�C� � �4�� !� �I�I� � �T�Z�Z� (� � � ���f�n��&�A� � � �G���r2���) r,���r���r-����Bufferr���rc���r.����dict�return�None)r<���rc���re���r ���)r@���rc���re���r���)rD���rc���re���r���)re���r���)re����str)rN���rc���re���rf���)rQ���rg���re���rf���)r@���rc���re���ztuple[bytes, bytes])r@���rc���rX����Union[bytearray, memoryview]re���ztuple[None, bytes]rT���)r@���rc���rX����&Optional[Union[bytearray, memoryview]]re���ztuple[Optional[bytes], bytes])rD���rc���r^���rc���re���r���)rD���rc���r^���rc���rX���rh���re���rf���)rD���rc���r^���rc���rX���ri���re���zOptional[bytes])�__name__� __module__� __qualname__�__doc__r1���r9���r;���rA���rE���rI���rL���rO���rR���r���rV���r_���rU���r2���r0���r ���r ������s �����%�N c�D � �Da�a��&#�1�8,� ��O���O� �!��!�)E�!� �!���!� �SW�G��G�)O�G� &�G�B��S���S� �� ��+1��;W�� ����� �ei�/� �/�+1�/�;a�/� �/r2���c�������������� ��������� �|j������������������d�������}|j������������������dd�������}t ��������|�|||�������S�#�t��������$�r}t��������dt��������|�������z�����������d}~ww�xY�w)a^��Create a new block cipher, configured in Synthetic Initializaton Vector (SIV) mode. Args:

Targets

    • Target
      42a7a7f00c5bc728b55b49a20d8266a84df393c363da27299b3c159de418cb26.bin.exe
    • Size 525KB
    • SHA256 42a7a7f00c5bc728b55b49a20d8266a84df393c363da27299b3c159de418cb26
    • MD5 SHA1 SHA512 SSDEEP TLSH
    • Command and Scripting Interpreter: PowerShell

      Run Powershell and hide display window.

    • Executes dropped EXE

    • Loads dropped DLL

    • Reads WinSCP keys stored on the system

      Tries to access WinSCP stored sessions.

    • Reads data files stored by FTP clients

      Tries to access configuration files associated with programs like FileZilla.

    • Reads user/profile data of web browsers

      Infostealers often target stored browser data, which can include saved credentials etc.

    • Unsecured Credentials: Credentials In Files

      Steal credentials from unsecured files.

    • Accesses cryptocurrency files/wallets, possible credential harvesting

MITRE ATT&CK Enterprise v16

Tasks