Skip to content

Commit

Permalink
Merge pull request #11 from Eneru/main
Browse files Browse the repository at this point in the history
Workaround when using WSL container to upgrade TTY shell
  • Loading branch information
swisskyrepo committed May 5, 2024
2 parents 348be59 + 305f78b commit 33f007a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/cheatsheets/shell-reverse-cheatsheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,26 @@ export TERM=xterm-256color
stty rows <num> columns <cols>
```

:warning: With Windows Terminal + WSL container, `[CTRL] + [Z]` can get you out of / freeze the container.
To overcome this issue, run `nc` in a `tmux`, and send a `SIGTSTP` signal to the `nc` process.

```bash
# Enter in tmux
tmux

# Do your netcat stuff ...
nc -lnvp 4242

# Create a new window in tmux
ctrl+b c

# Find the PID of the nc process (column PID)
ps aux # | grep -i nc | grep -vi grep

# Send a SIGTSTP (ctrl+z) signal to the process
kill -s TSTP <PID>
```

or use `socat` binary to get a fully tty reverse shell

```bash
Expand Down

0 comments on commit 33f007a

Please sign in to comment.