Skip to content
KitploitKITPLOIT
أدواتالمدونة
إرسال
أدواتالمدونة
إرسال

أدوات الاختراق واختبار الاختراق والأمن السيبراني لترسانتك الأمنية!

Kitploit هو دليل لأدوات الاختراق والأمن السيبراني واختبار الاختراق. اكتشف آخر تحديثات المشاريع للعثور على الثغرات وتحليل الأنظمة وأتمتة الاختبارات وتعزيز أمنك.

··الخلاصات·اتصال·الخصوصية·© 2026 Kitploit

دليل الأدوات

الفئات

عرض جميع الفئات
Loading categories
REC2 — REC2 (Rusty External Command and Control) is client and server tool allowing auditor to execute command from VirusTotal and Mastodon APIs written in Rust. 🦀 | Kitploit
أدوات/GitHubGitHub/g0h4n/rec2
Post-ExploitationPenetration TestingCommand and ControlRed TeamingRemote Access ToolPayload Development
GitHubg0h4n/rec2

REC2

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

عرض المستودع
16222منذ 2 سنواتتمت المراجعة من قبل Kitploit

الأكثر شعبية

عرض الكل →

اكتشف الأدوات الأكثر استخدامًا من قبل مجتمعنا.

استكشف جميع الأدوات

تصفح مجموعتنا من الأدوات

عرض جميع الأدوات →
مشاركة

:shipit: معلومة: REC2 هو مشروع شخصي قديم (أوائل 2023) لم أواصل تطويره. إنه جزء من قائمة مشاريع ساعدتني على تعلّم Rust. من المحتمل أن الكود يُعتبر قديمًا وليس في أفضل صورة. ربما سأكمل من حيث توقفت #roadmap. ومع ذلك، فإن REC2 يعمل بكامل وظائفه ويتيح تنفيذ الأوامر على هدف Linux / macOS أو Windows عبر واجهتَي VirusTotal وMastodon البرمجيتين.

REC2 (سيطرة وقيادة خارجية بلغة رست)

GitHub Windows supported Linux supported macOS supported Twitter Follow

logo

⚠️ إخلاء المسؤولية: REC2 مخصص للأغراض التعليمية فقط. استخدمه على مسؤوليتك الخاصة، ولا يمكن تحميلي مسؤولية أي أضرار ناتجة عنه. استخدام هذه الأداة لمهاجمة الأهداف دون موافقة مسبقة متبادلة غير قانوني. تقع على عاتق المستخدم النهائي مسؤولية الامتثال لجميع القوانين المحلية والولائية والفيدرالية المعمول بها. لا أتحمل أي مسؤولية ولست مسؤولًا عن أي إساءة استخدام أو ضرر ناتج عن هذه الأداة.

🔴 الفريق الأحمر (Redteamer): أشاركك نسخة تجريبية من إحدى أدوات C2 الخارجية الخاصة بي والتي تستخدم virustotal وmastodon

🔵 الفريق الأزرق (Blueteamer): يمكنك العثور على مثال لقواعد yara لزرعات REC2 في هذا المستودع نفسه

🧮 الملخص

  • الوصف
  • الاستخدام والعرض التوضيحي
  • كيفية تجميعه؟
    • باستخدام Makefile
    • باستخدام Dockerfile
  • خارطة الطريق
  • الروابط

🏷️ الوصف

REC2، أو Rusty External Command and Control (السيطرة والقيادة الخارجية بلغة رست)، هي أداة متعددة الاستخدامات للتحكم والقيادة (C2) مطوّرة بلغة البرمجة Rust. توفر وسيلة سرية وفعّالة لإدارة الزرعات (العملاء) عن بُعد على أنظمة macOS وLinux وWindows. تستخدم REC2 واجهات برمجية تابعة لجهات خارجية مثل VirusTotal أو Mastodon لنقل الرسائل المشفرة باستخدام AES بين الخادم والزرعات، مما يسمح للمهاجمين بالعمل بشكل خفيّ عبر هذه القنوات الخارجية. يمكن للزرعات مراقبة المهام المعلّقة، واسترجاع المهام وفك تشفيرها وتنفيذها على النظام المستهدف، وإرسال النتائج بأمان مرة أخرى عبر نفس الواجهات البرمجية. يضيف استخدام هذه الواجهات البرمجية كوسيط طبقة إضافية من إخفاء الهوية، مما يقلل من سهولة تتبع أثر المهاجم.

schema

📺 الاستخدام والعرض التوضيحي

server client.exe

غيّر بعض القيم في implants/(mastodon,virustotal)/src/main.rs :

root@kitploit:~
// (MASTODON or VIRUSTOTAL) TOKEN 
// <https://mastodon.be/settings/applications>
// <https://developers.virustotal.com/reference/authentication>
let token = lc!("TOKEN").to_owned();
// (MASTODON or VIRUSTOTAL) FULL URL
//let full_url = lc!("https://mastodon.xx/@username/100123451234512345").to_owned();
let full_url = lc!("https://www.virustotal.com/gui/file/99ff0b679081cdca00eb27c5be5fd9428f1a7cf781cc438b937cf8baf8551c4d").to_owned();

أنشئ زرعة Windows x64 كملف ثنائي ثابت:

root@kitploit:~
make virustotal_windows
make mastodon_windows

يمكنك العثور على (rec2_virustotal_x64.exe أو rec2_mastodon_x64.exe) في مجلدك الحالي.

ولإنهاء الأمر، قم بتجميع ملف الخادم الثنائي:

root@kitploit:~
make c2server_release
./server_release -h
./server_release VirusTotal -h
./server_release Mastodon -h

# Example
./server_release VirusTotal --url <URL> --token <TOKEN> --key <AES_KEY>

الآن كل ما عليك فعله هو تنفيذ الزرعة على هدفك.

🚜 كيفية تجميعه؟

باستخدام Makefile

يمكنك استخدام أمر make لتجميعه لأنظمة Linux أو Windows أو mac0S.

المزيد من الأوامر في Makefile:

root@kitploit:~
REC2 Server:
usage: make c2server_debug
usage: make c2server_release
usage: make c2server_windows
usage: make c2server_windows_x64
usage: make c2server_windows_x86
usage: make c2server_linux
usage: make c2server_linux_aarch64
usage: make c2server_linux_x86_64
usage: make c2server_macos
usage: make c2server_arm_musl
usage: make c2server_armv7

VirusTotal implant:
usage: make virustotal_debug
usage: make virustotal_release
usage: make virustotal_windows
usage: make virustotal_windows_x64
usage: make virustotal_windows_x86
usage: make virustotal_linux
usage: make virustotal_linux_aarch64
usage: make virustotal_linux_x86_64
usage: make virustotal_macos
usage: make virustotal_arm_musl
usage: make virustotal_armv7

Mastodon implant:
usage: make mastodon_debug
usage: make mastodon_release
usage: make mastodon_windows
usage: make mastodon_windows_x64
usage: make mastodon_windows_x86
usage: make mastodon_linux
usage: make mastodon_linux_aarch64
usage: make mastodon_linux_x86_64
usage: make mastodon_macos
usage: make mastodon_arm_musl
usage: make mastodon_armv7

Dependencies:
usage: make install_windows_deps
usage: make install_macos_deps

Documentation:
usage: make c2server_doc
usage: make virustotal_doc
usage: make mastodon_doc

Cleaning:
usage: make clean

باستخدام Dockerfile

قم ببناء REC2 باستخدام docker للتأكد من توفر جميع التبعيات.

root@kitploit:~
docker build --rm -t rec2 .

# Then to build C2 server:
docker run --rm -v ./:/usr/src/rec2 rec2 c2server_windows
docker run --rm -v ./:/usr/src/rec2 rec2 c2server_linux
docker run --rm -v ./:/usr/src/rec2 rec2 c2server_macos


# Then to build VirusTotal implant:
docker run --rm -v ./:/usr/src/rec2 rec2 virustotal_windows
docker run --rm -v ./:/usr/src/rec2 rec2 virustotal_linux
docker run --rm -v ./:/usr/src/rec2 rec2 virustotal_macos

# Then to build Mastodon implant:
docker run --rm -v ./:/usr/src/rec2 rec2 mastodon_windows
docker run --rm -v ./:/usr/src/rec2 rec2 mastodon_linux
docker run --rm -v ./:/usr/src/rec2 rec2 mastodon_macos
عرض المزيد

باستخدام Cargo

ستحتاج إلى تثبيت Rust على نظامك.

https://www.rust-lang.org/fr/tools/install

:warining: تحتاج إلى تصدير متغير LITCRYPT_ENCRYPT_KEY في الطرفية قبل تجميعه. (لإخفاء نصوص الزرعات)

root@kitploit:~
export LITCRYPT_ENCRYPT_KEY="MYSUPERPASSWORD1234567890"
LITCRYPT_ENCRYPT_KEY="MYSUPERPASSWORD1234567890"

:warining: تحتاج إلى تغيير AESKEY في implants/(virustotal,mastodon)/main.rs وتغيير URL وTOKEN.

إليك كيفية تجميع نسختي "release" و"debug" باستخدام أمر cargo.

root@kitploit:~
git clone https://github.com/g0h4n/REC2
cd REC2

# Implants
# choise your implant Mastodon or VirusTotal

# implants/mastodon/Cargo.toml
# release version
cargo build --release --manifest --manifest-path implants/mastodon/Cargo.toml
# or debug version
cargo b --manifest-path implants/mastodon/Cargo.toml

# implants/virustotal/Cargo.toml
# release version
cargo build --release --manifest --manifest-path implants/virustotal/Cargo.toml
# or debug version
cargo b --manifest-path implants/virustotal/Cargo.toml

# Server
cargo build --release --manifest --manifest-path server/Cargo.toml
# or debug version
cargo b --manifest-path server/Cargo.toml

🚦 خارطة الطريق

  • التشفير (CRYPTO)
    • AES
  • الزرعات (IMPLANTS)
    • الزرعات
  • الخادم (SERVER)
    • الجلسات (SESSION)
    • المهام (JOBS)
    • دالة التحقق من حالة المهام غير المتزامنة
    • دالة التحقق من حالة الجلسات غير المتزامنة
    • تحديد الجلسات الحالية باستخدام sessions -i 1 لإرفاق الجلسة رقم 1 [09/28/2023]
    • إضافة أمر background [09/28/2023]
  • الشبكات الاجتماعية (SOCIAL NETWORK)
    • MASTODON: https://docs.rs/megalodon/latest/megalodon/
    • VIRUSTOTAL: https://docs.rs/virustotal3/latest/virustotal3/
    • SOUNDCLOUD:

🔗 الروابط

  • https://github.com/D1rkMtr/VirusTotalC2
تنزيل الأداة

يمكن العثور على نتيجة الزرعات في مجلد implants/(mastodon,virustotal)/target/release أو في مجلد implants/(mastodon,virustotal)/target/debug. ويمكن العثور على نتيجة الخادم في مجلد server/target/release أو في مجلد server/target/debug.

أدناه يمكنك العثور على منهجية التجميع لكل نظام من أنظمة التشغيل انطلاقًا من Linux. إذا كنت بحاجة إلى نظام تجميع آخر، فيرجى الاطلاع على القائمة في هذا الرابط: https://doc.rust-lang.org/nightly/rustc/platform-support.html

التجميع اليدوي لإصدار Linux x86_64 الثابت

root@kitploit:~
# Install rustup and Cargo for Linux
curl https://sh.rustup.rs -sSf | sh

# Add Linux deps
rustup install stable-x86_64-unknown-linux-gnu
rustup target add x86_64-unknown-linux-gnu

# Static compilation for Linux
git clone https://github.com/g0h4n/REC2
cd REC2

# Implants
# choise your implant Mastodon or VirusTotal

# implants/mastodon/Cargo.toml
CFLAGS="-lrt";LDFLAGS="-lrt";RUSTFLAGS='-C target-feature=+crt-static';cargo build --release --target x86_64-unknown-linux-gnu --manifest-path implants/mastodon/Cargo.toml

# implants/virustotal/Cargo.toml
CFLAGS="-lrt";LDFLAGS="-lrt";RUSTFLAGS='-C target-feature=+crt-static';cargo build --release --target x86_64-unknown-linux-gnu --manifest-path implants/virustotal/Cargo.toml

# Server
CFLAGS="-lrt";LDFLAGS="-lrt";RUSTFLAGS='-C target-feature=+crt-static';cargo build --release --target x86_64-unknown-linux-gnu --manifest-path server/Cargo.toml

يمكن العثور على النتيجة في مجلد implants/(mastodon,virustotal)/target/x86_64-unknown-linux-gnu/release أو في مجلد server/target/x86_64-unknown-linux-gnu/release.

