Skip to content

SecByShresth/MANTA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” Malware Analysis Tool

A privacy-focused, AI-powered malware static analysis tool that runs entirely on GitHub Pages (frontend) and GitHub Actions (backend serverless jobs) with zero databases and fully ephemeral sessions.

GitHub Pages GitHub Actions Privacy First

✨ Features

🎯 Core Philosophy

  • ❌ No backend server - Only GitHub Actions processes analysis jobs
  • ❌ No database - No state, no persistence
  • ❌ No storage - Reports exist only in memory during the page session
  • βœ… Fully ephemeral - Everything vanishes on page refresh
  • βœ… Privacy-first - Your files never leave your control (except for optional backend analysis)

πŸ”¬ Analysis Capabilities

Client-Side Analysis (Browser)

  • Hash Calculation: SHA256, SHA1, MD5
  • File Metadata: Type, size, MIME detection
  • String Extraction: ASCII and Unicode strings with suspicious pattern detection
  • PE Header Parsing: For Windows executables (.exe, .dll)
    • DOS and PE headers
    • File characteristics
    • Section analysis
    • Import/Export tables (basic)
  • Entropy Calculation: Detect packed/encrypted sections
  • Suspicious Pattern Detection: Identify malware indicators

Backend Analysis (GitHub Actions - Optional)

  • Deep Static Analysis: Advanced file inspection
  • YARA Scanning: Pattern matching with public rules
  • AI-Powered Assessment: Threat level evaluation
  • Behavior Analysis: Suspicious activity detection
  • Confidence Scoring: Risk assessment

πŸ“Š Supported File Types

  • Windows Executables: .exe, .dll, .msi
  • Scripts: .js, .vbs, .ps1, .bat
  • Archives: .zip
  • Android: .apk

πŸ“ˆ Report Formats

  • JSON: Machine-readable format
  • HTML: Standalone report with embedded styles
  • Text: Simple text-based report

πŸš€ Quick Start

Option 1: Use GitHub Pages (Recommended)

  1. Fork this repository
  2. Enable GitHub Pages:
    • Go to Settings β†’ Pages
    • Source: Deploy from branch main
    • Folder: / (root)
  3. Access your tool: https://yourusername.github.io/malware-analysis-tool/

Option 2: Run Locally

# Clone the repository
git clone https://github.com/yourusername/malware-analysis-tool.git
cd malware-analysis-tool

# Serve with any static server
python -m http.server 8000
# or
npx serve

# Open http://localhost:8000

βš™οΈ Configuration

Enable Backend Analysis (Optional)

To enable GitHub Actions backend analysis:

  1. Create a Personal Access Token:

    • Go to GitHub Settings β†’ Developer settings β†’ Personal access tokens
    • Generate new token with repo and actions scopes
  2. Configure the tool:

    • Add to URL: ?gh_owner=USERNAME&gh_repo=REPO&gh_token=TOKEN
    • Or store in localStorage (persists across sessions)
  3. Update workflow file:

    • Edit .github/workflows/malware-analysis.yml
    • Customize analysis steps as needed

Privacy Note

  • Backend analysis sends file data to GitHub Actions
  • Files are immediately deleted after analysis
  • No artifacts are stored
  • Results are returned to frontend only

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    GitHub Pages                         β”‚
β”‚                  (Static Frontend)                      β”‚
β”‚                                                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚ File Upload  β”‚  β”‚   Analysis   β”‚  β”‚   Reports    β”‚ β”‚
β”‚  β”‚  & Preview   β”‚β†’ β”‚   Engine     β”‚β†’ β”‚  & Export    β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚         β”‚                  β”‚                           β”‚
β”‚         β”‚                  β”‚                           β”‚
β”‚         β–Ό                  β–Ό                           β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚         Client-Side Analysis                     β”‚ β”‚
β”‚  β”‚  β€’ Hashing  β€’ PE Parsing  β€’ Strings  β€’ Entropy  β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚                        β”‚                              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚ (Optional)
                         β–Ό
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚     GitHub Actions            β”‚
         β”‚   (Serverless Backend)        β”‚
         β”‚                               β”‚
         β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
         β”‚  β”‚  Deep Static Analysis   β”‚ β”‚
         β”‚  β”‚  YARA Scanning          β”‚ β”‚
         β”‚  β”‚  AI Assessment          β”‚ β”‚
         β”‚  β”‚  ⚠️  Ephemeral Only     β”‚ β”‚
         β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“ Project Structure

malware-analysis-tool/
β”œβ”€β”€ index.html                 # Main HTML file
β”œβ”€β”€ styles.css                 # Styles and design system
β”œβ”€β”€ js/
β”‚   β”œβ”€β”€ main.js               # Main application logic
β”‚   β”œβ”€β”€ crypto-utils.js       # Hash calculation utilities
β”‚   β”œβ”€β”€ pe-parser.js          # PE file parser
β”‚   β”œβ”€β”€ strings-extractor.js  # String extraction
β”‚   β”œβ”€β”€ entropy-calculator.js # Entropy analysis
β”‚   β”œβ”€β”€ github-actions.js     # Backend integration
β”‚   └── report-generator.js   # Export functionality
β”œβ”€β”€ .github/
β”‚   └── workflows/
β”‚       └── malware-analysis.yml  # GitHub Actions workflow
└── README.md

πŸ”’ Security & Privacy

What We DON'T Do

  • ❌ Store any uploaded files
  • ❌ Keep analysis results in databases
  • ❌ Track users or their activities
  • ❌ Create persistent logs
  • ❌ Share data with third parties

What We DO

  • βœ… Process everything client-side when possible
  • βœ… Delete backend files immediately after analysis
  • βœ… Use ephemeral session storage only
  • βœ… Provide full transparency (open source)

Recommendations

  • πŸ” Use for static analysis only - never execute suspicious files
  • πŸ” Run in an isolated environment when analyzing real malware
  • πŸ” Don't upload sensitive or confidential files
  • πŸ” Verify the tool's source code before use

🎨 UI Features

  • Modern, Minimalistic Design: Clean interface with smooth animations
  • Responsive Layout: Works on desktop, tablet, and mobile
  • Dark Mode Ready: Easy to extend with dark theme
  • Drag & Drop: Intuitive file upload
  • Real-time Progress: Visual feedback during analysis
  • Interactive Charts: Entropy visualization
  • Tabbed Interface: Organized results display

πŸ› οΈ Development

Prerequisites

  • Modern web browser with ES6+ support
  • (Optional) Python 3.10+ for GitHub Actions backend

Adding Custom Analysis

Client-Side

Edit the respective JavaScript modules in the js/ directory:

  • pe-parser.js - Add PE parsing features
  • strings-extractor.js - Add pattern detection
  • entropy-calculator.js - Customize entropy analysis

Backend (GitHub Actions)

Edit .github/workflows/malware-analysis.yml:

  • Add Python dependencies
  • Implement custom analysis steps
  • Integrate AI models (Ollama, HuggingFace, etc.)

Example: Adding YARA Rules

- name: Download YARA rules
  run: |
    git clone https://github.com/Yara-Rules/rules.git /tmp/yara-rules

- name: Run YARA scan
  run: |
    yara -r /tmp/yara-rules/malware /tmp/sample_file

πŸ“Š Cost Analysis

GitHub Free Tier

  • GitHub Pages: Unlimited static hosting
  • GitHub Actions: 2,000 minutes/month free
  • Storage: No storage used (ephemeral)

Estimated Usage

  • Average analysis: ~30 seconds
  • Monthly capacity: ~4,000 analyses (free tier)
  • Total cost: $0 πŸ’°

🀝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

Ideas for Contribution

  • Add support for more file types (ELF, Mach-O, APK deep analysis)
  • Implement additional client-side parsers
  • Integrate more AI models
  • Improve UI/UX
  • Add more export formats
  • Enhance YARA rule sets

πŸ“ License

MIT License - See LICENSE file for details

⚠️ Disclaimer

This tool is for educational and research purposes only.

  • Always handle malware samples in isolated environments
  • Never execute suspicious files on production systems
  • The AI analysis is probabilistic and may have false positives/negatives
  • This tool does not replace professional malware analysis
  • Use at your own risk

πŸ™ Acknowledgments

  • GitHub for Pages and Actions infrastructure
  • YARA for pattern matching capabilities
  • PE File Format documentation
  • Open source security community

πŸ“§ Contact

For questions, issues, or suggestions:

  • Open an issue on GitHub
  • Submit a pull request
  • Check existing discussions

Made with ❀️ for the security community

Privacy-First β€’ AI-Powered β€’ Fully Ephemeral