<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: okba tech</title>
    <description>The latest articles on DEV Community by okba tech (@okba_elkantara).</description>
    <link>https://dev.to/okba_elkantara</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3059970%2F4d67d414-5771-411b-919f-9bb8cd3dd372.jpg</url>
      <title>DEV Community: okba tech</title>
      <link>https://dev.to/okba_elkantara</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/okba_elkantara"/>
    <language>en</language>
    <item>
      <title>🚀 NeuroHTTP AI-Native High-Performance Web Server</title>
      <dc:creator>okba tech</dc:creator>
      <pubDate>Fri, 17 Oct 2025 08:19:45 +0000</pubDate>
      <link>https://dev.to/okba_elkantara/neurohttp-the-first-ai-native-high-performance-web-server-2p9f</link>
      <guid>https://dev.to/okba_elkantara/neurohttp-the-first-ai-native-high-performance-web-server-2p9f</guid>
      <description>&lt;p&gt;Redefining how AI APIs communicate with the Web.&lt;br&gt;
Built entirely from scratch in C and Assembly, engineered for the new age of intelligent networking.&lt;/p&gt;

&lt;p&gt;🧠 Introducing NeuroHTTP (Codename: AIMux)&lt;/p&gt;

&lt;p&gt;NeuroHTTP isn’t just another web server — it’s the first AI-native web infrastructure designed specifically for real-time inference, model routing, and data-intensive AI workloads.&lt;/p&gt;

&lt;p&gt;While traditional servers like Nginx, Apache, and Node.js were optimized for static or RESTful workloads, NeuroHTTP was built for AI APIs — where streaming, token-by-token inference, and ultra-low latency are critical.&lt;/p&gt;

&lt;p&gt;🚀 Core Capabilities&lt;br&gt;
Capability  Description&lt;br&gt;
🧠 AI-Powered Routing Intelligently routes requests across multiple AI models (GPT, Claude, LLaMA, etc.).&lt;br&gt;
⚡ Smart Thread Pool   Dynamically allocates workloads based on model complexity and concurrency.&lt;br&gt;
📦 Assembly-Optimized JSON Parser SIMD-accelerated parsing for massive AI payloads with minimal latency.&lt;br&gt;
🔌 AI Stream Mode Real-time, token-by-token streaming over HTTP/1.1, HTTP/3, or WebSocket.&lt;br&gt;
🔐 Token Quota + API Keys Native authentication and quota control for multi-tenant AI APIs.&lt;br&gt;
🛰️ gRPC + HTTP/3 Ready Modern, low-latency protocols built into the core.&lt;br&gt;
🧩 Plugin System (C Modules)  Extend functionality without recompilation.&lt;br&gt;
📊 Telemetry &amp;amp; Metrics    Real-time observability with latency, throughput, and memory analytics.&lt;br&gt;
⚙️ Under the Hood&lt;/p&gt;

&lt;p&gt;Every subsystem of NeuroHTTP is implemented in C, with critical hot paths written in Assembly for deterministic speed and zero overhead.&lt;/p&gt;

&lt;p&gt;🧱 Core Components&lt;br&gt;
Component   Description&lt;br&gt;
🧠 AI Router  Embedded model intelligence for adaptive routing and contextual inference.&lt;br&gt;
⚙️ Worker Threads   Multi-threaded event loop optimized for CPU-bound AI workloads.&lt;br&gt;
🔒 Internal Firewall  Packet inspection and filtering built directly into the core.&lt;br&gt;
⚡ Cache System (TTL-based)    High-speed caching with configurable TTL for optimized reuse.&lt;br&gt;
🧩 Runtime Optimizer  Dynamically adjusts scheduling, caching, and concurrency based on live performance metrics.&lt;br&gt;
🌍 Why NeuroHTTP Matters&lt;/p&gt;

&lt;p&gt;🔥 No true AI-native web servers exist — until now.&lt;br&gt;
NeuroHTTP pioneers a new class of networking technology designed for the next generation of intelligent workloads.&lt;/p&gt;

&lt;p&gt;⚙️ Written in C &amp;amp; Assembly for extreme performance under inference-heavy loads.&lt;/p&gt;

&lt;p&gt;🌐 Optimized for AI-native protocols, streaming, and model multiplexing.&lt;/p&gt;

&lt;p&gt;🧩 Modular, extensible, and developer-first — open-source by design.&lt;/p&gt;

&lt;p&gt;🧠 Self-optimizing architecture that learns and adapts to workload patterns.&lt;/p&gt;

