I'm doing OSCP, and have been on this problem for a while. I need some guidance on this.
I manage to get a weevely shell to a lab machine via SQL injection.
The OS is CentOS 5.4
The user is "apache", a low-privilege user.
Downloading and uploading to this server is not possible.
wget, curl and ftp are available, but have been rendered useless by some sort of firewall. This is only my suspicion, because I can still run the help command of these programs. Since I cannot view Iptables -L, I cannot say anything about firewall setting.
Most weevely modules (download from URL, spawning tcp shell) are not useable. The reason might be the firewall.
However: I can use SQL injection to write to webpage root folder as root. The file is "rw" to all users, but not "x".
Running basic shell commands such as: find, ls, cat, echo, is ok.
There are python, perl, php and gcc. I can compile C, run python and the like.
*Currently, I'm trying to echo a C file to the /tmp folder, and compile it get a meterpreter.