How devobass/grevshell works
grevshell is an educational TCP reverse-shell client/server with command execution and file transfer over a shared authenticated, encrypted protocol. The client connects and exchanges a key, then its prompt loop sends command or file directives; the server dispatches each request, runs commands or handles files, and returns responses. Shared framing serializes packets and encrypts them, while key exchange derives and confirms the session key. The README documents these capabilities; the graph’s implementation links are based on the shown source excerpts.
Main entry points: client.go Client session · main.go Request dispatcher · processing.go Packet framing · encryption.go Key exchange
Components 11
Client
- Client session
grevclient/client.go - Client file I/O
grevclient/client.go
Server
- TCP listener
main.go - Request dispatcher
main.go - Command execution
main.go - Server file I/O
main.go
Shared protocol
- Key exchange
grevcore/encryption.go - AES-GCM
grevcore/encryption.go - Packet framing
grevcore/processing.go - Packet model
grevcore/headers.go
Other components
- Operator
Connections 12
- Operator → Client session: enters directives
README.md - Client session → Key exchange: exchanges key
grevclient/client.go - Client session → Packet framing: sends and receives
grevclient/client.go - Client session → Client file I/O: reads and writes
grevclient/client.go - Client session → TCP listener: connects over TCP
README.md - TCP listener → Key exchange: exchanges key
main.go - TCP listener → Request dispatcher: dispatches requests
main.go - Request dispatcher → Packet framing: receives and sends
main.go - Request dispatcher → Command execution: runs command
main.go - Request dispatcher → Server file I/O: handles transfers
main.go - Packet framing → AES-GCM: encrypts and decrypts
grevcore/processing.go - Packet framing → Packet model: assembles and parses
grevcore/processing.go