Skip to content

Latest commit

 

History

History
235 lines (165 loc) · 7.31 KB

File metadata and controls

235 lines (165 loc) · 7.31 KB

⚙️ Super RNN: Advanced AI System for Kali Linux Security Analysis ⚙️

Custom-built Recurrent Neural Network (RNN) in pure C for advanced threat prediction, system learning, and security intelligence.


📘 Overview

Super RNN is an advanced artificial intelligence system specifically designed for security analysis on Kali Linux.
It implements a custom Recurrent Neural Network (RNN) from scratch in C to analyze system configurations, logs, and security patterns.
The system learns from Linux environments, predicts security threats, and generates comprehensive security reports.


🚀 Key Features

  • 🧠 Custom RNN Implementation: Built entirely in C with no external dependencies
  • ⚙️ Adam Optimizer: Momentum + adaptive learning rate with bias correction
  • 🔐 Security Analysis: Deep inspection of logs, configs, and system behavior
  • 📊 Threat Prediction: Learns Linux patterns to estimate threat levels
  • 🧾 Automated Reporting: Generates detailed reports with threat metrics
  • 💻 Command Learning: Understands and executes Linux commands
  • ⏱️ Real-time Monitoring: Tracks CPU, memory, and disk activity
  • 🧩 Early Stopping: Prevents overfitting dynamically
  • 📈 Data Normalization: Stabilizes training & improves accuracy

🏗️ Technical Architecture

🧩 RNN Structure

  • Input-to-hidden weights (wxh)
  • Hidden-to-hidden weights (whh)
  • Hidden-to-output weights (why)
  • Biases (bxh, by)
  • Hidden state (h) and prediction (y_pred) buffers

⚙️ Adam Optimizer

  • Maintains momentum (m) & velocity (v)
  • Bias correction for stability
  • Adaptive learning rates (ε smoothing)

🧮 Data Processing

  • Text-to-numeric log conversion
  • Normalization/denormalization
  • Gradient clipping (anti-explosion)

🛡️ Security Analysis

  • Config file analysis (/etc/passwd, /etc/group, etc.)
  • Log parsing (/var/log/syslog, /var/log/auth.log, etc.)
  • Command learning from Linux utilities
  • Threat prediction & report generation

🧠 Training Process

🔧 Initialization

  • Xavier weight initialization
  • Adam parameters reset
  • Memory allocation for RNN states

🔁 Training Loop

  • Forward pass with dropout
  • Loss via MSE
  • BPTT (Backpropagation Through Time)
  • Adam updates
  • Early stopping (validation loss)

🧰 Installation & Compilation

🧩 Prerequisites

  • 🐧 Linux OS (tested on Kali Linux)
  • 🧱 GCC compiler
  • 📚 Standard C libs (math.h, stdlib.h, etc.)

⚡ Compilation

gcc -O3 -Wall -Wextra -o super_rnn super_rnn.c -lm

▶️ Execution

./super_rnn
sudo ./super_rnn

🧾 Usage

1️⃣ System Initialization

  • Trains RNN with sample sequence (1→2→3→...)

2️⃣ System Learning

  • Reads /etc files

  • Parses /var/log

  • Learns Linux commands

  • Monitors CPU/memory

3️⃣ Security Analysis

  • Detects anomalies

  • Predicts threat levels

  • Generates /tmp/security_report.txt

🧪 Example Output

=== LEGENDARY KALI LINUX AI SYSTEM ===
Initializing advanced RNN model...
Training initial model...
Epoch 0 | Loss = 0.248321 | Best: 0.248321
...
Security threat level: 0.32
System appears secure.
Security report saved to /tmp/security_report.txt

📊 Security Report Sample

Includes:

  • System info (CPU cores, memory usage)

  • Files analyzed

  • Commands learned

  • Logs processed

Threat level: 🟢 LOW / 🟠 MEDIUM / 🔴 HIGH



⚙️ Dependencies

Type Description
🧩 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
🧠 Linux System Files /proc/cpuinfo, /proc/meminfo, /etc, /var/log

👤 Author

🔗 Field Information
🧑‍💻 Name GUIAR OQBA
📧 Email techokba@gmail.com
🌐 ORCID 0009-0008-1629-0002
💼 LinkedIn guiar-oqba
💻 GitHub okba14
📚 Zenodo 15786076
📝 Hashnode @okba
✈️ Telegram @okba_elkantara
🇩🇿 Made in Algeria

🕓 Version History

📄 See CHANGELOG.md for detailed release notes.
🧩 Current version: v1.0.0 (Stable Build)


📜 License


Super RNN — Advanced AI System for Kali Linux Security Analysis
Developed by GUIAR OQBA 🇩🇿 | Empowering AI-based Security on Linux