Shell

class baboossh.Shell[source]

BabooSSH Shell interface

This class extends cmd2.Cmd to build the user interface.

intro

The banner printed on program start

Type

str

prompt

The default prompt

Type

str

workspace

The current open baboossh.Workspace

Type

Workspace

debug

Boolean for debug output

Type

bool

__init__()[source]

Init BabooSSH shell & cmd2.Cmd, create (if needed) & open default workspace.

Methods

__init__()

Init BabooSSH shell & cmd2.Cmd, create (if needed) & open default workspace.

do_connect(stmt)

Try to authenticate on an Enpoint using a User and Creds

do_connection(stmt)

List and delete working connections.

do_creds(stmt)

Create, list, edit and delete credentials.

do_endpoint(stmt)

Create, list, search and delete endpoints.

do_exit(arg)

Close active workspace & quit Baboossh

do_export(stmt)

Export workspace info

do_host(stmt)

Search, list and delete hosts.

do_import(stmt)

Import workspace info

do_path(stmt)

Manage paths

do_payload(stmt)

List available payloads

do_probe(stmt)

Try to reach an endpoint through pivoting, using an existing path or finding a new one

do_run(stmt)

Run a payload on a connection

do_scope(stmt)

Toggle object in/out of scope

do_set(stmt)

Set the workspace active options.

do_tunnel(stmt)

Manage tunnels

do_user(stmt)

Create, list and delete users.

do_workspace(stmt)

Create, list, delete and use workspaces.

emptyline()

Don’t output empty line after command

postcmd(stop, line)

Refresh promt after each command to reflect parameters changes

Attributes

intro

prompt

do_connect(stmt)[source]

Try to authenticate on an Enpoint using a User and Creds

do_connection(stmt)[source]

List and delete working connections.

A connection object is saved whenever a user and a creds object work on an endpoint, as tested by the “connect” command. Once the object is created, it can be used with “set” and “run” to run payloads.

do_creds(stmt)[source]

Create, list, edit and delete credentials.

Credentials are secrets used to authenticate. They can be of different types (see “creds types” to list supported types) and are used with “set” and “connect”.

The creds object provides a unified interface for the underlying types.

do_endpoint(stmt)[source]

Create, list, search and delete endpoints.

An endpoint is a couple of an IP and a port on which a SSH service should be running. Once added, an endpoint must be reached using “probe” and then connected using “connect”.

do_exit(arg)[source]

Close active workspace & quit Baboossh

do_export(stmt)[source]

Export workspace info

do_host(stmt)[source]

Search, list and delete hosts.

You can list or delete hosts, and use them as pivots to force using a specific path. Host addition is performed automatically when you successfully connect to an endpoint for the first time.

do_import(stmt)[source]

Import workspace info

do_path(stmt)[source]

Manage paths

do_payload(stmt)[source]

List available payloads

do_probe(stmt)[source]

Try to reach an endpoint through pivoting, using an existing path or finding a new one

do_run(stmt)[source]

Run a payload on a connection

do_scope(stmt)[source]

Toggle object in/out of scope

do_set(stmt)[source]

Set the workspace active options.

Once set, the options will be used when running “probe”, “connect” and “run” without parameters to define which connections to target and which payload to run with which options.

do_tag(stmt)[source]

Manage tags

do_tunnel(stmt)[source]

Manage tunnels

do_user(stmt)[source]

Create, list and delete users.

A user is a username used to authenticate on an endpoint. Once a user is added to the workspace, it can be used with “set” and “connect”.

do_workspace(stmt: argparse.Namespace)[source]

Create, list, delete and use workspaces.

Each workspace is a container for every object available in BabooSSH. Having several workspaces allows you to segregate various environments, keeping your findings and your loot organised.

emptyline()[source]

Don’t output empty line after command

postcmd(stop, line)[source]

Refresh promt after each command to reflect parameters changes