Giter Site home page Giter Site logo

g0h4n / rec2 Goto Github PK

View Code? Open in Web Editor NEW
126.0 5.0 18.0 315 KB

REC2 (Rusty External Command and Control) is client and server tool allowing auditor to execute command from VirusTotal and Mastodon APIs written in Rust. ๐Ÿฆ€

License: MIT License

Dockerfile 0.22% Makefile 13.80% Rust 85.29% YARA 0.68%
c2 cross-compile cross-platform external mastodon redteam rust virustotal

rec2's People

Contributors

g0h4n avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rec2's Issues

REC2 Compilation error - Rust version ?

Hello g0h4n, hope you're doing well !

Following your documentation, I'm trying to use Docker to compile REC2 Linux server and Windows implant for VirusTotal.

Executing sudo docker build --rm -t rec2 . succeeds, but executing next sudo docker run --rm -v ./:/usr/src/rec2 rec2 c2server_linux fails with the error :

[SNIP]
  Downloaded tokio v1.36.0
  Downloaded ring v0.17.7
error: package `clap_lex v0.7.0` cannot be built because it requires rustc 1.74 or newer, while the currently active rustc version is 1.72.1
Either upgrade to rustc 1.74 or newer, or use
cargo update -p [email protected] --precise ver
where `ver` is the latest version of `clap_lex` supporting rustc 1.72.1
make: *** [Makefile:95: c2server_build_linux_x86_64] Error 101

As the error suggests, I edited the Dockerfile to target the latest Rust version :

FROM docker.io/rust:latest

WORKDIR /usr/src/rec2

RUN \
	apt-get -y update && \
	apt-get -y install gcc clang libclang-dev musl-tools make gcc-mingw-w64-x86-64 pkg-config libudev-dev libssl-dev && \
	rm -rf /var/lib/apt/lists/*

ENTRYPOINT ["make"]

This time, it fails with a different error :

[SNIP]
  Downloaded slab v0.4.9
  Downloaded virustotal3 v3.0.2
   Compiling server v0.0.2 (/usr/src/rec2/server)
error[E0609]: no field `data` on type `Result<CommentGetResponse, anyhow::Error>`
  --> src/modules/rec2virustotal.rs:60:15
   |
60 |     if result.data.len() >= 1 {
   |               ^^^^ unknown field
   |
help: one of the expressions' fields has a field of the same name
   |
60 |     if result.unwrap().data.len() >= 1 {
   |               +++++++++

error[E0609]: no field `data` on type `Result<CommentGetResponse, anyhow::Error>`
  --> src/modules/rec2virustotal.rs:62:25
   |
62 |         for c in result.data {
   |                         ^^^^ unknown field
   |
help: one of the expressions' fields has a field of the same name
   |
62 |         for c in result.unwrap().data {
   |                         +++++++++

error[E0609]: no field `data` on type `Result<CommentPutResponse, anyhow::Error>`
  --> src/modules/rec2virustotal.rs:95:39
   |
95 |     trace!("Post answer {:?}", result.data);
   |                                       ^^^^ unknown field
   |
help: one of the expressions' fields has a field of the same name
   |
95 |     trace!("Post answer {:?}", result.unwrap().data);
   |                                       +++++++++

For more information about this error, try `rustc --explain E0609`.
error: could not compile `server` (lib) due to 3 previous errors
make: *** [Makefile:95: c2server_build_linux_x86_64] Error 101

Are you currently able to compile the REC2 project ? I am available on Discord if you want to debug further.

All the best,
Nariod

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.