Reverse shell. Extrange characters when pressing ESC, arrow, etc. '^[[A'

@3TON said:

Hi everyone.
I can’t upgrade simple shells to fully interactive shell.
python,perl, and socat are not installed on the target machine.
binary files cannot be run.
when I try to use this method:
Ctl+Z
stty raw -echo
fg
reset
xterm-256color
export $TERM=xterm
export $SHELL=bash

then after returning to the reverse shell session (using the “fg” command), I can only type text, but the ‘enter’ key does not work.
perhaps someone has encountered such a situation, I would be very grateful for any advice.

I’ve found that shell upgrades can be a bit tempermental. Not every box facilitates them because it can be down to a lot of factors.

Most of the time I find its quicker to just work with a less than perfect shell.

also, taking this opportunity, I would like to ask about a way to elevate rights using unux2dox, which has a SETUID bit.

Normally if something has SETUID set and runs as root its a case of working out what it does, then subverting that to get it to give you root access. If that binary is a text file converter you might be able to use it to read content that is otherwise restricted - for example: root flags; shadow files etc.