Skip to content

Instantly share code, notes, and snippets.

@fer
Created March 27, 2022 21:54
Show Gist options
  • Save fer/68410dfc229e9df557fec6af51c4ab00 to your computer and use it in GitHub Desktop.
Save fer/68410dfc229e9df557fec6af51c4ab00 to your computer and use it in GitHub Desktop.
kali tricks

Terminator

https://terminator-gtk3.readthedocs.io/en/latest/

image

Plugin: CustomCommandsMenu

Upgrade Reverse Shell to Fully Interactive TTY

Name Command
TTY/Upgrade TTY python -c "import pty;pty.spawn('/bin/bash')"
TTY/Fix TTY 1 printf "\n\n(Rows,Cols)\n ";printf '\e[1;91m%-6s\e[m' $(stty size);printf "\n\nTerm= \e[91m$TERM\e[0m\n\n";stty raw -echo;fg;
TTY/Fix TTY 2 export SHELL=bash;export TERM=xterm-256color;stty rows 20 columns 100;\echo ;echo ;read -p "Enter Rows:" ROWS;read -p "Enter Cols:" COLS;stty rows $ROWS columns $COLS && clear

Once you get a reverse shell:

  1. Right click → Custom Commands → TTY → Upgrade TTY Python
  2. Press ctrl+z to background
  3. Right click → Custom Commands → TTY → Fix TTY 1
  4. Right click → Custom Commands → TTY → Fix TTY 2
  5. Enter the row and col values as prompted from step 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment