I got the remote control of a linux machine with Shellshock attack in Kali Linux (attacker machine) to a TinyCore Linux (victim machine), I used this module to attack the CGI vulnerability:

use exploit/multi/http/apache_mod_cgi_bash_env_exec

When I'm inside the machine I want to get the root privilege with my user, by default Shellshock doesn't gives you the root user, but I want to transform my user to the root privileges, I've tried this with sudo controls but my shell meterpreter doesn't recognize that command options, is there an alternative way of get the privileges of the root with the user that I obtain in Metasploit?

Could be a working option change the user that I have (consulting getuid) to 0:0 in the /etc/passwd password fields in the file?

  • 4
    This question is too broad. Privilege escalation is not a simple and always standard process. Also meterpreter doesn't recognize sudo as a command simply because it's not a meterpreter command but a shell command, you have to be in a shell to be able to use sudo. – game0ver Jan 5 '19 at 22:09
  • 1
    Could be a working option change the user that I have to 0:0 in the /etc/passwd: You cannot, because you need root to do that. – ThoriumBR Jan 14 '19 at 13:27

You'll need to identify and exploit a privilege escalation vulnerability on the machine.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.