Hakan Nohre

Meterpreter cannot create shell on linux - I get core_channel_write: Operation failed

Discussion created by Hakan Nohre on Aug 7, 2017

Running a lab environment that has been working fine for 1 year ++.

 

After upgrading Metasploit, when I have a meterpreter shell I cannot get OS shell on compromised linux machine.

 

Have meterpreter sessions to 2 systems, one windows and one linux Ubuntu

Windows session works fine.

On the linux session I can run commands, sysinfo, getuid, and I can upload files.

But when I try to shell I get an error on core_channel_write, see below.
This is a new issue with later versions of metasploit.

meterpreter > sysinfo
Computer : iot.notmyname.com
OS : Ubuntu 10.10 (Linux 2.6.35-22-server)
Architecture : x64
Meterpreter : x86/linux
meterpreter > getuid
Server username: uid=33, gid=33, euid=33, egid=33
meterpreter > shell
Process 1130 created.
Channel 3 created.

[-] core_channel_write: Operation failed: 9
meterpreter >

System stuff

Metasploit version

msf exploit(apache_mod_cgi_bash_env_exec) > version
Framework: 4.15.2-dev
Console : 4.15.2-dev

Get this with the version command in msfconsole (or git log -1 --pretty=oneline for a source install).

I installed Metasploit with:

  • Kali package via apt

OS

What OS are you running Metasploit on?

root@kali2:~# cat /etc/issue
Kali GNU/Linux Rolling \n \l

Outcomes