2

As part of an exercise, I am targeting a Linux system deployed in a very unusual and restricted networking environment. Among other things, there is no traditional networking route between the attacking machine and the victim machine; the machines cannot ping each other, nor can they communicate via TCP/IP.

I have discovered a communications channel between the machines, and have written code that runs on the attacking machine. It opens the channel and ultimately gives the user on the attacking machine a shell on the victim machine.

An interaction looks something like this:

me@attacking-machine $ ./open-shell-on-victim --foo=foo_stuff --bar=bar_stuff
Connecting...done
# Now I have a shell on the victim machine
user@victim-machine $ whoami
user
user@victim-machine $ hostname
victim-machine

Now that I have a shell on the victim, I would like to leverage this to use metasploit to search for ways to escalate my privileges.

My questions are:

  1. Now that I have a shell that I can launch by running a command on the attacking machine, how can I import this into a metasploit session, so I can use and manage the connection from the metasploit command line?

  2. Is it possible to upgrade this shell to a meterpreter session, and if so, how to go about doing so? Recall that there is no TCP/IP networking connection between the machines; the only communication is via the channel that I am exploiting to get the shell.

thxwws
  • 21
  • 1

0 Answers0