&lt;p&gt;🎬 Project Demo — AIONIC NeuroHTTP&lt;br&gt;
    &lt;a href="https://github.com/okba14/NeuroHTTP/tree/main/videos" rel="noopener noreferrer"&gt;https://github.com/okba14/NeuroHTTP/tree/main/videos&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Experience NeuroHTTP in action.&lt;br&gt;
Witness real-time inference, ultra-fast routing, and intelligent load balancing — all powered by C and Assembly.&lt;/p&gt;

&lt;p&gt;🧠 The Vision&lt;/p&gt;

&lt;p&gt;Build the world’s first AI-native web server capable of real-time, high-throughput inference with zero overhead.&lt;/p&gt;

&lt;p&gt;NeuroHTTP isn’t just about serving requests —&lt;br&gt;
it’s about serving intelligence.&lt;/p&gt;

&lt;p&gt;💡 Join the Revolution&lt;/p&gt;

&lt;p&gt;Be part of the movement redefining how AI APIs connect to the web.&lt;br&gt;
Contribute. Extend. Optimize. Build the infrastructure of tomorrow.&lt;/p&gt;

&lt;p&gt;👉 GitHub: &lt;a href="https://github.com/okba14/NeuroHTTP" rel="noopener noreferrer"&gt;https://github.com/okba14/NeuroHTTP&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>opensource</category>
      <category>github</category>
      <category>ai</category>
    </item>
    <item>
      <title>Exploiting the SSH_AUTH_SOCK Variable for Privilege Escalation via Fake ssh-agent</title>
      <dc:creator>okba tech</dc:creator>
      <pubDate>Mon, 28 Jul 2025 18:52:01 +0000</pubDate>
      <link>https://dev.to/okba_elkantara/exploiting-the-sshauthsock-variable-for-privilege-escalation-via-fake-ssh-agent-424f</link>
      <guid>https://dev.to/okba_elkantara/exploiting-the-sshauthsock-variable-for-privilege-escalation-via-fake-ssh-agent-424f</guid>
      <description>&lt;p&gt;🧩 Introduction:&lt;br&gt;
SSH (Secure Shell) is one of the most critical secure communication protocols in modern systems. It is widely used for secure remote access, system administration, and server management.&lt;br&gt;
One of the core components of SSH is the ssh-agent, a background process that holds private keys in memory, allowing applications to use these keys without prompting the user for the passphrase every time.&lt;br&gt;
During an SSH session, the system exports a sensitive environment variable named SSH_AUTH_SOCK, which points to a Unix socket used to communicate with the ssh-agent.&lt;br&gt;
This paper explores how this variable can be hijacked to achieve privilege escalation, by injecting a fake agent and executing a payload with root privileges.&lt;/p&gt;

&lt;p&gt;🎯 Research Objectives:&lt;br&gt;
    • Demonstrate the potential of SSH_AUTH_SOCK as a vector for privilege escalation attacks.&lt;br&gt;
    • Present a practical scenario showing how to inject a fake agent and lure trusted system applications into communicating with it.&lt;br&gt;
    • Assess the severity and identify affected applications.&lt;br&gt;
    • Provide security recommendations for developers and system administrators.&lt;/p&gt;

&lt;p&gt;🧪 Exploitation Steps:&lt;br&gt;
✅ Step 1: Prepare the Payload&lt;br&gt;
Compile the root shell binary that will be dropped by the fake agent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcc -o myrootsh myrootsh.c
xxd -i myrootsh | sed 's/myrootsh/myrootsh_bin/g' &amp;gt; myrootsh.h
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The myrootsh.h file now contains the payload as a C array to be embedded in the fake agent.&lt;/p&gt;

&lt;p&gt;✅ Step 2: Launch the Fake ssh-agent&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ./fake_agent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This program listens on a fake Unix socket: /tmp/fakeagent/ssh-agent.sock&lt;br&gt;
It is ready to drop and activate the payload upon the first connection.&lt;/p&gt;

&lt;p&gt;✅ Step 3: Trigger the Exploit via mysshtest&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export SSH_AUTH_SOCK=/tmp/fakeagent/ssh-agent.sock
./mysshtest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The mysshtest binary is a simple setuid-root application that runs ssh-add -l, simulating real-world agent interaction.&lt;/p&gt;

&lt;p&gt;✅ Step 4: Activate the Root Shell&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo cp /tmp/.rootshell /usr/local/bin/.rootshell
sudo chmod 4755 /usr/local/bin/.rootshell
/usr/local/bin/.rootshell

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once executed, the regular user gains access to a root shell.&lt;/p&gt;

