Why Use the Web Version?
Enhanced Safety
The web version provides multiple layers of isolation:Browser Sandbox
The browser’s security sandbox provides an additional layer of protection beyond the emulator itself.
No Host Access
WebAssembly code runs in a restricted environment with no direct access to your filesystem or system resources.
Network Isolation
Network operations are controlled by the browser’s security policies and CORS restrictions.
Features
The web playground includes:- Full Windows Emulation: Same syscall-level emulation as the desktop version
- Interactive Console: Real-time output and logging
- File Upload: Drag and drop executables and supporting files
- Virtual Filesystem: Browser-based filesystem using IndexedDB
- PE File Analysis: Built-in PE header viewer and icon extraction
- Execution Control: Start, stop, and monitor program execution
- Registry Support: Pre-configured Windows registry
Getting Started
Navigate to sogen.dev in a modern browser.
The web version requires a browser with WebAssembly support and SharedArrayBuffer. Chrome, Firefox, and Edge are recommended.
.exe).dll) - for analysis, not executionWeb-Specific Features
Virtual Filesystem
The web version uses a virtual filesystem backed by IndexedDB:C:/Users/User/Desktop/ by default.
File Persistence
Files uploaded to the virtual filesystem persist across sessions using IndexedDB. To clear:- Click the Settings icon
- Select “Clear Filesystem”
- Confirm the action
PE File Viewer
The playground includes a PE file analyzer:- Headers: View DOS, NT, and Optional headers
- Sections: Examine section names, sizes, and characteristics
- Imports: List imported DLLs and functions
- Exports: View exported functions
- Resources: Extract and view resources including icons
Icon Extraction
The web interface automatically extracts and displays executable icons:- Upload an executable
- The icon appears in the file list
- Click to view full-size
Building the Web Version
To build Sogen for WebAssembly locally:Prerequisites
- Emscripten SDK
- CMake 3.20+
- Node.js 16+ (for the frontend)
Build Steps
Architecture
The web version consists of:WebAssembly Module
The core emulator compiled to WebAssembly:- Unicorn Engine (emulation backend)
- Windows syscall implementations
- PE loader and module manager
- Registry and filesystem emulation
Web Worker
Execution runs in a Web Worker (emulator-worker.js) to:
- Prevent blocking the main UI thread
- Enable SharedArrayBuffer for threading
- Provide better performance
Frontend
React-based UI built with:- React: UI framework
- TypeScript: Type-safe development
- Vite: Build tool and dev server
- Tailwind CSS: Styling
- Radix UI: Accessible components
Communication Flow
Browser Compatibility
Requirements
- WebAssembly: All modern browsers
- SharedArrayBuffer: Required for threading
- IndexedDB: For virtual filesystem persistence
Enabling SharedArrayBuffer
SharedArrayBuffer requires specific HTTP headers:Tested Browsers
- ✅ Chrome 90+
- ✅ Firefox 90+
- ✅ Edge 90+
- ✅ Safari 15.2+ (with caveats)
- ❌ Internet Explorer (not supported)
Limitations
The web version has some limitations compared to the desktop version:Performance
WebAssembly performance is typically 50-70% of native code. CPU-intensive programs may run slower.Memory
Browsers limit WebAssembly memory:- Maximum: 2-4GB depending on browser
- Large programs may exceed available memory
Network
Network operations are restricted:- Subject to CORS policies
- Cannot make arbitrary TCP/UDP connections
- WebSocket support available
File System
Virtual filesystem limitations:- No direct host filesystem access
- Files must be uploaded manually
- Limited total storage (IndexedDB quotas)
Debugging
The web version does not support:- GDB remote debugging
- External debugger attachment
- Direct memory inspection tools
Advanced Usage
Embedding in Your Site
You can embed the Sogen emulator in your own web application:Custom Registry
Provide a custom registry configuration:File Operations
Manage the virtual filesystem:Privacy and Security
The web playground is designed with privacy in mind:Data Processing
- All processing happens client-side in your browser
- Uploaded files are not sent to any server
- No telemetry or analytics on uploaded executables
- Virtual filesystem is stored locally (IndexedDB)
Network Isolation
Programs running in the emulator:- Cannot access your local network directly
- Are subject to browser security policies
- Can only make HTTP(S) requests allowed by CORS
Clearing Data
To remove all data:- Clear the virtual filesystem (Settings → Clear Filesystem)
- Clear browser storage for sogen.dev
- Close the browser tab
Troubleshooting
SharedArrayBuffer Errors
If you see “SharedArrayBuffer is not defined”:- Ensure you’re using HTTPS (required for security headers)
- Check that your browser supports SharedArrayBuffer
- Verify the site’s HTTP headers are correctly configured
Out of Memory
If the emulator runs out of memory:- Close other browser tabs
- Use a 64-bit browser
- Try a smaller/simpler executable
- Use the desktop version for large programs
Performance Issues
If execution is slow:- Close unnecessary browser tabs
- Disable browser extensions
- Use Chrome or Edge (typically faster WebAssembly)
- Consider using the desktop version for better performance
Files Not Persisting
If uploaded files disappear:- Check browser storage settings
- Ensure IndexedDB is enabled
- Verify sufficient storage quota
- Check for private browsing mode (may not persist)