Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

Refactored the legacy gRPC-based Reverse Shell to use the new Portals infrastructure.
This involves changes to the Protocol Buffers, the Rust agent (imixv2), the transport library, and the Go C2 server (tavern).
The ReverseShell RPC has been replaced by CreatePortal carrying Motes with ReplMessage payloads.
The WebSocket handler in tavern now bridges to the PortalMux instead of the legacy stream.Mux.


PR created automatically by Jules for task 9871010882071058583 started by @KCarretto

- Defined `REPLMessage` in `portal.proto`.
- Removed `ReverseShell` from `c2.proto`.
- Updated `imixv2` (agent) to use `create_portal` for REPL and PTY.
- Updated `transport` crate to remove `reverse_shell`.
- Updated `tavern` (server):
    - Rewrote `websocket.go` to bridge WebSocket to `portalMux` using `Portal` entities.
    - Updated `api_create_portal.go` to handle keepalives.
    - Removed legacy `api_reverse_shell.go` and related tests.
    - Regenerated Go protos.
- Cleaned up unused code and updated tests.
@google-labs-jules
Copy link
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@@ -0,0 +1,231 @@
Fresh unicode-ident v1.0.22
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jules, remove this log file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed implants/lib/pb/build.log.

- Removed `implants/lib/pb/build.log` which was accidentally committed.
- Updated `tavern/internal/http/stream/websocket.go` to use `portalMux` and bridge WebSocket messages to `Mote`s with `REPLMessage` payloads.
- Updated `NewShellHandler` to accept `portal_id` (via `shell_id` param) and verify `Portal` existence.
- Updated `tavern/app.go` to pass `portalMux` to WebSocket handlers and remove old shell mux initialization.
- Updated `tavern/config.go` to remove `NewShellMuxes` configuration.
- Deleted obsolete mux code in `tavern/internal/http/stream/`: `stream.go`, `mux.go`, `circular_buffer.go`, `gcp_coldstart.go` and their tests.
- Re-verified tests pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants