Successfully deobfuscated the main entry point and core functionality of the JavaScript codebase. The code was heavily obfuscated with hex-encoded variable names and split across multiple files.
-
Main Entry Point (
main.js→deobfuscated/mainEntry.js)jy1()→main()- Entry point function- Handles CI environment detection and background process spawning
-
Data Collection (
deobfuscated/dataCollection.js)aL0()→collectSystemAndCloudData()- Main orchestration function- Coordinates all data collection activities
-
Utility Functions (
deobfuscated/utils/)$y1()→getSystemInfo()- System informationtL0()→generateRandomString()- Random string generationoL0()→getNpmTokenFromConfig()- NPM config parsing
-
Provider Classes (
deobfuscated/providers/)dq→GitHubClient- GitHub API operationsmq→GitHubReposProcessor- GitHub repository processingWX→AWSSecretsManager- AWS secrets collectionHw→GCPSecretsManager- GCP secrets collectionEq→AzureSecretsManager- Azure secrets collectionWl→NPMTokenValidator- NPM token validationTl→TruffleHogScanner- Secret scanning- Helper functions for GitHub Actions setup
The deobfuscated code is organized into:
- Main entry point - Handles execution flow
- Data collection - Orchestrates all collection activities
- Utils - Helper functions
- Providers - Cloud service and API clients
The codebase performs the following activities:
- Collects system information (platform, architecture, hostname, user)
- Authenticates with GitHub using multiple methods
- Creates GitHub repositories for data storage
- Collects secrets from AWS, GCP, and Azure
- Validates and uses NPM tokens
- Scans filesystem for secrets using TruffleHog
- Extracts GitHub Actions secrets via workflow manipulation
- Saves all collected data to GitHub repositories
The following files still contain obfuscated code but are primarily dependencies:
file_1.js- Module helpers and protobuf definitions (can be left as-is)file_2.js- gRPC constants and logger (can be left as-is)file_3.jsthroughfile_12.js- External dependencies (AWS SDK, GCP, Azure SDKs, etc.)
These files contain mostly third-party library code that was bundled, so they don't need extensive deobfuscation unless specific functionality needs to be understood.
The deobfuscated code can be used by:
- Importing from
src/deobfuscated/directory - The main entry point is in
src/main.jswhich imports fromdeobfuscated/mainEntry.js - All functions and classes have meaningful names and documentation
- The deobfuscated code maintains the same functionality as the original
- Some implementations reference external libraries that need to be installed
- The original obfuscation used triple base64 encoding for data storage
- Variable names were hex-encoded (e.g.,
_0x5ddff6)