the_open_door
coffee
ESEN
← Tools

sshLOLBIN

Remote access and tunnels (port forwarding with -L).

Legitimate system binary (LOLBIN): not an offensive tool as such, but an attacker leverages it because it is usually already installed and raises fewer suspicions than dropping a dedicated tool.

A secure-shell client for remote access, but also one of the best pivoting tools: with -L, -R and -D it sets up local, remote and dynamic SOCKS forwarding to reach the internal network without uploading extra binaries.

Family Access, shells & transfer

Flags -L -R -D -N -i

Concepts Local port forwarding (SSH tunnel), Dynamic Port Forwarding (SOCKS), Remote Port Forwarding, Credential reuse

Cheatsheet SSH forwarding

Installation

sudo apt install -y openssh-client

Useful commands5 commands

When it fails

  • Load key "/root/.ssh/id_rsa": error in libcryptoLocal noise, not the target's: the client tries to offer a private key it cannot read and carries on with password authentication. It looks like a connection error and it is not.seen in Servmon

Appears in

Some machines where its use is documented; not an exhaustive list.