Skip to content

Sunil56224972/BatCloak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

BatchGuard Pro Interactive Demo
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— 
β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β• β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘
β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘     β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•
β•šβ•β•β•β•β•β• β•šβ•β•  β•šβ•β•   β•šβ•β•    β•šβ•β•β•β•β•β•β•šβ•β•  β•šβ•β• β•šβ•β•β•β•β•β•  β•šβ•β•β•β•β•β• β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•β•šβ•β•β•β•β•β• β•šβ•β•      β•šβ•β•β•β•β•β• 
                                               P R O

Professional Batch Script Obfuscation & Security Utility for Windows

React Vite Windows License Author

Make your .bat scripts invisible to eyes, readable only by machines.


🎬 How It Works β€” In Action

The animated banner above shows the complete app flow in real-time. Here are the individual screens:

πŸ–₯️ Dashboard β€” Drag & Drop Your Script

BatchGuard Pro Dashboard

βš™οΈ Settings β€” Fine-tune the Obfuscation Engine

BatchGuard Pro Settings

πŸ“„ Documentation β€” Deep Technical Explanation

BatchGuard Pro Documentation

πŸ” What Is BatchGuard Pro?

BatchGuard Pro is a sleek, dark-themed desktop web app built with React + Vite that lets you obfuscate Windows .bat (batch) scripts with a single drag-and-drop.

It uses a UTF-16 BOM (Byte Order Mark) injection technique β€” a clever binary trick that:

  • 🚫 Makes your script completely unreadable in standard text editors (Notepad, VSCode opening as binary, etc.)
  • βœ… Keeps the script 100% executable by cmd.exe / Windows Command Processor
  • πŸ”€ Optionally scrambles all SET variable names so even a hex editor sees gibberish

This is not a generic encoder. BatchGuard Pro injects a precise byte sequence FF FE 26 63 6C 73 0D 0A that exploits how text editors vs. the CMD interpreter handle encoding headers differently.


⚑ Features

Feature Description Status
Header Injection (Stealth Mode) Prepends UTF-16 BOM bytes to confuse text editors ALWAYS ON
Variable Scrambling Randomizes all SET varname= identifiers Toggleable
Drag & Drop Interface Zero-friction file loading from the Dashboard βœ…
One-Click Download Download your obfuscated .bat directly βœ…
Dark Pro UI Windows-11 inspired Mica-effect dark interface βœ…
No Server Needed Runs 100% client-side in your browser βœ…

🧠 The Obfuscation Technique β€” Deep Dive

Phase 1: BOM Header Injection

Original file bytes:  40 65 63 68 6F ...   (@echo ...)
Obfuscated bytes:     FF FE 26 63 6C 73 0D 0A 40 65 63 68 6F ...
                      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ └──────────────
                         UTF-16 BOM + cls        Your script

What happens:

  • A text editor like Notepad reads FF FE and says "This is a UTF-16 Little-Endian file" β†’ tries to decode all content as UTF-16 β†’ displays garbage / refuses to open
  • CMD.EXE ignores encoding headers and executes raw bytes β†’ your script runs perfectly

Phase 2: Variable Scrambling (optional)

:: Before Scrambling
SET username=admin
SET password=secret123

:: After Scrambling  
SET xK3mQ9=admin
SET pR7vN2=secret123

Every SET variable name gets replaced with a random alphanumeric identifier. The script still functions identically β€” the variable references inside the logic are remapped too.


πŸš€ Getting Started

Prerequisites

node >= 18.x
npm  >= 9.x

Installation

# Clone the repo
git clone https://github.com/Sunil56224972/batchguard-pro.git
cd batchguard-pro

# Install dependencies
npm install

# Start development server
npm run dev

Open http://localhost:5173 in your browser.

Build for Production

npm run build
# Output is in /dist β€” can be served as a static site or wrapped in Electron

πŸ—‚οΈ Project Structure

batchguard-pro/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ Sidebar.jsx          # Navigation sidebar (Dashboard/Settings/Docs)
β”‚   β”‚   └── DropZone.jsx         # Drag-and-drop file processor + obfuscation logic
β”‚   β”œβ”€β”€ App.jsx                  # Root layout + tab state management
β”‚   β”œβ”€β”€ main.jsx                 # React entry point
β”‚   └── index.css                # Global styles + CSS variables (dark theme)
β”œβ”€β”€ index.html                   # Vite HTML shell
β”œβ”€β”€ package.json
└── vite.config.js

🎨 UI Design System

The interface is built on a custom CSS variable system inspired by Windows 11 Mica effect:

--bg-color:       #0c0d0e   /* Deep black background      */
--surface-color:  #141517   /* Cards and panels           */
--primary-color:  #0078d4   /* Microsoft blue accent      */
--success-color:  #10b981   /* Green for confirmations    */
--text-secondary: #94a3b8   /* Muted descriptions         */

πŸ›‘οΈ Use Cases

  • 🏒 Enterprise batch automation β€” protect deployment scripts from casual viewing
  • πŸ”’ IP protection β€” ship .bat installers without exposing your logic
  • πŸ§ͺ Security research β€” understand how encoding attacks affect script interpreters
  • πŸŽ“ Education β€” learn about binary file headers and encoding mismatches

πŸ“¦ Tech Stack

Frontend:    React 19 + Vite 8
Styling:     Pure CSS + CSS Variables (no Tailwind, no UI lib)
Obfuscation: Vanilla JS (FileReader API + ArrayBuffer manipulation)
Build:       Vite (ESM)
Fonts:       Inter (Google Fonts)

🀝 Contributing

PRs are welcome. For major changes, open an issue first.

  1. Fork the repo
  2. Create your branch (git checkout -b feature/my-feature)
  3. Commit changes (git commit -m 'feat: add something cool')
  4. Push and open a Pull Request

πŸ‘€ Author

Sunil Dev Self-taught developer & cybersecurity enthusiast from Chhattisgarh, India

GitHub Instagram

Part of the rm -rf society org


πŸ“œ License

MIT License β€” do whatever you want, just don't remove the credits.

BatchGuard Pro β€” Because your scripts deserve better than plaintext.

rm -rf plaintext

About

πŸ›‘οΈ BatchGuard Pro β€” Advanced .bat file obfuscator using BOM injection, variable scrambling & stealth techniques to protect scripts from reverse engineering.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages