epinna / weevely3

Weaponized web shell
GNU General Public License v3.0
3.21k stars 605 forks source link

Add :max_time_bypass, :alias and :shell_sh -prefix #141

Closed ZanyMonk closed 2 years ago

ZanyMonk commented 4 years ago

Additions

Max exec time bypass (from wiki)

Toggle the bypass with :max_time_bypass. Value is stored in session.

Bypass is inserted before -prefix value.

User-defined aliases

Those are simple "translations" that are applied to your command lines.

For example if you do :alias ll "ls -lha", then if the command ll <args> is called, ls -lha <args> is executed instead.

Aliases get saved in a text file ({base_path}/aliases by default, terminal mode can be started with -a <path> option to set a custom alias file). This file is automatically saved when exiting weevely.

Shell modules (pre|suf)fix

:shell_sh module has now two more options: -prefix and -suffix. :shell_php module options -prefix-string and -postfix-string have been renamed to only -prefix and -suffix.

Pretty useful to run commands with some shaky privesc trick like kill -64 0 && id, by doing :set shell_sh.prefix "kill -64 0 && "

ZanyMonk commented 2 years ago

More commits won't make this PR move faster, so I close for now. If you're interested in these features/patches let me know, I'll make clean PRs for each.