कमांड इंजेक्शन बाईपास जनरेटर
Enter a command and a regex filter. We'll generate payloads that bypass it.
यह कैसे काम करता है
यह टूल उन कमांड इंजेक्शन पेलोड को खोजने को स्वचालित करता है जो दी गई regex फ़िल्टर से बच जाते हैं। यह आपके कमांड के दर्जनों अस्पष्ट variants उत्पन्न करता है और प्रत्येक को regex के विरुद्ध परीक्षण करता है — सर्वर-साइड PHP में, कुछ भी कभी निष्पादित नहीं होता।
- 1. अपना कमांड दर्ज करें: इंजेक्ट करने के लिए raw कमांड, उदा.
whoamiयाcat /etc/passwd. - 2. regex फ़िल्टर पेस्ट करें: कोई भी फ़ॉर्मैट: PHP
/pattern/flags, Pythonr"pattern"याre.compile(...), JavaScriptnew RegExp(...), Go backtick, या एक सामान्य pattern। - 3. फ़िल्टर का प्रकार चुनें: blacklist फ़िल्टर मिलते-जुलते इनपुट को ब्लॉक करते हैं (पेलोड मेल नहीं खाना चाहिए); whitelist फ़िल्टर केवल मिलते-जुलते इनपुट की अनुमति देते हैं (पेलोड मेल खाना चाहिए)।
- 4. अपने बाईपास प्राप्त करें: फ़िल्टर शर्त पास करने वाला हर पेलोड वापस किया जाता है, तकनीक के अनुसार समूहीकृत, उस OS के साथ जिस पर यह लागू होता है।
बाईपास तकनीक श्रेणियां
जनरेटर Linux/Bash और Windows CMD/PowerShell के लिए बाईपास तकनीकों के निम्नलिखित परिवारों को कवर करता है।
Encoding (base64 / hex / xxd / octal)
Encodes the entire command using base64 (subshell and pipe-to-sh), raw hex decoded by xxd -r -p, printf \x escapes (lowercase), and ANSI-C $'\x..' quoting. Lowercase-only variants bypass [A-Z] filters.
Quote splitting
Inserts empty single quotes, double quotes, or backslash escapes inside the keyword, e.g. c''at or c\at, breaking pattern matching without changing shell semantics.
Space bypass
Replaces literal spaces with $IFS, ${IFS}, a tab character ($'\t'), brace expansion ({cmd,arg}), or input redirection (cat</etc/passwd).
Slash bypass
Replaces forward slashes using ${HOME:0:1}, ANSI-C $'\x2f', $'\57', or $(printf '\57').
Variable concat
Splits the command across two shell variables (a=wh; b=oami; $a$b) to avoid matching the full keyword in the regex.
Alternative commands
Substitutes blocked commands: cat → less, tac, nl, head, xxd; whoami → id; ls → echo *.
Wildcards / globbing (hint)
Generates c?t and c* variants. These bypass the regex but require the correct binary on the filesystem. Verify manually.
CMD caret obfuscation
Inserts the ^ escape character between chars (w^h^o^a^m^i). CMD ignores ^ and executes the command normally.
CMD quote splitting
Inserts empty double quotes (wh""oami). Functionally identical to the unquoted form in CMD.
CMD variable tricks
Splits across environment variables (set a=wh& set b=oami& call %a%%b%). Also supports delayed expansion via cmd /V:ON and !var!.
PowerShell backtick
The backtick (`) is a PowerShell escape character silently ignored in identifiers. wh`oami executes as whoami.
PowerShell encoding
Encodes as UTF-16LE base64 for powershell -enc, or rebuilds from a char array ([char[]](119,104,...) -join '') or string concat ('wh'+'oami').
PowerShell invoke variants
Uses iex, the & operator, ScriptBlock::Create, or mixed-case IeX without spelling Invoke-Expression.
blacklist बनाम whitelist फ़िल्टर
blacklist — पेलोड मेल नहीं खाना चाहिए
जब regex मेल खाता है तो एप्लिकेशन इनपुट ब्लॉक करता है। regex खतरनाक pattern का वर्णन करता है — उदाहरण के लिए [;&|`$] या cat|ls|whoami. पेलोड को regex ट्रिगर नहीं करना चाहिए ताकि वह फ़िल्टर से गुज़र सके।
इनमें सामान्य: PHP preg_match() जो मिलान पर die/block करता है, Python re.search() गार्ड्स।
whitelist — पेलोड मेल खाना चाहिए
एप्लिकेशन इनपुट केवल तभी प्रोसेस करता है जब regex मेल खाता है। regex अनुमत अक्षरों का वर्णन करता है — उदाहरण के लिए ^[^;\/&A-Z]*$. पेलोड को regex संतुष्ट करते हुए कमांड भी निष्पादित करना होगा।
इनमें सामान्य: input validators, CTF challenge सोर्स, WAF allowlists।
सुझाव: यदि regex के साथ एंकर किया गया है ^ और $, यह लगभग हमेशा एक whitelist होती है। यदि आपका मोड चयन गलत लगता है तो टूल आपको चेतावनी देगा।
सपोर्ट किए गए regex इनपुट फ़ॉर्मैट
regex को बिल्कुल वैसे ही पेस्ट करें जैसा सोर्स कोड में दिखता है — टूल फ़ॉर्मैट स्वतः पहचानता है, pattern और flags निकालता है, और इसे PHP-compatible expression में संकलित करता है।
| भाषा / फ़ॉर्मैट | उदाहरण |
|---|---|
| PHP / JS / Ruby / Perl | /[;&|`$\s]/i |
| Plain pattern | ^[0-9a-z]+$ |
| Python raw string | r"^[^;/\&.<>\rA-Z]*$" |
| Python re.compile | re.compile(r"[;&|]", re.IGNORECASE) |
| JavaScript new RegExp | new RegExp("[;&|]", "gi") |
| Go raw string | `^[a-z0-9]+$` |
| Perl m// | m/[;&|]/gi |
| Quoted string | "^[a-z0-9]+$" |
FAQ
Does this actually execute commands?
No. Everything runs server-side in PHP. Payloads are generated as strings and tested against your regex with preg_match(). No command is ever executed on the server.
What does "payload must match / must NOT match" mean?
A blacklist blocks input when the regex matches: payload must NOT match. A whitelist only allows input when the regex matches: payload must match. The tool auto-detects which is more likely and warns you if your selection looks wrong.
Why are some payloads marked with a warning?
Wildcard and glob-based payloads (e.g. /bin/c?t) depend on the filesystem layout of the target. They bypass the regex filter, but will only work if the expected binary is present at that path.
Why does my ANSI-C quoting payload not run directly?
An ANSI-C string like $'\x77\x68\x6f\x61\x6d\x69' evaluates to the literal string whoami in bash but does not execute it on its own. Prefix it with eval or bash -c, which are lowercase letters and unlikely to be filtered.
Can I use this for CTF challenges?
Yes. This tool is designed for CTF and authorised penetration testing scenarios where you need to bypass an input filter to achieve command execution. Only use it on systems you own or have explicit permission to test.