# Real time collaboration platform
Radare2 has been a successful reverse engineering framework and a toolset for years. But apart from the decompilation the biggest missing feature - lack of the real time collaboration, which is important in case of reversing large files, playing CTFs in a teams. There are successful examples like collabREate, YaCo and solIDArity (proprietary/$$$). From public tools collabREate is the most complete and common, and it supports notifications (and online propagation) of those actions:
- Change address/region type (code, data, unknown)
- Segment add, delete, move, change (like 32->64 bit, flags)
- Rename addr
- Function update (add, remove, bounds change)
- Comment updated
- Byte(s) patched
- Operand type changed (I assume hex, dec, str, offset, etc)
- Enum updates
- Struct type added, changed, or deleted (including unions?)
- Function tail/chunk added or deleted
- Signature (e.g. FLIRT or internal format) function identified (would just be "function renamed" or signature matched)
- Crossreference addition/deletion
The exact list can be changed upon consultations. The resulting code and development process should be performed on GitHub platform.
Task
- Implement a simple server in Go to handle connections of multiple radare2 instances
- Add the users and projects management capabilities to the server (I think Gitea-like model is good)
- Write a basic documentation about code architecture, API
Required skills
Ability to code and understand C and Go.
Difficulty: Medium
Evaluation
1. Simple server in Go (with conflict resolution) is up and running + some tests of it
2. Demo of small fake programs using C API to create new user, new project, connect to the server and sync, demo of resolving conflict
Links/Resources
- #7410 Hooks for realtime collaboration - https://github.com/radare/radare2/issues/7410
- SolIDArity - https://solidarity.re
- CollabREate - https://github.com/cseagle/collabREate
- YaCo - https://github.com/DGA-MI-SSI/YaCo)
- revsync - https://github.com/lunixbochs/revsync
The possible architecture of the platform:
WebUI [1] (microservice in Go) <-> Server [2] (microservice in Go) <-> C library of client [3].
The project management (create/remove/add user in project/remove user from project) should be done in the Server [2]. The user management - too. Those functions are exported in some way for using in WebUI microservice (RPC maybe?). The file storage is a filesystem, for storing initial files (in binary format), state and differences (in text format) using [Git Go library](https://github.com/src-d/go-git),
those text differences are "r2 commands", which are sent by C api library.
Conflict resolution is done via standard Git features - rebase/merge.