General

  • Target

    http://resource.wondershare.com/003/066/97b060c6268fa47896cfa8787bb5703b.exe

  • Sample

    230823-kzs4ssba96

Score
10/10

Malware Config

Extracted

Path

C:\Users\Admin\Downloads\DownloadRes\Crypto\Cipher\is-ABRBO.tmp

Ransom Note
B ������d�"������������������@���st���d�dl�mZ�d�dlZd�dlmZmZ�d�dlZd�dlmZm Z m Z �d�dl m Z �d�dlm Z �G�dd��d�Zd d d �ZdS�) �����)�MGF1N)�bord� _copy_bytes)�ceil_div� bytes_to_long� long_to_bytes)�strxor)�Randomc���������������@���s8���e�Zd�ZdZdd��Zdd��Zdd��Zdd ��Zd d ��Zd S�) �PKCS1OAEP_CipherzXCipher object for PKCS#1 v1.5 OAEP. Do not create directly: use :func:`new` instead.c����������������sN���|��_�|r|��_n tjj��_|r(|��_n��fdd���_tdd|���_|��_dS�)a���Initialize this PKCS#1 OAEP cipher object. :Parameters: key : an RSA key object If a private half is given, both encryption and decryption are possible. If a public half is given, only encryption is possible. hashAlgo : hash object The hash function to use. This can be a module under `Crypto.Hash` or an existing hash object created from any of such modules. If not specified, `Crypto.Hash.SHA1` is used. mgfunc : callable A mask generation function that accepts two parameters: a string to use as seed, and the lenth of the mask to generate, in bytes. If not specified, the standard MGF1 is used (a safe choice). label : bytes/bytearray/memoryview A label to apply to this particular encryption. If not specified, an empty string is used. Specifying a label does not improve security. randfunc : callable A function that returns random bytes. :attention: Modify the mask generation function only if you know what you are doing. Sender and receiver must use the same one. c����������������s���t�|�|��j�S�)N)r����_hashObj)�x�y)�self���FC:\Users\ws\AppData\Local\Temp\tmpjem4nu98\Crypto\Cipher\PKCS1_OAEP.py�<lambda>G��������z+PKCS1OAEP_Cipher.__init__.<locals>.<lambda>N) �_keyr ����CryptoZHashZSHA1�_mgfr����_label� _randfunc)r����key�hashAlgo�mgfunc�label�randfuncr���)r���r����__init__$���s���� zPKCS1OAEP_Cipher.__init__c�������������C���s ���|�j����S�)zVLegacy function to check if you can call :meth:`encrypt`. .. deprecated:: 3.0)r���� can_encrypt)r���r���r���r���r���L���s����zPKCS1OAEP_Cipher.can_encryptc�������������C���s ���|�j����S�)zVLegacy function to check if you can call :meth:`decrypt`. .. deprecated:: 3.0)r���� can_decrypt)r���r���r���r���r���R���s����zPKCS1OAEP_Cipher.can_decryptc�������������C���s����t�jj�|�jj�}t|d�}|�jj}t |�}||�d|��d�}|dk�rPt d��|�j� |�j �� ��}d|�}||�d�tdd|��} |��|�} |��| ||�d��} t| | �} |��| |�} t| | �}d|�| �}t|�}|�j�|�}t||�}|S�) a\��Encrypt a message with PKCS#1 OAEP. :param message: The message to encrypt, also known as plaintext. It can be of variable length, but not longer than the RSA modulus (in bytes) minus 2, minus twice the hash output size. For instance, if you use RSA 2048 and SHA-256, the longest message you can encrypt is 190 byte long. :type message: bytes/bytearray/memoryview :returns: The ciphertext, as large as the RSA modulus. :rtype: bytes :raises ValueError: if the message is too long. ��������r���zPlaintext is too long.���������N����)r����Util�number�sizer����nr���r ���� digest_size�len� ValueError�newr����digestr���r���r���r���r���Z_encryptr���)r����message�modBits�k�hLenZmLenZps_len�lHashZps�dbZros�dbMask�maskedDB�seedMask� maskedSeed�emZem_int�m_int�cr���r���r����encryptX���s(����        zPKCS1OAEP_Cipher.encryptc�������������C���s@��t�jj�|�jj�}t|d�}|�jj}t |�|ks<||d�k�rDt d��t |�}|�j� |�}t ||�}|�j�|�j����}|d�} |d|d���} ||d�d��} |��| |�} t| | �} |��| ||�d��}t| |�}d}||d���d�}|d|��}||kr�d}|dk��r d}t| �dk�rd}|�s,t d��|||�d�d��S�) a5��Decrypt a message with PKCS#1 OAEP. :param ciphertext: The encrypted message. :type ciphertext: bytes/bytearray/memoryview :returns: The original message (plaintext). :rtype: bytes :raises ValueError: if the ciphertext has the wrong length, or if decryption fails the integrity check (in which case, the decryption key is probably wrong). :raises TypeError: if the RSA key has no private half (i.e. you are trying to decrypt using a public key). r ���r!���z!Ciphertext with incorrect length.r���r$���Nr#���zIncorrect decryption.)r���r%���r&���r'���r���r(���r���r ���r)���r*���r+���r���Z_decryptr���r,���r���r-���r���r����findr���)r���Z ciphertextr/���r0���r1���Zct_intr9���r8���r2���r ���r7���r5���r6���Zseedr4���r3���ZvalidZoneZlHash1r���r���r����decrypt����s8����        zPKCS1OAEP_Cipher.decryptN) �__name__� __module__� __qualname__�__doc__r���r���r���r;���r=���r���r���r���r���r ��� ���s ���(6r ���r���c�������������C���s���|dkrt�j}t|�||||�S�)a~��Return a cipher object :class:`PKCS1OAEP_Cipher` that can be used to perform PKCS#1 OAEP encryption or decryption. :param key: The key object to use to encrypt or decrypt the message. Decryption is only possible with a private RSA key. :type key: RSA key object :param hashAlgo: The hash function to use. This can be a module under `Crypto.Hash` or an existing hash object created from any of such modules. If not specified, `Crypto.Hash.SHA1` is used. :type hashAlgo: hash object :param mgfunc: A mask generation function that accepts two parameters: a string to use as seed, and the lenth of the mask to generate, in bytes. If not specified, the standard MGF1 is used (a safe choice). :type mgfunc: callable :param label: A label to apply to this particular encryption. If not specified, an empty string is used. Specifying a label does not improve security. :type label: bytes/bytearray/memoryview :param randfunc: A function that returns random bytes. The default is `Random.get_random_bytes`. :type randfunc: callable N)r ���Zget_random_bytesr ���)r���r���r���r���r���r���r���r���r,�������s���� r,���)NNr���N)ZCrypto.Signature.pssr���ZCrypto.Hash.SHA1r���ZCrypto.Util.py3compatr���r���ZCrypto.Util.numberr���r���r���ZCrypto.Util.strxorr���r ���r ���r,���r���r���r���r����<module>���s���   �.