&lt;p&gt;🧭 Discovering Affected Applications:&lt;br&gt;
Use the following commands to identify binaries interacting with SSH_AUTH_SOCK:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;grep -r 'ssh-add\|SSH_AUTH_SOCK\|ssh ' /usr/bin /usr/sbin /usr/lib 2&amp;gt;/dev/null
grep -r 'SSH_AUTH_SOCK' /etc /usr 2&amp;gt;/dev/null

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔍 Analysis of Affected Applications:&lt;br&gt;
Several real-world applications shipped with distributions like Kali Linux were tested and confirmed to interact with the ssh-agent via SSH_AUTH_SOCK, making them susceptible to fake agent injection.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;/usr/bin/ssh-copy-id&lt;br&gt;
• Function: Copies the user’s public key to the authorized_keys file on the remote machine.&lt;br&gt;
• Agent Interaction: Yes. Relies on ssh-agent if the passphrase isn’t stored.&lt;br&gt;
• Risk Level: 🟠 High&lt;br&gt;
Hijacking the agent could allow the attacker to redirect the session or inject their own key into the target machine, leading to persistence.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ssh-add -l&lt;br&gt;
• Function: Lists keys currently loaded in the ssh-agent.&lt;br&gt;
• Agent Interaction: Yes, direct interaction through SSH_AUTH_SOCK.&lt;br&gt;
• Risk Level: 🟡 Medium&lt;br&gt;
While it doesn’t initiate external connections, it confirms successful agent hijack and may serve as a launch point for the payload.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;git ls-remote &lt;a href="mailto:git@github.com"&gt;git@github.com&lt;/a&gt;:...&lt;br&gt;
• Function: Lists branches and refs from a remote Git repository.&lt;br&gt;
• Agent Interaction: Yes. Git invokes ssh, which in turn uses ssh-agent for authentication.&lt;br&gt;
• Risk Level: 🔴 Critical&lt;br&gt;
Git is often executed in automated environments (CI/CD), possibly with elevated privileges. A fake agent here could result in unauthorized remote connections or backdoors during automated fetches.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;🟥 Risk Ranking Summary:&lt;br&gt;
Application Risk Level  Notes&lt;br&gt;
git ls-remote   🔴 Critical   Common in CI/CD pipelines, may execute automatically as root.&lt;br&gt;
ssh-copy-id 🟠 High   Can inject persistent keys to remote targets.&lt;br&gt;
ssh-add -l  🟡 Medium Confirms interaction; useful for agent validation and payload init.&lt;/p&gt;

&lt;p&gt;⚠️ Security Analysis:&lt;br&gt;
This attack does not exploit a bug in ssh-agent or Git itself.&lt;br&gt;
Instead, it leverages a design flaw in how environment variables are handled:&lt;br&gt;
    • SSH_AUTH_SOCK is an unprotected environment variable and can be manipulated.&lt;br&gt;
    • Most applications do not verify the ownership or permissions of the socket.&lt;br&gt;
    • If a setuid-root binary uses this variable without sanitization, an indirect privilege escalation occurs.&lt;/p&gt;

&lt;p&gt;🛡️ Security Recommendations:&lt;br&gt;
To mitigate this class of attacks, developers and sysadmins should:&lt;br&gt;
    1. Sanitize the environment in all setuid programs:&lt;br&gt;
Clear variables like SSH_AUTH_SOCK before executing privileged operations.&lt;br&gt;
    2. Verify socket ownership and permissions:&lt;br&gt;
Avoid trusting arbitrary agents unless the socket is owned by the current user.&lt;br&gt;
    3. Reduce reliance on setuid binaries:&lt;br&gt;
Favor controlled privilege elevation via sudo with strict policies.&lt;br&gt;
    4. Enforce AppArmor/SELinux profiles:&lt;br&gt;
Restrict access to unauthorized Unix sockets using mandatory access control.&lt;br&gt;
    5. Audit and monitor ssh-agent interactions:&lt;br&gt;
Use tools like auditd or strace in sensitive environments to detect misuse.&lt;/p&gt;

&lt;p&gt;✅ Conclusion:&lt;br&gt;
This paper demonstrates how a seemingly benign environment variable like SSH_AUTH_SOCK can be weaponized for serious privilege escalation.&lt;br&gt;
The exploit is field-tested, reproducible, and effective against real-world tools on popular Linux distributions like Kali Linux.&lt;br&gt;
This attack is categorized as:&lt;br&gt;
Indirect Privilege Escalation via Environment Variable Hijacking&lt;br&gt;
Moreover, it can serve as a foundation for more advanced threats such as:&lt;br&gt;
    • CI/CD pipeline compromises&lt;br&gt;
    • Development-stage backdooring&lt;br&gt;
    • Persistent access in production systems&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;📫 Author&lt;br&gt;
👤 Name: GUIAR OQBA&lt;br&gt;
📧 Email: &lt;a href="mailto:techokba@gmail.com"&gt;techokba@gmail.com&lt;/a&gt;&lt;br&gt;
🌐 ORCID: &lt;a href="https://orcid.org/0009-0008-1629-0002" rel="noopener noreferrer"&gt;https://orcid.org/0009-0008-1629-0002&lt;/a&gt;&lt;br&gt;
💼 LinkedIn: &lt;a href="https://www.linkedin.com/in/guiar-oqba-0207a9253/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/guiar-oqba-0207a9253/&lt;/a&gt;&lt;br&gt;
💻 GitHub: &lt;a href="https://github.com/okba14" rel="noopener noreferrer"&gt;https://github.com/okba14&lt;/a&gt;&lt;br&gt;
📚 Zenodo: &lt;a href="https://zenodo.org/records/15786076" rel="noopener noreferrer"&gt;https://zenodo.org/records/15786076&lt;/a&gt;&lt;br&gt;
📝 Hashnode: &lt;a href="https://hashnode.com/@okba" rel="noopener noreferrer"&gt;https://hashnode.com/@okba&lt;/a&gt; &lt;br&gt;
✈️ Telegram: &lt;a class="mentioned-user" href="https://dev.to/okba_elkantara"&gt;@okba_elkantara&lt;/a&gt;&lt;br&gt;
📱 Phone: +2136-71-36-04-38&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>ssh</category>
      <category>shell</category>
      <category>linux</category>
      <category>socket</category>
    </item>
    <item>
      <title>🧠Entropy Bias in BIP-39 Seed Phrase Generation By [GUIAR OQBA] . Security Researcher</title>
      <dc:creator>okba tech</dc:creator>
      <pubDate>Fri, 18 Apr 2025 17:41:34 +0000</pubDate>
      <link>https://dev.to/okba_elkantara/potential-weakness-in-bip-39-mnemonic-entropy-distribution-across-multiple-languages-5bma</link>
      <guid>https://dev.to/okba_elkantara/potential-weakness-in-bip-39-mnemonic-entropy-distribution-across-multiple-languages-5bma</guid>
      <description>&lt;p&gt;👋 Hello Dev Community ,&lt;br&gt;
I hope this post finds you well.&lt;/p&gt;

&lt;p&gt;Over the past few months, I’ve conducted extensive security research into the generation and validation of BIP-39 mnemonic recovery phrases used across multiple blockchain ecosystems — including Ethereum, Solana, Bytecoin, and others.&lt;/p&gt;

&lt;p&gt;During this analysis, I discovered a potential non-uniform entropy distribution in the generated seed phrases — a subtle but concerning irregularity that may compromise wallet security in specific scenarios.&lt;/p&gt;

&lt;p&gt;🔍 Key Observations&lt;br&gt;
High Word Frequency Bias&lt;br&gt;
Certain words appear disproportionately as the first, middle, or last words in mnemonic sequences.&lt;/p&gt;

&lt;p&gt;Example: Some words occurred over 300 times as the initial word in generated valid 12- or 24-word phrases.&lt;/p&gt;

&lt;p&gt;Abnormal Validation Rates&lt;br&gt;
From a test batch of 150,000 programmatically generated phrases, we observed:&lt;/p&gt;

&lt;p&gt;✅ 9,600+ valid wallets for 12-word English phrases&lt;/p&gt;

&lt;p&gt;✅ 14,000+ valid wallets for 24-word English phrases&lt;/p&gt;

&lt;p&gt;✅ 8,000+ valid wallets for 24-word Czech phrases&lt;/p&gt;

&lt;p&gt;Statistical Anomalies&lt;br&gt;
These rates suggest that valid mnemonic discovery is not entirely random, potentially due to:&lt;/p&gt;

&lt;p&gt;Biased word distribution&lt;/p&gt;

&lt;p&gt;Flawed entropy sources&lt;/p&gt;

&lt;p&gt;Weak random number generation (RNG)&lt;/p&gt;

&lt;p&gt;🛡️ Potential Impact&lt;br&gt;
If BIP-39 implementations across platforms are found to have biases or entropy flaws, it could reduce the effective search space — making brute-force or partial-recovery attacks more feasible.&lt;/p&gt;

&lt;p&gt;This weakness might affect wallet providers or applications using BIP-39 without adequate entropy enhancements or post-generation entropy checks.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
