World Shell Finder is a Go command-line tool for detecting suspicious web shells and backdoors inside web roots or other source directories. It combines keyword matching, regex rules, and heuristic scoring to improve detection quality while reducing noisy single-hit matches.
This project is intended for educational, incident response, and defensive security use. It does not replace a full malware analysis process. False positives and false negatives are still possible.
- Refactored into a Clean Architecture to ensure modularity, maintainability, and scalability.
- Beautiful, intuitive Interactive UI powered by
pterm. - Integrates VirusTotal API as a malware reference database to improve detection rules and confirm suspicious files.
- Lightning fast multi-threading support via Goroutines and Worker Pools for massive directory scanning.
- Dynamic output streaming, immediately reports potential threats to your terminal without waiting for the scan to finish.
- Detects suspicious binary backdoors / C2 implants via networking and malware-behavior indicators.
- Detects suspicious files using a scoring-based engine.
- Combines keyword matches, regex signatures, and heuristic indicators.
- Supports custom wordlists on top of the embedded default wordlist.
- Produces clearer output with suspicion score and evidence summary.
- Includes a string-removal mode for cleanup workflows.
- Ships with GitHub Actions CI/CD and automatic prereleases on each push to the main branch.
- Includes deep scan mode for suspicious traffic and broader rootkit checks.
The scanner evaluates files using multiple signals:
- Text-based webshell patterns (keyword + regex rules + heuristic scoring).
- Language-Specific Wordlists: Dynamically loads different keyword sets based on the target file extension (e.g. PHP keywords for
.php, JS/Node keywords for.js/.ts, Python keywords for.py) to completely eliminate cross-language false positives. - YARA-like Advanced Heuristics (Pure Go):
- Shannon Entropy Analysis: Detects highly obfuscated payloads (like hidden Base64 or Hex blobs) by calculating the mathematical information density of contiguous strings.
- Memory-Efficient Binary Streaming: Parses executable and binary-format files for C2/Backdoor indicators without loading massive files into RAM.
- Smart Extension Filtering: Automatically ignores static media files, documents, and fonts (e.g.
.jpg,.pdf,.zip,.woff) to drastically reduce false positives and speed up the scanning process. - Core File Integrity Verification: Automatically detects framework installations and verifies core/vendor files. Unmodified files are safely ignored (Zero False Positives), while modified core files are immediately flagged! Supported frameworks:
- WordPress (Full MD5 checksum validation via official API)
- WordPress Plugins (Full MD5 checksum validation against official wp.org plugin SVN API)
- Laravel (Vendor path validation via
artisanroot detection) - CodeIgniter 4 (System & Vendor path validation via
sparkroot detection) - Yii2 (Vendor path validation via
yiiroot detection)
- Binary backdoor / C2 indicators (for executable or binary-format files).
- Hardcoded URLs, IP:PORT, many domain-like strings.
- Networking-related strings (WinHTTP/WinINet/Winsock,
socket/connect/send/recv, libcurl, HTTP headers). - Malware-like behavior strings (persistence markers, injection markers, packer markers).
- Optional VirusTotal reputation check (only for highly suspicious hits, score >= 8).
- Uses local in-memory cache.
- Enforces free-tier rate limit (4 lookups/minute) and auto-disables on HTTP 429.
Files are reported when their suspicion score reaches the configured threshold.
graph TD
A[Start Scan] --> B{Operation Mode}
B -->|Detect / Deep| C[Load Config & Wordlists]
B -->|Remove| D[Load String to Remove]
C --> E["Initialize Worker Pool (-workers)"]
D --> ER["Initialize Worker Pool (-workers)"]
subgraph Multi-Threaded Scanning
E --> F[Walk Directories]
F --> G[Push Files to Channel]
G --> H1[Worker 1]
G --> H2[Worker 2]
G --> H3[Worker N]
end
subgraph Multi-Threaded Removal
ER --> FR[Walk Directories]
FR --> GR[Push Files to Channel]
GR --> RH[Workers Remove String]
end
H1 --> I{Core File Integrity}
I -->|"Match Known Framework Vendor/Core"| L[Safe / Skip File]
I -->|"Modified Checksum (WP)"| J1["Add +20 Score"]
I -->|"Not a Core File"| J2{File Type Check}
J1 --> J2
J2 -->|Suspicious Extension| J[Analyze as Text]
J2 -->|Unknown Extension| K{Looks Like Text?}
K -->|Yes| J
K -->|No| K2{Executable or Known Binary Format?}
K2 -->|Yes| JB["Analyze as Binary (strings)"]
K2 -->|No| L[Skip File]
J --> M[Match Keywords & Rules]
M --> N[Apply Heuristics]
N --> O{Score >= 8 & VT API Key set?}
JB --> NB[Score Binary Indicators]
NB --> O
O -->|Yes| P[Calculate SHA256 Hash]
P --> Q{Check Local Cache}
Q -->|Found| R[Apply Cached VT Result]
Q -->|Not Found| S["Rate Limited Request to VirusTotal API (auto-disable on 429)"]
S --> R
R --> T{Is Malicious?}
T -->|Yes| U[Add +10 Score]
T -->|No| V[Keep Current Score]
O -->|No| V
U --> W
V --> W{Score >= Min Threshold?}
W -->|Yes| X["Print Alert Immediately (stream)"]
W -->|No| L
X --> Y[Store in Results]
Y --> Z
RH --> Z
L --> Z
Z[Wait All Workers to Finish] --> AA{Is Deep Scan?}
AA -->|Yes| AB[Run Traffic, Log, Rootkit Scans]
AB --> AC
AA -->|No| AC[Print Final Summary & Save Report]
AC --> AD[End]
git clone https://github.com/Aryma-f4/worldshellfinder.git
cd worldshellfinder
go build -o worldshellfinder ./cmd/worldshellfindergo install github.com/Aryma-f4/worldshellfinder/cmd/worldshellfinder@latestIf your Go binary path is not available in PATH, add it first:
export PATH="$PATH:$HOME/go/bin"Run the program without flags to use the menu-based interactive mode:
./worldshellfinderBasic detection:
./worldshellfinder -mode detect -dir /var/www/htmlDetection via list of directories (recursive):
./worldshellfinder -mode detect -dir-list /tmp/list_of_dirs.txtVerbose detection:
./worldshellfinder -mode detect -dir /var/www/html -vDetection with a custom wordlist:
./worldshellfinder -mode detect -dir /var/www/html -wordlist ./wordlists/zeus.txtDetection with a stricter threshold:
./worldshellfinder -mode detect -dir /var/www/html -min-score 6 -max-evidence 8Save results to a file:
./worldshellfinder -mode detect -dir /var/www/html -out result.txtDeep scan combines:
- file-based shell detection,
- suspicious traffic inspection,
- threat hunting on common auth, nginx, and apache logs,
- rootkit checks using
rkhunter,chkrootkit,unhide, and built-in heuristics.
Example:
./worldshellfinder -mode deep -dir /var/www/html -out deep-report.txt -v./worldshellfinder -mode remove -dir /var/www/html -remove-string "malicious_snippet"./worldshellfinder -h-h, --help Show help information
-v Enable verbose output
-mode string Operation mode: detect, deep, or remove
-dir string Directory to scan
-out string Output file path
-wordlist string Additional custom wordlist file
-min-score int Minimum score before a file is reported
-max-evidence int Maximum evidence entries shown per file
-remove-string string String to remove when mode=remove
-dir-list string File containing a list of directories to scan (one per line)
-vt-api-key string VirusTotal API key for checking suspicious files against the malware database
-workers int Number of concurrent workers for scanning files (default: number of CPUs)
--update Update to the latest release
The wordlist format allows defining custom weights:
- One keyword or signature per line.
- Use
::to assign a specific score to a keyword (e.g.,keyword::score). - If no score is provided, the keyword defaults to a weight of 4.
- Empty lines and lines starting with
#are ignored. - Custom entries are merged with the embedded default wordlist.
Example custom.txt:
# Give a high score for a specific backdoor signature
c99shell::6
# Give a low score for system enumeration to avoid false positives
systeminfo::1
whoami::1
See:
The repository also documents many shell families and samples already covered by the project:
GitHub Actions now provides:
- Test execution on pull requests and pushes.
- Multi-platform build artifacts for Linux, Windows, and macOS.
- Automatic prerelease creation for every push to
mainormaster. - Attached archives and checksum file in each generated release.
Deep scan does not rely on a single tool. It can use:
rkhunterchkrootkitunhide- built-in heuristic checks for preload abuse, suspicious modules, hidden executables, temporary privilege-escalation binaries, and persistence points
Deep scan also inspects common log locations such as:
/var/log/auth.log/var/log/secure/var/log/nginx/access.log/var/log/apache2/access.log
It looks for signs such as:
cmd=,exec=,shell=, or encoded payload probes- suspicious upload and dropper patterns
- repeated authentication failures and invalid users
sudo,curl,wget,nc, or privilege escalation activity in auth logs
If the process lacks permission to inspect protected paths, the tool prints:
not enough permission to do this, gotta root
- Linux
- Windows
- macOS
Contributions are welcome. Feel free to open an issue or submit a pull request for:
- new shell signatures,
- detection improvements,
- performance fixes,
- documentation updates.
