compile standalone weevely
69noob opened this issue · 1 comments
hi, im trying to make standalone weevely i.e. one executable file for linux for futher pivoting. on target machine i cant install dependencies, python etc. , so it must run as if everything is in one file inside. i have tried with pyinstaller and nuitka sofar, both generated execfutables fail during runtime:
python3 -m nuitka --follow-imports --standalone --include-plugin-directory=core weevely.py
after connecting to target agent, executing any command on weevy shell outputs this error:
weevely> id
Traceback (most recent call last):
File "/home/test/weevely3/weevely.dist/weevely.py", line 104, in
File "/home/test/weevely3/weevely.dist/weevely.py", line 57, in main
File "/home/test/weevely3/weevely.dist/cmd.py", line 137, in cmdloop
File "/home/test/weevely3/weevely.dist/core/terminal.py", line 207, in precmd
KeyError: 'shell_sh'
generating an agent gives this error:
weevely.dist/weevely generate test test
Exiting: File '/home/test/weevely3/weevely.dist/bd/obfuscators/obfusc1_php.tpl' not found
i have added all folders incase if its failing to find the rght module file, but it failed with same error from above.
python3 -m nuitka --follow-imports --standalone --include-plugin-directory=./utils --include-plugin-directory=./utils/_http --include-plugin-directory=./modules --include-plugin-directory=./modules/system --include-plugin-directory=./modules/sql --include-plugin-directory=./modules/sql/_dump --include-plugin-directory=./modules/shell --include-plugin-directory=./modules/net --include-plugin-directory=./modules/net/_scan --include-plugin-directory=./modules/net/_phpproxy --include-plugin-directory=./modules/net/_curl --include-plugin-directory=./modules/file --include-plugin-directory=./modules/file/_zip --include-plugin-directory=./modules/file/_tar --include-plugin-directory=./modules/file/_gzip --include-plugin-directory=./modules/file/_find --include-plugin-directory=./modules/file/_bzip2 --include-plugin-directory=./modules/bruteforce --include-plugin-directory=./modules/bruteforce/_sql --include-plugin-directory=./modules/backdoor --include-plugin-directory=./modules/backdoor/_reversetcp --include-plugin-directory=./modules/audit --include-plugin-directory=./modules/audit/_disablefunctionbypass --include-plugin-directory=./core --include-plugin-directory=./core/channels --include-plugin-directory=./core/channels/obfpost --include-plugin-directory=./bd --include-plugin-directory=./bd/obfuscators --include-plugin-directory=./bd/agents weevely.py
any ideas?
thanks
No idea, never had the need of used a compiled version.