Skip to content

Instantly share code, notes, and snippets.

View rhovelz's full-sized avatar
:octocat:
hm?

R rhovelz

:octocat:
hm?
View GitHub Profile
# cat << EOF > /dev/null
# https://github.com/gpakosz/.tmux
# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license,
# without any warranty.
# Copyright 2012— Gregory Pakosz (@gpakosz).
# /!\ do not edit this file
# instead, override settings in ~/.tmux.conf.local, see README.md
background no
use_xft yes
font Terminus:size=8
xftalpha 0.5
update_interval 1
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_argb_visual yes
background no
use_xft yes
font Terminus:size=8
xftalpha 0.5
update_interval 1
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_argb_visual yes
### Reverse Shell Cheat Sheet
If you’re lucky enough to find a command execution vulnerability during a penetration test, pretty soon afterwards you’ll probably want an interactive shell.
If it’s not possible to add a new account / SSH key / .rhosts file and just log in, your next step is likely to be either trowing back a reverse shell or binding a shell to a TCP port. This page deals with the former.
Your options for creating a reverse shell are limited by the scripting languages installed on the target system – though you could probably upload a binary program too if you’re suitably well prepared.
The examples shown are tailored to Unix-like systems. Some of the examples below should also work on Windows if you use substitute “/bin/sh -i” with “cmd.exe”.
# cat << EOF > /dev/null
# https://github.com/gpakosz/.tmux
# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license,
# without any warranty.
# Copyright 2012— Gregory Pakosz (@gpakosz).
# /!\ do not edit this file
# instead, override settings in ~/.tmux.conf.local, see README.md
# -- general -------------------------------------------------------------------
# cat << EOF > /dev/null
# https://github.com/gpakosz/.tmux
# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license,
# without any warranty.
# Copyright 2012— Gregory Pakosz (@gpakosz).
# /!\ do not edit this file
# instead, override settings in ~/.tmux.conf.local, see README.md
# -- general -------------------------------------------------------------------
#!/bin/bash
TEXT_RESET='\e[0m'
TEXT_YELLOW='\e[0;33m'
TEXT_RED_B='\e[1;31m'
sudo apt-get update -y
echo -e $TEXT_YELLOW
echo 'APT update finished...'
echo -e $TEXT_RESET
#############################
########## Bindings
#############################
# Set the prefix to `ctrl + a` instead of `ctrl + b`
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Automatically set window title
127.0.0.1 localhost
127.0.1.1 corshine.corshine corshine
============================================================
# ---------------------------------------------------
# Vimeo
# ---------------------------------------------------
151.101.64.217 player.vimeo.com
151.101.129.194 vimeo-hp-videos.global.ssl.fastly.net
# Range or Prefix Vendor Virtual Machine
1 08:00:27 Pcs Systemtechnik GmbH Oracle VirtualBox 5.2
2 52:54:00 (Exact MAC: 52:54:00:C9:C7:04) Oracle VirtualBox 5.2 + Vagrant
3 00:21:F6 Oracle Corp Oracle VirtualBox 3.3
4 00:14:4F Oracle Corp Oracle VM Server for SPARC
5 00:0F:4B Oracle Corp Oracle Virtual Iron 4