From ed918fa9cdfac8fa41a931b812386c62e920849b Mon Sep 17 00:00:00 2001 From: Eneru Date: Sat, 4 May 2024 11:55:58 +0200 Subject: [PATCH] Add WSL case for Spawn TTY Shell in shell-reverse-cheatsheet.md --- docs/cheatsheets/shell-reverse-cheatsheet.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/cheatsheets/shell-reverse-cheatsheet.md b/docs/cheatsheets/shell-reverse-cheatsheet.md index 9968575..71b3fe2 100644 --- a/docs/cheatsheets/shell-reverse-cheatsheet.md +++ b/docs/cheatsheets/shell-reverse-cheatsheet.md @@ -555,6 +555,20 @@ export TERM=xterm-256color stty rows columns ``` +: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 +# Create a new window in tmux +## then + +# 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 +``` + or use `socat` binary to get a fully tty reverse shell ```bash