Extracted

Path

C:\Users\Admin\Downloads\DownloadRes\Crypto\Cipher\is-KSJST.tmp

Ransom Note
B ������dv8������������������@���s����d�Z�dgZddlmZmZ�ddlmZmZ�ddlm Z �ddl m Z m Z �ddl mZ�ddlmZ�dd lmZ�G�d d��de�Zd d ��Zd S�)z- Synthetic Initialization Vector (SIV) mode. �SivMode�����)�hexlify� unhexlify)�bord� _copy_bytes)� is_buffer)� long_to_bytes� bytes_to_long)�_S2V)�BLAKE2s)�get_random_bytesc���������������@���sl���e�Zd�ZdZdd��Zdd��Zdd��Zdd ��Zd d ��Zd d ��Z dd��Z dd��Z dd��Z ddd�Z ddd�ZdS�)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 knowns 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 :undocumented: __init__ c�������������C���s����|j�|�_�||�_||�_t|�dkr0tdt|����|d�k rjt|�sHtd��t|�dkr\td��td�d�|�|�_t|�d�}d�|�_ t |d�|��||�jd�|�_ ||d���|�_ |j |d�|��|jf|��|�j|�j|�j|�j|�jg|�_d�S�)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����)Z ciphermodZ cipher_params)Z block_size�_factory�_cipher_params�len� ValueErrorr���� TypeErrorr����nonce�_mac_tagr ����_kdf�_subkey_cipher�newZMODE_ECB�update�encrypt�decrypt�digest�verify�_next)�self�factory�keyr����kwargsZ subkey_size��r%����EC:\Users\ws\AppData\Local\Temp\tmpjem4nu98\Crypto\Cipher\_mode_siv.py�__init__[���s(����      zSivMode.__init__c�������������C���s4���t�|�}|d@�}|�jj|�j|�jjf|dd�|�j��S�)z*Create a new CTR cipher from V in SIV model ������������������)Z initial_valuer���)r ���r���r���r���ZMODE_CTRr���)r!����vZv_int�qr%���r%���r&����_create_ctr_cipher����s����zSivMode._create_ctr_cipherc�������������C���s:���|�j�|�jkrtd��|�j�|�j|�j|�j|�jg|�_|�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. :Parameters: 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!���Z componentr%���r%���r&���r�������s ����  zSivMode.updatec�������������C���s ���t�d��dS�)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.N)r���)r!���� plaintextr%���r%���r&���r�������s����zSivMode.encryptc�������������C���s ���t�d��dS�)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.N)r���)r!���� ciphertextr%���r%���r&���r�������s����zSivMode.decryptc�������������C���s:���|�j�|�jkrtd��|�j�g|�_|�jdkr4|�j���|�_|�jS�)z�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. :Return: the MAC, as a byte string. zAdigest() cannot be called when decrypting or validating a messageN)r���r ���r���r���r����derive)r!���r%���r%���r&���r�������s ����    zSivMode.digestc�������������C���s���d��dd��|����D���S�)z�Compute the *printable* MAC tag. This method is like `digest`. :Return: the MAC, as a hexadecimal string. ��c�������������S���s���g�|�]}d�t�|���qS�)z%02x)r���)�.0�xr%���r%���r&���� <listcomp>����s����z%SivMode.hexdigest.<locals>.<listcomp>)�joinr���)r!���r%���r%���r&���� hexdigest����s����zSivMode.hexdigestc�������������C���sz���|�j�|�jkrtd��|�j�g|�_|�jdkr4|�j���|�_td�}tjd||�jd�}tjd||d�}|� ��|� ��krvt d��dS�)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. :Parameters: 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 messageN���������)Z digest_bitsr#����datazMAC check failed) r���r ���r���r���r���r.���r ���r ���r���r���r���)r!���Zreceived_mac_tagZsecretZmac1Zmac2r%���r%���r&���r�������s����    zSivMode.verifyc�������������C���s���|���t|���dS�)aW��Validate the *printable* MAC tag. This method is like `verify`. :Parameters: 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)r���r���)r!���Z hex_mac_tagr%���r%���r&���� hexverify��s���� zSivMode.hexverifyNc�������������C���sn���|�j�|�jkrtd��|�jg|�_t|�d�r6|�j�|�j��|�j�|��|�j���|�_ |�� |�j �}|j�||d�|�j fS�)a\��Perform encrypt() and digest() in one step. :Parameters: plaintext : bytes/bytearray/memoryview The piece of data to encrypt. :Keywords: output : bytearray/memoryview The location where the ciphertext must be written to. If ``None``, the ciphertext is returned. :Return: a tuple with two items: - the ciphertext, as ``bytes`` - the MAC tag, as ``bytes`` The first item becomes ``None`` when the ``output`` parameter specified a location for the result. z@encrypt() can only be called after initialization or an update()r���)�output) r���r ���r���r����hasattrr���r���r���r.���r���r+���)r!���r,���r9���Zcipherr%���r%���r&����encrypt_and_digest��s����      zSivMode.encrypt_and_digestc�������������C���sx���|�j�|�jkrtd��|�jg|�_|��|�|�_|�jj�||d�}t|�d�rR|�j�|�j ��|�j�|dkrd|n|��|��|��|S�)aP��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. :Parameters: 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. :Keywords: output : bytearray/memoryview The location where the plaintext must be written to. If ``None``, the plaintext is returned. :Return: 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())r9���r���N) r���r ���r���r���r+���Z_cipherr:���r���r���r���)r!���r-���Zmac_tagr9���r,���r%���r%���r&����decrypt_and_verify6��s����     zSivMode.decrypt_and_verify)N)N)�__name__� __module__� __qualname__�__doc__r'���r+���r���r���r���r���r4���r���r8���r;���r<���r%���r%���r%���r&���r���1���s���(& #   ! $c���������� ���K���s\���y|��d�}W�n2�tk r@�}�ztdt|����W�dd}~X�Y�nX�|��dd�}t|�|||�S�)a-��Create a new block cipher, configured in Synthetic Initializaton Vector (SIV) mode. :Parameters: factory : object A symmetric cipher module from `Crypto.Cipher` (like `Crypto.Cipher.AES`). :Keywords: key : bytes/bytearray/memoryview The secret key to use in the symmetric cipher. It must be 32, 48 or 64 bytes long. If AES is the chosen cipher, the variants *AES-128*, *AES-192* and or *AES-256* will be used internally. nonce : bytes/bytearray/memoryview For deterministic encryption, it is not present. Otherwise, it is a value that must never be reused for encrypting message under this key. There are no restrictions on its length, but it is recommended to use at least 16 bytes. r#���zMissing parameter: Nr���)�pop�KeyErrorr����strr���)r"���r$���r#����er���r%���r%���r&����_create_siv_ciphere��s ����" rE���N)r@����__all__Zbinasciir���r���ZCrypto.Util.py3compatr���r���ZCrypto.Util._raw_apir���ZCrypto.Util.numberr���r ���ZCrypto.Protocol.KDFr ���Z Crypto.Hashr ���Z Crypto.Randomr ����objectr���rE���r%���r%���r%���r&����<module>!���s���    ��6
URLs

https://tools.ietf.org/html/rfc5297

http://blog.cryptographyengineering.com/2012/05/how-to-choose-authenticated-encryption.html

http://www.cs.ucdavis.edu/~rogaway/papers/keywrap.pdf

Targets

    • Target

      http://resource.wondershare.com/003/066/97b060c6268fa47896cfa8787bb5703b.exe

    Score
    10/10
    • Downloads MZ/PE file

    • Executes dropped EXE

    • Drops file in System32 directory

MITRE ATT&CK Enterprise v15

Tasks