Загрузка видео...

Не удалось загрузить видео

На главную

This video shows my PoC for libssh CVE-2023-2283 (authentication bypass vuln). The attacker logs in with ED25519 authentication, despite not knowing the private key.

173,809 просмотров • 3 лет назад •via X (Twitter)

Комментарии: 12

Фото профиля Kev
Kev3 лет назад

The PoC is slow, unreliable, and very noisy. Don’t say I didn’t warn you!

Фото профиля Kev
Kev3 лет назад

To trigger the bug, the attacker needs to trigger an out-of-memory error on a very small allocation (72 bytes).

Фото профиля Kev
Kev3 лет назад

The PoC generates a massive amount of memory pressure by sending a large number of bogus “service request” messages with zlib compression. The PoC doesn’t read the replies, which causes the server’s send buffer to fill up rapidly.

Фото профиля Kev
Kev3 лет назад

So generating memory pressure isn’t difficult, but causing the server to run out of memory at exactly the right moment that it’ll cause a 72-byte allocation to fail is.

Фото профиля Kev
Kev3 лет назад

I tried a variety of strategies and wasted quite a bit of time examining the structure of the malloc arenas, etc. Couldn’t get anything to work.

Фото профиля Kev
Kev3 лет назад

But then I remember the strategy that worked for CVE-2021-3939, which I call “embrace the chaos”.

Фото профиля Kev
Kev3 лет назад

My PoC was triggering plenty of out-of-memory errors, but not the right ones. So I thought: what if I run 3 copies of the PoC on a loop at the same time? 🤣

Фото профиля Kev
Kev3 лет назад

And that works. 🤦 Three attackers continuously bombarding the server causes enough out-of-memory errors that eventually one of the attackers gets lucky. 🥳

Фото профиля Kev
Kev3 лет назад

I even added a signaling mechanism so that the successful PoC can notify the other two to stop running: it writes a file named “success.txt”. Pure quality!👌

Фото профиля Kev
Kev3 лет назад

A few caveats about this PoC: Caveat 1: libssh is not openssh. (But it’s widely used.) Caveat 2: libssh is a library, which means that the exploitability of this bug depends on how the library is used. My PoC targets the demo ssh server from the “examples” subdirectory.

Фото профиля Kev
Kev3 лет назад

Caveat 3: The bug is only exploitable in a memory-constrained environment such as a memory-constrained container. I am running libssh with a 256MB memory limit to simulate this.

Фото профиля Kev
Kev3 лет назад

Source code for the PoC:

Похожие видео

ZKForge V1 is now live and the source code is public on GitHub: Visit: Users can sign up, log in, and chat privately using zero-knowledge authentication (ZK-STARK) with full end-to-end encryption and non-custodial wallet integration. No passwords, no stored private keys, all encryption and identity verification happen locally on the user’s device. Core Features • Zero-Knowledge Authentication (ZKAuth) Users sign up and log in using a locally generated Ed25519 keypair. Authentication uses zero-knowledge proofs (ZK-STARK-compatible), proving identity ownership without revealing the secret key. The backend never sees or stores private keys , only the derived public key and Solana address. • End-to-End Chat Encryption Every conversation is encrypted with per-room symmetric keys (nacl.secretbox AES-grade security). Keys are sealed and exchanged using ephemeral Curve25519 boxes derived from each user’s Ed25519 keypair. Messages are signed for sender authenticity. The server cannot decrypt messages; all encryption happens client-side. • Global Lounge (Public Encrypted Room) Encrypted public discussion room using a temporary shared key. Messages self-destruct after a defined time window. Rate-limit and anti-spam protections are enforced through Supabase RLS policies. • Wallet Integration (Non-Custodial) Each user derives a Solana wallet from their zero-knowledge secret. Private keys are generated and stored locally, never sent to the backend. Supports in-app USDC transactions signed locally. • WebSocket-Based Real-Time Updates Secure WebSocket channel for live message delivery, typing indicators, and presence tracking. Each message includes cryptographic nonce, ciphertext, and signature validation before render. Architecture Overview Frontend (React + Tailwind): Encryption, proof generation, local key storage, message rendering. Backend (Express + Supabase): Stateless API for sessions, rate limits, and metadata. Crypto Layer (tweetnacl, ed2curve, bs58): Signing, sealing, encryption primitives. Database (Supabase PostgreSQL): Stores ciphertext and public keys only. Realtime (WebSocket): Delivers encrypted payloads instantly. Key Design Principles Zero Storage of Private Keys All signing keys exist only in the user’s local storage. Provable Authentication Login requests include cryptographic proofs verified without revealing secrets. Encrypted-At-Rest and In-Transit All messages are encrypted before leaving the device. Verifiable Sender Identity Each message includes a detached Ed25519 signature verifying authorship. Tech Stack Frontend: React, TailwindCSS, TypeScript, Vite Backend: Node.js (Express), Supabase, MongoDB Cryptography: TweetNaCl, ed2curve, bs58, genSTARK Blockchain: Solana Web3.js Realtime: WebSockets Security: Row-Level Security, JWT Sessions, Proof Verification What’s next x402 protocol implementation

ZKForge

24,207 просмотров • 9 месяцев назад