# Upgrading Revshells

## Upgrading Linux Reverse Shell

Check for python on the system

```bash
which python
which python3
```

Import PTY for TTY Shell

```bash
python3 -c 'import pty;pty.spawn("/bin/bash")'
```

Background the process using CTRL+Z

Then in the attackbox terminal type:

```bash
stty raw -echo;fg
```

Then hit enter twice and you will be back in the revershe shell

Then type&#x20;

```bash
export TERM=xterm
```

Now you can clear the terminal and have a fully TTY shell.

## Alternate TTY Shell with Script

```bash
which script
```

If script exists, we can use it to achieve a TTY shell

```bash
SHELL=/bin/bash script -q /dev/null
```

Background the process using CTRL+Z

Then in the attackbox terminal type:

```bash
stty raw -echo;fg
```

Then hit enter twice and you will be back in the revershe shell

Then type&#x20;

```bash
export TERM=xterm
```
