Skip to content

zikani/simple_antivirus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SecureShield Antivirus

A lightweight yet powerful antivirus solution with real-time protection, comprehensive scanning, and an intuitive GUI. Features include signature-based detection, heuristic analysis, and robust quarantine management.

✨ Features

  • Smart Scanning

    • Quick, Full, and Custom scan options
    • Signature-based detection using an extensible virus database
    • Heuristic analysis to detect unknown threats
    • Archive scanning (ZIP, RAR, etc.)
    • Background scanning with minimal system impact
  • Threat Management

    • Automatic threat quarantine
    • Manual quarantine review and management
    • Threat restoration and deletion
    • Detailed threat information and analysis
  • User Interface

    • Modern, intuitive GUI built with PyQt5
    • Real-time scan progress and statistics
    • Detailed scan reports with threat categorization
    • System tray integration
  • Performance

    • Multi-threaded scanning
    • Low system resource usage
    • Smart file skipping for better performance
    • Background scanning with adjustable priority

πŸš€ Requirements

  • Python 3.7 or higher
  • pip (Python package manager)
  • Windows 10/11 (Linux/macOS support coming soon)

πŸ“¦ Installation

  1. Clone the repository:

    git clone https://github.com/zikani/simple-antivirus.git
    cd simple-antivirus
  2. Install the required dependencies:

    pip install -r requirements.txt

πŸ–₯️ Running the Application

GUI Mode (Recommended)

python run_gui.py

Command Line Interface

Run a quick scan:

python -m app.cli scan --type quick

Run a full system scan:

python -m app.cli scan --type full

Scan a specific directory:

python -m app.cli scan --path /path/to/scan

πŸ›‘οΈ Features in Detail

Scanning Options

  • Quick Scan: Checks common infection points
  • Full Scan: Comprehensive system scan
  • Custom Scan: Scan specific files or directories
  • Scheduled Scans: Set up automated scans

Quarantine Management

  • View quarantined items
  • Restore or delete quarantined files
  • View detailed threat information
  • Export quarantine reports

Settings

  • Configure scan sensitivity
  • Set up automatic updates
  • Manage exclusions
  • Configure real-time protection

πŸ› οΈ Development

Project Structure

simple-antivirus/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ core/           # Core functionality
β”‚   β”‚   β”œβ”€β”€ scanner.py      # Scanning engine
β”‚   β”‚   β”œβ”€β”€ quarantine.py   # Quarantine management
β”‚   β”‚   └── database.py     # Virus database
β”‚   β”œβ”€β”€ gui/             # GUI components
β”‚   β”‚   β”œβ”€β”€ main_window.py  # Main application window
β”‚   β”‚   β”œβ”€β”€ scan_tab.py     # Scan interface
β”‚   β”‚   └── quarantine_tab.py # Quarantine management
β”‚   └── cli/              # Command line interface
β”‚       └── main.py        # CLI implementation
β”œβ”€β”€ data/                # Data files
β”‚   └── virus_definitions.json  # Virus signatures
β”œβ”€β”€ tests/               # Unit tests
β”œβ”€β”€ requirements.txt     # Python dependencies
└── run_gui.py          # GUI entry point

Adding New Features

  1. Fork the repository
  2. Create a new branch: git checkout -b feature/your-feature
  3. Make your changes and commit them: git commit -m 'Add some feature'
  4. Push to the branch: git push origin feature/your-feature
  5. Submit a pull request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

⚠️ Disclaimer

This antivirus is for educational purposes only. While it provides real protection, it should not be your only line of defense against malware. Always keep your system and security software up to date.

Installation

Using pip (recommended)

pip install secureshield-antivirus

From source

  1. Clone the repository:

    git clone https://github.com/yourusername/secureshield-antivirus.git
    cd secureshield-antivirus
  2. Install the required dependencies:

    pip install -r requirements.txt

System Dependencies

On Linux, you might need to install additional libraries:

# Ubuntu/Debian
sudo apt-get install libmagic1

# Fedora
sudo dnf install python3-magic

# Arch Linux
sudo pacman -S libmagic

Usage

Graphical User Interface (GUI)

Launch the GUI application:

simple-antivirus

Command Line Interface (CLI)

Scan a file or directory

secureshield scan /path/to/scan

Create a sample virus database

secureshield create-sample

Add a new virus signature

secureshield add-signature --database virus_definitions.json --name "Trojan.Example" --signature "evil_code" --type pattern --threat-level high --description "Example trojan detection"

Show database information

secureshield info --database virus_definitions.json

Update the virus database

secureshield update --database virus_definitions.json --file update.json

For more information about available commands and options:

secureshield --help

Update Signatures

Update the virus signature database:

python main.py --update

Quarantine a File

Quarantine a potentially harmful file:

python main.py --quarantine /path/to/suspicious/file

Show Version

Display version information:

python main.py --version

How It Works

  1. File Scanner: Examines files for suspicious patterns and behaviors
  2. Signature Database: Matches files against known malware signatures
  3. Heuristic Analysis: Identifies potentially malicious code patterns
  4. Quarantine: Isolates suspicious files to prevent system harm

Logs

Scan results and system events are logged to antivirus.log in the project directory.

Virus Database

The virus database is stored in JSON format and contains the following components:

  1. Signatures: Known malware hashes and patterns
  2. Heuristics: Rules for detecting suspicious behavior
  3. Checksums: Index of file hashes for quick lookups

Database Structure

{
  "version": "1.0.0",
  "last_updated": "2023-01-01T12:00:00.000000",
  "signatures": {
    "sig_1": {
      "name": "Trojan.Example",
      "signature": "evil_code",
      "type": "pattern",
      "threat_level": "high",
      "description": "Example trojan detection",
      "added": "2023-01-01T12:00:00.000000"
    }
  },
  "checksums": {
    "md5": {
      "d41d8cd98f00b204e9800998ecf8427e": "sig_1"
    }
  },
  "heuristics": {
    "heur_1": {
      "name": "Suspicious.DoubleExtension",
      "rule": {
        "description": "Detects files with double extensions",
        "conditions": [
          {
            "field": "filename",
            "operator": "regex",
            "value": "\\.[^\\.]+\\.[^\\.]+$"
          },
          {
            "field": "extension",
            "operator": "in",
            "value": ["exe", "dll", "bat", "cmd", "ps1", "vbs", "js"]
          }
        ]
      },
      "description": "Detects potentially malicious files with double extensions",
      "added": "2023-01-01T12:00:00.000000"
    }
  }
}

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Disclaimer

This is a basic antivirus tool for educational purposes. It should not be relied upon as the sole means of protection against malware.

About

Modern PyQt6 desktop antivirus and threat monitoring suite with real-time protection and malware analytics.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages