Framework keamanan siber berbasis C untuk pengujian penetrasi multi-protokol dengan dukungan brute force pada HTTP, FTP, SSH, dan MySQL.
- Deskripsi Proyek
- Fitur Utama
- Struktur Proyek
- Alur Kerja Sistem
- Permasalahan & Solusi
- Instalasi
- Cara Penggunaan
- Kompilasi
- Dependensi
CyberForce adalah tools security testing yang dirancang untuk melakukan pengujian keamanan pada berbagai protokol jaringan. Tools ini menggunakan teknik brute force dengan fitur rate limiting, proxy rotation, dan multi-threading untuk efisiensi maksimal.
- Menyediakan framework testing keamanan yang fleksibel
- Mendukung multiple protokol (HTTP, FTP, SSH, MySQL)
- Optimasi performa dengan multi-threading
- Kompatibilitas cross-platform (Linux & Windows)
- HTTP/HTTPS Basic Auth & Form-based Auth
- FTP Authentication
- SSH Key & Password Auth
- MySQL Database Auth
- Rate Limiting: Kontrol kecepatan request untuk menghindari deteksi
- Proxy Rotation: Rotasi proxy otomatis untuk anonymitas
- Multi-Threading: Parallel execution hingga 100 threads
- Custom Wordlist: Support untuk wordlist kustom
- User-Agent Rotation: Random user-agent untuk web requests
- Pattern Matching: Custom pattern untuk response analysis
Ikuti langkah-langkah berikut untuk menjalankan CyberForce di sistem Anda:
Untuk Windows (Menggunakan MSYS2):
- Download dan Install MSYS2.
- Buka terminal MSYS2 UCRT64.
- Jalankan perintah berikut untuk menginstall compiler dan library:
pacman -S mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-make mingw-w64-ucrt-x86_64-curl mingw-w64-ucrt-x86_64-libssh mingw-w64-ucrt-x86_64-openssl
Untuk Linux (Debian/Ubuntu):
sudo apt-get update
sudo apt-get install build-essential libcurl4-openssl-dev libssh-dev libssl-devPilih salah satu metode kompilasi berikut:
- Metode Cepat (Windows - Tanpa Library Eksternal):
.\quick_compile.bat - Metode Lengkap (Menggunakan Make):
# Di MSYS2 atau Linux terminal mingw32-make all # Untuk Windows make all # Untuk Linux
Pastikan Anda memiliki file username dan password di folder data/wordlists/. Anda bisa menggunakan file bawaan:
data/wordlists/common_users.txtdata/wordlists/common_passwords.txt
Gunakan perintah berikut untuk memulai pengujian (contoh HTTP):
.\cyberforce.exe -t http://example.com/login -u data/wordlists/common_users.txt -p data/wordlists/common_passwords.txt -T 10CyberForce akan menampilkan hasil secara real-time di terminal. Jika serangan berhasil, detail credential akan muncul dengan tanda [SUCCESS].
c-secforce/
├── src/
│ ├── main.c # Entry point aplikasi
│ ├── include/
│ │ ├── cyberforce.h # Header utama
│ │ ├── defines.h # Konstanta & defines
│ │ └── protocols.h # Protocol definitions
│ ├── core/
│ │ ├── attack_engine.c # Engine utama untuk attack orchestration
│ │ ├── protocol_handlers.c # Routing protokol ke modul terkait
│ │ ├── rate_limiter.c # Rate limiting implementation
│ │ └── thread_manager.c # Thread pool & management
│ ├── modules/
│ │ ├── http_brute.c # HTTP/HTTPS brute force module
│ │ ├── ftp_brute.c # FTP brute force module
│ │ ├── ssh_brute.c # SSH brute force module
│ │ └── mysql_brute.c # MySQL brute force module
│ └── utils/
│ ├── logger.c # Logging system
│ ├── wordlist_gen.c # Wordlist generator
│ ├── pattern_matcher.c # Pattern matching untuk response
│ ├── proxy_rotator.c # Proxy rotation logic
│ └── crypto_helper.c # Cryptographic utilities
├── data/
│ ├── wordlists/
│ │ ├── common_passwords.txt # Password wordlist
│ │ ├── common_users.txt # Username wordlist
│ │ └── user_agents.txt # User-Agent list
│ └── user_agents.txt
├── examples/
│ ├── config.json # Example configuration
│ └── scripts/
│ └── test_http.sh # Test script untuk HTTP module
├── Makefile # Build automation
├── Dockerfile # Container deployment
├── simple_cyberforce.c # Standalone version (tanpa dependencies)
├── build_msys2.bat # Build script untuk MSYS2
├── quick_compile.bat # Quick compilation script
└── README.md # Dokumentasi ini
User Input → Parse Arguments → Validate Parameters → Initialize Components
- User memberikan target, protokol, wordlist
- Parsing menggunakan getopt (atau stub untuk Windows)
- Validasi parameter (URL format, file exists, thread count)
- Setup logger, rate limiter, thread pool
Load Wordlist → Dispatch to Protocol Handler → Execute Attack → Collect Results
- Membaca wordlist dari file atau generate otomatis
- Menentukan protokol handler yang sesuai
- Membagi workload ke multiple threads
- Mengumpulkan hasil dan statistik
Identify Protocol → Route to Module → Execute Module Function
- HTTP →
http_attack()di http_brute.c - FTP →
ftp_attack()di ftp_brute.c - SSH →
ssh_attack()di ssh_brute.c - MySQL →
mysql_attack()di mysql_brute.c
Initialize Connection → Apply Rate Limit → Send Request → Analyze Response → Log Result
- Setup socket/curl connection
- Apply delay sesuai rate limit
- Kirim authentication request
- Check response code (200, 401, 403, etc.)
- Log success/failure dengan detail timing
Create Thread Pool → Assign Tasks → Monitor Progress → Join Threads → Aggregate Results
- Membuat pool dengan N threads
- Mendistribusikan credential pairs ke threads
- Monitor status setiap thread
- Cleanup setelah selesai
Check Current Rate → Calculate Delay → Sleep if Needed → Update Counter
- Mencegah flood request ke target
- Implementasi token bucket algorithm
- Dynamic adjustment berdasarkan response time
fatal error: unistd.h: No such file or directory
fatal error: arpa/inet.h: No such file or directory
fatal error: sys/socket.h: No such file or directory
- Header POSIX (unistd.h, arpa/inet.h, sys/socket.h) tidak tersedia di Windows
- Kode awal ditulis untuk Linux/Unix system
Menambahkan conditional compilation untuk Windows:
#ifdef _WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
#include <windows.h>
#pragma comment(lib, "ws2_32.lib")
#else
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netdb.h>
#endifundefined reference to `clock_gettime'
undefined reference to `nanosleep'
- Fungsi POSIX tidak ada di Windows API
Implementasi custom untuk Windows di rate_limiter.c:
#ifdef _WIN32
int clock_gettime(int clk_id, struct timespec *tp) {
FILETIME ft;
ULARGE_INTEGER li;
GetSystemTimeAsFileTime(&ft);
li.LowPart = ft.dwLowDateTime;
li.HighPart = ft.dwHighDateTime;
// Convert to timespec
tp->tv_sec = (li.QuadPart - 116444736000000000ULL) / 10000000ULL;
tp->tv_nsec = (li.QuadPart % 10000000ULL) * 100;
return 0;
}
int nanosleep(const struct timespec *req, struct timespec *rem) {
Sleep((DWORD)(req->tv_sec * 1000 + req->tv_nsec / 1000000));
return 0;
}
#endifundefined reference to `getopt'
- getopt() adalah GNU extension, tidak ada di MinGW default
Stub implementation di main.c:
#ifdef _WIN32
int getopt(int argc, char *const argv[], const char *optstring) {
return -1; // Stub untuk sementara
}
#endifgcc compilation success but no .exe file created
- Windows Defender memblokir pembuatan executable
- GCC 15.2.0 dari MinGW-Builds memiliki masalah kompatibilitas
- Path dengan Unicode characters (ドキュメント) menyebabkan issues
Menggunakan diagnose.bat:
# Hasil diagnosis:
- RealTimeProtectionEnabled: True
- IoavProtectionEnabled: True
- GCC found but test.exe NOT created
- Kesimpulan: Windows Defender blocking-
Install MSYS2 (recommended):
# Download dari https://www.msys2.org/ # Install development tools: pacman -S mingw-w64-ucrt-x86_64-gcc pacman -S mingw-w64-ucrt-x86_64-make
-
Atau disable Windows Defender sementara (not recommended)
-
Atau compile di MSYS2 terminal:
cd "/c/Users/DELL/OneDrive/ドキュメント/ALL in ONE/TOOLS/c-secforce" mingw32-make clean mingw32-make all
make : The term 'make' is not recognized as the name of a cmdlet
maketidak tersedia di Windows PowerShell secara default- Perlu menggunakan MSYS2 atau MinGW make
Gunakan salah satu:
-
Build script (build_msys2.bat):
.\build_msys2.bat
-
Direct MSYS2 make:
C:\msys64\ucrt64\bin\mingw32-make.exe all -
MSYS2 Terminal:
mingw32-make all
mingw32-make: *** readdir .: Invalid argument. Stop.
- Path mengandung karakter Jepang (ドキュメント)
- MinGW make kesulitan membaca directory dengan Unicode
- Gunakan MSYS2 terminal langsung (native Unicode support)
- Atau compile simple version tanpa make:
gcc -o cyberforce.exe simple_cyberforce.c -O2 -Wall
-
Install MSYS2
# Download: https://www.msys2.org/ # Jalankan installer dan ikuti wizard
-
Update System
# Buka MSYS2 UCRT64 terminal pacman -Syu # Restart terminal jika diminta pacman -Su
-
Install Development Tools
pacman -S mingw-w64-ucrt-x86_64-gcc pacman -S mingw-w64-ucrt-x86_64-make pacman -S mingw-w64-ucrt-x86_64-curl pacman -S mingw-w64-ucrt-x86_64-libssh pacman -S mingw-w64-ucrt-x86_64-openssl
-
Clone/Copy Project
cd /c/Users/DELL/OneDrive/ドキュメント/ALL\ in\ ONE/TOOLS/ # Project sudah ada di c-secforce/
# Ubuntu/Debian
sudo apt-get update
sudo apt-get install build-essential libcurl4-openssl-dev libssh-dev libssl-dev
# Fedora/RHEL
sudo dnf install gcc make libcurl-devel libssh-devel openssl-devel
# Arch Linux
sudo pacman -S base-devel curl libssh openssl# Compile simple version (tanpa external dependencies)
.\quick_compile.bat# Di MSYS2 UCRT64 terminal
cd "/c/Users/DELL/OneDrive/ドキュメント/ALL in ONE/TOOLS/c-secforce"
# Build semua
mingw32-make clean
mingw32-make all
# Atau gunakan VS Code task
# Ctrl+Shift+B → Build CyberForceSimple Version (Standalone - No dependencies):
gcc -o cyberforce.exe simple_cyberforce.c -O2 -WallFull Version (Dengan semua modules):
gcc -o cyberforce.exe \
src/main.c \
src/core/attack_engine.c \
src/core/protocol_handlers.c \
src/core/rate_limiter.c \
src/core/thread_manager.c \
src/modules/http_brute.c \
src/modules/ftp_brute.c \
src/modules/ssh_brute.c \
src/modules/mysql_brute.c \
src/utils/logger.c \
src/utils/wordlist_gen.c \
src/utils/pattern_matcher.c \
src/utils/proxy_rotator.c \
src/utils/crypto_helper.c \
-I./src/include \
-lcurl -lssh -lssl -lcrypto -lpthread -lws2_32 \
-O2 -Wall# Tampilkan bantuan
.\cyberforce.exe --help
# Tampilkan versi
.\cyberforce.exe --version
# HTTP Basic Auth Brute Force
.\cyberforce.exe -t http://example.com/admin -u users.txt -p passwords.txt -T 10
# FTP Brute Force
.\cyberforce.exe -t ftp://192.168.1.100 -u users.txt -p passwords.txt -T 5
# SSH Brute Force
.\cyberforce.exe -t ssh://192.168.1.100:22 -u users.txt -p passwords.txt -T 3
# MySQL Brute Force
.\cyberforce.exe -t mysql://192.168.1.100:3306 -u users.txt -p passwords.txt# Dengan rate limiting (100 requests/second)
.\cyberforce.exe -t http://example.com -u users.txt -p pass.txt -r 100
# Dengan proxy
.\cyberforce.exe -t http://example.com -u users.txt -p pass.txt --proxy http://proxy:8080
# Verbose logging
.\cyberforce.exe -t http://example.com -u users.txt -p pass.txt -v
# Export results ke JSON
.\cyberforce.exe -t http://example.com -u users.txt -p pass.txt -o results.json| Parameter | Deskripsi | Default |
|---|---|---|
-t, --target |
Target URL (http/ftp/ssh/mysql) | Required |
-u, --users |
File berisi username list | Required |
-p, --passwords |
File berisi password list | Required |
-T, --threads |
Jumlah threads parallel | 10 |
-r, --rate |
Rate limit (requests/second) | 50 |
-v, --verbose |
Verbose logging | Off |
-o, --output |
Output file untuk results | stdout |
--proxy |
Proxy server URL | None |
--timeout |
Connection timeout (seconds) | 10 |
--help |
Tampilkan bantuan | - |
--version |
Tampilkan versi | - |
- libcurl (>= 7.68.0) - HTTP/HTTPS requests
- libssh (>= 0.9.0) - SSH protocol support
- OpenSSL (>= 1.1.1) - Cryptographic operations
- pthread - Multi-threading support
- Winsock2 (Windows only) - Network socket API
- GCC (>= 8.0) atau Clang (>= 10.0)
- Make (>= 4.0)
- Development headers untuk semua runtime dependencies
Tools ini dibuat untuk TUJUAN EDUKASI dan AUTHORIZED SECURITY TESTING saja.
DILARANG menggunakan tools ini untuk:
- Unauthorized access ke sistem orang lain
- Melanggar hukum komputer/cybercrime
- Merusak atau mengakses data tanpa izin
- Aktivitas ilegal lainnya
Pengguna bertanggung jawab penuh atas penggunaan tools ini. Developer tidak bertanggung jawab atas penyalahgunaan.
Selalu dapatkan izin tertulis sebelum melakukan penetration testing pada sistem apapun.
- Tools ini meninggalkan jejak di log server target
- Rate limiting membantu tapi tidak menghilangkan deteksi
- Gunakan proxy/VPN untuk anonymitas tambahan
- Pastikan testing dilakukan di environment isolated
MIT License - See LICENSE file for details
Contributions welcome! Silakan submit pull request atau buka issue untuk bug reports.
- Issues: GitHub Issues
- Documentation: Wiki
- GUI Interface
- Web dashboard untuk monitoring
- Support untuk protokol tambahan (RDP, SMB, LDAP)
- Machine learning untuk pattern detection
- Distributed attack coordination
- Better evasion techniques
Made with ❤️ for Security Researchers