التجميع اليدوي لإصدار Windows الثابت من Linux

root@kitploit:~
# Install rustup and Cargo in Linux
curl https://sh.rustup.rs -sSf | sh

# Add Windows deps
rustup install stable-x86_64-pc-windows-gnu
rustup target add x86_64-pc-windows-gnu

# Static compilation for Windows
git clone https://github.com/g0h4n/REC2
cd REC2

# Implants
# choise your implant Mastodon or VirusTotal

# implants/mastodon/Cargo.toml
RUSTFLAGS="-C target-feature=+crt-static" cargo build --release --target x86_64-pc-windows-gnu --manifest-path implants/mastodon/Cargo.toml

# implants/virustotal/Cargo.toml
RUSTFLAGS="-C target-feature=+crt-static" cargo build --release --target x86_64-pc-windows-gnu --manifest-path implants/virustotal/Cargo.toml

# Server
RUSTFLAGS="-C target-feature=+crt-static" cargo build --release --target x86_64-pc-windows-gnu --manifest-path server/Cargo.toml

يمكن العثور على النتيجة في مجلد implants/(mastodon,virustotal)/target/x86_64-pc-windows-gnu/release أو في مجلد server/target/x86_64-pc-windows-gnu/release.

التجميع اليدوي لإصدار macOS الثابت من Linux

توثيق رائع: https://wapl.es/rust/2019/02/17/rust-cross-compile-linux-to-macos.html

root@kitploit:~
# Install rustup and Cargo in Linux
curl https://sh.rustup.rs -sSf | sh

# Add macOS tool chain
sudo git clone https://github.com/tpoechtrager/osxcross /usr/local/bin/osxcross
sudo wget -P /usr/local/bin/osxcross/ -nc https://s3.dockerproject.org/darwin/v2/MacOSX10.10.sdk.tar.xz && sudo mv /usr/local/bin/osxcross/MacOSX10.10.sdk.tar.xz /usr/local/bin/osxcross/tarballs/
sudo UNATTENDED=yes OSX_VERSION_MIN=10.7 /usr/local/bin/osxcross/build.sh
sudo chmod 775 /usr/local/bin/osxcross/ -R
export PATH="/usr/local/bin/osxcross/target/bin:$PATH"

# Cargo needs to be told to use the correct linker for the x86_64-apple-darwin target, so add the following to your project’s .cargo/config file:
grep 'target.x86_64-apple-darwin' ~/.cargo/config || echo "[target.x86_64-apple-darwin]" >> ~/.cargo/config
grep 'linker = "x86_64-apple-darwin14-clang"' ~/.cargo/config || echo 'linker = "x86_64-apple-darwin14-clang"' >> ~/.cargo/config
grep 'ar = "x86_64-apple-darwin14-clang"' ~/.cargo/config || echo 'ar = "x86_64-apple-darwin14-clang"' >> ~/.cargo/config

# Static compilation for macOS
git clone https://github.com/g0h4n/REC2
cd REC2

# Implants
# choise your implant Mastodon or VirusTotal

# implants/mastodon/Cargo.toml
RUSTFLAGS="-C target-feature=+crt-static" cargo build --release --target x86_64-apple-darwin --manifest-path implants/mastodon/Cargo.toml

# implants/virustotal/Cargo.toml
RUSTFLAGS="-C target-feature=+crt-static" cargo build --release --target x86_64-apple-darwin --manifest-path implants/virustotal/Cargo.toml

# Server
RUSTFLAGS="-C target-feature=+crt-static" cargo build --release --target x86_64-apple-darwin --manifest-path server/Cargo.toml

يمكن العثور على النتيجة في مجلد implants/(mastodon,virustotal)/target/x86_64-apple-darwin/release.

كيفية بناء التوثيق؟

root@kitploit:~
git clone https://github.com/g0h4n/REC2
cd REC2

# Implants
# choise your implant Mastodon or VirusTotal

# implants/mastodon/Cargo.toml
cargo doc --open --no-deps --manifest-path implants/mastodon/Cargo.toml

# implants/virustotal/Cargo.toml
cargo doc --open --no-deps --manifest-path implants/virustotal/Cargo.toml

# Server
cargo doc --open --no-deps --manifest-path server/Cargo.toml
https://docs.rs/soundcloud/latest/soundcloud/
  • هل لديك بعض الأفكار؟