|
1 | | -# race-dump |
2 | | -Tools |
3 | | -1- gcc -O3 -Wall -Wextra -o super_rnn super_rnn.c -lm |
| 1 | +<!-- PROJECT LOGO --> |
| 2 | +<p align="center"> |
| 3 | + <img src="https://img.shields.io/badge/AI%20SECURITY%20ENGINE-KALI%20LINUX-black?style=for-the-badge&logo=linux&logoColor=white"/> |
| 4 | + <img src="https://img.shields.io/badge/RNN%20From%20Scratch-C%20Language-blue?style=for-the-badge&logo=c&logoColor=white"/> |
| 5 | + <img src="https://img.shields.io/badge/Platform-Linux%20%7C%20Security-red?style=for-the-badge&logo=kalilinux&logoColor=white"/> |
| 6 | +</p> |
4 | 7 |
|
5 | | -2- ./super_rnn |
| 8 | +<h1 align="center">⚙️ Super RNN: Advanced AI System for Kali Linux Security Analysis ⚙️</h1> |
6 | 9 |
|
7 | | -3- sudo ./super_rnn |
| 10 | +<p align="center"> |
| 11 | + <em>Custom-built Recurrent Neural Network (RNN) in pure C for advanced threat prediction, system learning, and security intelligence.</em> |
| 12 | +</p> |
| 13 | + |
| 14 | +<p align="center"> |
| 15 | + <a href="https://github.com/okba14"><img src="https://img.shields.io/github/stars/okba14?style=flat-square&logo=github&color=yellow"/></a> |
| 16 | + <a href="https://github.com/okba14"><img src="https://img.shields.io/github/forks/okba14/Super-RNN?style=flat-square&logo=github&color=orange"/></a> |
| 17 | + <a href="https://github.com/okba14/Super-RNN/issues"><img src="https://img.shields.io/github/issues/okba14/Super-RNN?style=flat-square&color=red"/></a> |
| 18 | + <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square"/></a> |
| 19 | + <img src="https://img.shields.io/badge/Made%20with-C%20%26%20❤️-brightgreen?style=flat-square&logo=c&logoColor=white"/> |
| 20 | +</p> |
| 21 | + |
| 22 | +--- |
| 23 | + |
| 24 | +## 📘 Overview |
| 25 | + |
| 26 | +**Super RNN** is an advanced artificial intelligence system specifically designed for **security analysis on Kali Linux**. |
| 27 | +It implements a **custom Recurrent Neural Network (RNN)** from scratch in **C** to analyze system configurations, logs, and security patterns. |
| 28 | +The system learns from Linux environments, predicts security threats, and generates comprehensive security reports. |
| 29 | + |
| 30 | +--- |
| 31 | + |
| 32 | +## 🚀 Key Features |
| 33 | + |
| 34 | +- 🧠 **Custom RNN Implementation:** Built entirely in C with no external dependencies |
| 35 | +- ⚙️ **Adam Optimizer:** Momentum + adaptive learning rate with bias correction |
| 36 | +- 🔐 **Security Analysis:** Deep inspection of logs, configs, and system behavior |
| 37 | +- 📊 **Threat Prediction:** Learns Linux patterns to estimate threat levels |
| 38 | +- 🧾 **Automated Reporting:** Generates detailed reports with threat metrics |
| 39 | +- 💻 **Command Learning:** Understands and executes Linux commands |
| 40 | +- ⏱️ **Real-time Monitoring:** Tracks CPU, memory, and disk activity |
| 41 | +- 🧩 **Early Stopping:** Prevents overfitting dynamically |
| 42 | +- 📈 **Data Normalization:** Stabilizes training & improves accuracy |
| 43 | + |
| 44 | +--- |
| 45 | + |
| 46 | +## 🏗️ Technical Architecture |
| 47 | + |
| 48 | +### 🧩 RNN Structure |
| 49 | +- Input-to-hidden weights (`wxh`) |
| 50 | +- Hidden-to-hidden weights (`whh`) |
| 51 | +- Hidden-to-output weights (`why`) |
| 52 | +- Biases (`bxh`, `by`) |
| 53 | +- Hidden state (`h`) and prediction (`y_pred`) buffers |
| 54 | + |
| 55 | +### ⚙️ Adam Optimizer |
| 56 | +- Maintains momentum (`m`) & velocity (`v`) |
| 57 | +- Bias correction for stability |
| 58 | +- Adaptive learning rates (ε smoothing) |
| 59 | + |
| 60 | +### 🧮 Data Processing |
| 61 | +- Text-to-numeric log conversion |
| 62 | +- Normalization/denormalization |
| 63 | +- Gradient clipping (anti-explosion) |
| 64 | + |
| 65 | +--- |
| 66 | + |
| 67 | +## 🛡️ Security Analysis |
| 68 | + |
| 69 | +- Config file analysis (`/etc/passwd`, `/etc/group`, etc.) |
| 70 | +- Log parsing (`/var/log/syslog`, `/var/log/auth.log`, etc.) |
| 71 | +- Command learning from Linux utilities |
| 72 | +- Threat prediction & report generation |
| 73 | + |
| 74 | +--- |
| 75 | + |
| 76 | +## 🧠 Training Process |
| 77 | + |
| 78 | +### 🔧 Initialization |
| 79 | +- Xavier weight initialization |
| 80 | +- Adam parameters reset |
| 81 | +- Memory allocation for RNN states |
| 82 | + |
| 83 | +### 🔁 Training Loop |
| 84 | +- Forward pass with dropout |
| 85 | +- Loss via MSE |
| 86 | +- BPTT (Backpropagation Through Time) |
| 87 | +- Adam updates |
| 88 | +- Early stopping (validation loss) |
| 89 | + |
| 90 | +--- |
| 91 | + |
| 92 | +## 🧰 Installation & Compilation |
| 93 | + |
| 94 | +### 🧩 Prerequisites |
| 95 | +- 🐧 Linux OS (tested on Kali Linux) |
| 96 | +- 🧱 GCC compiler |
| 97 | +- 📚 Standard C libs (`math.h`, `stdlib.h`, etc.) |
| 98 | + |
| 99 | +### ⚡ Compilation |
| 100 | + |
| 101 | +```bash |
| 102 | +gcc -O3 -Wall -Wextra -o super_rnn super_rnn.c -lm |
| 103 | +``` |
| 104 | + |
| 105 | +# ▶️ Execution |
| 106 | + |
| 107 | +```bash |
| 108 | +./super_rnn |
| 109 | +sudo ./super_rnn |
| 110 | +``` |
| 111 | + |
| 112 | +--- |
| 113 | + |
| 114 | + |
| 115 | +# 🧾 Usage |
| 116 | + |
| 117 | +## 1️⃣ System Initialization |
| 118 | + |
| 119 | +* Trains RNN with sample sequence (1→2→3→...) |
| 120 | + |
| 121 | +### 2️⃣ System Learning |
| 122 | + |
| 123 | +* Reads /etc files |
| 124 | + |
| 125 | +* Parses /var/log |
| 126 | + |
| 127 | +* Learns Linux commands |
| 128 | + |
| 129 | +* Monitors CPU/memory |
| 130 | + |
| 131 | +### 3️⃣ Security Analysis |
| 132 | + |
| 133 | +* Detects anomalies |
| 134 | + |
| 135 | +* Predicts threat levels |
| 136 | + |
| 137 | +* Generates /tmp/security_report.txt |
| 138 | + |
| 139 | +# 🧪 Example Output |
| 140 | + |
| 141 | +```bash |
| 142 | +=== LEGENDARY KALI LINUX AI SYSTEM === |
| 143 | +Initializing advanced RNN model... |
| 144 | +Training initial model... |
| 145 | +Epoch 0 | Loss = 0.248321 | Best: 0.248321 |
| 146 | +... |
| 147 | +Security threat level: 0.32 |
| 148 | +System appears secure. |
| 149 | +Security report saved to /tmp/security_report.txt |
| 150 | +``` |
| 151 | + |
| 152 | +## 📊 Security Report Sample |
| 153 | + |
| 154 | +### Includes: |
| 155 | + |
| 156 | +* System info (CPU cores, memory usage) |
| 157 | + |
| 158 | +* Files analyzed |
| 159 | + |
| 160 | +* Commands learned |
| 161 | + |
| 162 | +* Logs processed |
| 163 | + |
| 164 | +# Threat level: 🟢 LOW / 🟠 MEDIUM / 🔴 HIGH |
| 165 | + |
| 166 | +--- |
| 167 | + |
| 168 | + |
| 169 | +--- |
| 170 | + |
| 171 | +## ⚙️ Dependencies |
| 172 | + |
| 173 | +<p align="center"> |
| 174 | + <img src="https://img.shields.io/badge/Language-C-blue?style=for-the-badge&logo=c&logoColor=white"/> |
| 175 | + <img src="https://img.shields.io/badge/Platform-Linux-darkgreen?style=for-the-badge&logo=linux&logoColor=white"/> |
| 176 | + <img src="https://img.shields.io/badge/Security-AI%20Enhanced-critical?style=for-the-badge"/> |
| 177 | +</p> |
| 178 | + |
| 179 | +| Type | Description | |
| 180 | +|------|--------------| |
| 181 | +| 🧩 **Standard C Libraries** | `math.h`, `stdio.h`, `stdlib.h`, `time.h`, `float.h`, `string.h`, `dirent.h`, `sys/stat.h`, `sys/types.h`, `unistd.h`, `fcntl.h`, `sys/wait.h` | |
| 182 | +| 🧠 **Linux System Files** | `/proc/cpuinfo`, `/proc/meminfo`, `/etc`, `/var/log` | |
| 183 | + |
| 184 | +--- |
| 185 | + |
| 186 | +## 👤 Author |
| 187 | + |
| 188 | +<p align="center"> |
| 189 | + <img src="https://img.shields.io/badge/Author-GUIAR%20OQBA-blueviolet?style=for-the-badge&logo=github&logoColor=white"/> |
| 190 | + <img src="https://img.shields.io/badge/Nationality-Algeria-00aa00?style=for-the-badge&logo=flag&logoColor=white"/> |
| 191 | +</p> |
| 192 | + |
| 193 | +| 🔗 Field | Information | |
| 194 | +|----------|--------------| |
| 195 | +| 🧑💻 **Name** | **GUIAR OQBA** | |
| 196 | +| 📧 **Email** | [techokba@gmail.com](mailto:techokba@gmail.com) | |
| 197 | +| 🌐 **ORCID** | [0009-0008-1629-0002](https://orcid.org/0009-0008-1629-0002) | |
| 198 | +| 💼 **LinkedIn** | [guiar-oqba](https://linkedin.com/in/guiar-oqba) | |
| 199 | +| 💻 **GitHub** | [okba14](https://github.com/okba14) | |
| 200 | +| 📚 **Zenodo** | [15786076](https://zenodo.org/records/15786076) | |
| 201 | +| 📝 **Hashnode** | [@okba](https://hashnode.com/@okba) | |
| 202 | +| ✈️ **Telegram** | [@okba_elkantara](https://t.me/okba_elkantara) | |
| 203 | +| 🇩🇿 **Made in** | **Algeria** | |
| 204 | + |
| 205 | +--- |
| 206 | + |
| 207 | +## 🕓 Version History |
| 208 | + |
| 209 | +📄 See **[CHANGELOG.md](CHANGELOG.md)** for detailed release notes. |
| 210 | +🧩 Current version: `v1.0.0` (Stable Build) |
| 211 | + |
| 212 | +<p align="center"> |
| 213 | + <img src="https://img.shields.io/badge/Status-Active-brightgreen?style=for-the-badge"/> |
| 214 | + <img src="https://img.shields.io/badge/Build-Stable-success?style=for-the-badge"/> |
| 215 | + <img src="https://img.shields.io/badge/Last_Update-2025-orange?style=for-the-badge"/> |
| 216 | +</p> |
| 217 | + |
| 218 | +--- |
| 219 | + |
| 220 | +## 📜 License |
| 221 | + |
| 222 | +<p align="center"> |
| 223 | + <a href="LICENSE"> |
| 224 | + <img src="https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge"/> |
| 225 | + </a> |
| 226 | + <img src="https://img.shields.io/badge/Copyright-©%202025%20GUIAR%20OQBA-lightgrey?style=for-the-badge"/> |
| 227 | + <img src="https://img.shields.io/badge/Made%20with-💻%20and%20❤️%20from%20Algeria-red?style=for-the-badge"/> |
| 228 | +</p> |
| 229 | + |
| 230 | +--- |
| 231 | + |
| 232 | +<p align="center"> |
| 233 | + <sub><b>Super RNN — Advanced AI System for Kali Linux Security Analysis</b></sub><br> |
| 234 | + <sub>Developed by <b>GUIAR OQBA</b> 🇩🇿 | Empowering AI-based Security on Linux</sub> |
| 235 | +</p> |
0 commit comments