Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2024-55555 PoC — Invoice Ninja 代码问题漏洞

Source
Associated Vulnerability
Title: Invoice Ninja 代码问题漏洞 (CVE-2024-55555)
Description:Invoice Ninja before 5.10.43 allows remote code execution from a pre-authenticated route when an attacker knows the APP_KEY. This is exacerbated by .env files, available from the product's repository, that have default APP_KEY values. The route/{hash} route defined in the invoiceninja/routes/client.php file can be accessed without authentication. The parameter {hash} is passed to the function decrypt that expects a Laravel ciphered value containing a serialized object. (Furthermore, Laravel contains several gadget chains usable to trigger remote command execution from arbitrary deserialization.) Therefore, an attacker in possession of the APP_KEY is able to fully control a string passed to an unserialize function.
Description
Laravel Crypto Killer Mass Scanner (CVE-2024-55555)
Readme
# Laravel Crypto Killer Mass Scanner (CVE-2024-55555)

This script performs a mass scan of Laravel-based applications vulnerable to [CVE-2024-55555](https://nvd.nist.gov/vuln/detail/CVE-2024-55555), an **unauthenticated remote code execution (RCE)** vulnerability in [Invoice Ninja](https://www.synacktiv.com/advisories/invoiceninja-unauthenticated-remote-command-execution-when-appkey-known). It automates the process of detecting sites using weak or known `APP_KEY` values and checks whether they are vulnerable.

## 📌 How It Works

1. Reads a list of domains from `list.txt`.
2. Sends a request to each target and captures the Laravel-encrypted cookie (excluding `XSRF-TOKEN`).
3. Runs a brute-force decryption using [laravel-crypto-killer](https://github.com/synacktiv/laravel-crypto-killer) to find a valid `APP_KEY`.
4. If a valid key is found, the result is saved to `result.txt` in the format:

```
domain.tld|base64:APP_KEY
```

## 🧱 Requirements

Before using this tool, you **must install and configure** [`laravel-crypto-killer`](https://github.com/synacktiv/laravel-crypto-killer).

### 🔧 Install Laravel-Crypto-Killer

```bash
git clone https://github.com/synacktiv/laravel-crypto-killer.git
cd laravel-crypto-killer
pip install -r requirements.txt
```

> ⚠️ It's recommended to use a Python virtual environment.

### 🗂️ Wordlists

Ensure that the `wordlists/` folder contains appropriate keys to brute-force with. You can use the default ones or add your own `APP_KEY` values (in `base64:` format).

## 🚀 Usage

1. Prepare your `list.txt` with one domain per line (no `http` or `https` required):

```
ninja.example.com
account.example.com
```

2. Run the script:

```bash
python3 mass_laravel_crypto_bruteforce.py
```

3. If successful, the script will output:

```
[+] Key found for account.example.com: base64:RR++yb2rJ9kdtbrh3+AmbHLDtu+Q79i++co9Y8ybbno=
```

And save it in `result.txt`.

## 🛡️ About CVE-2024-55555

- **Vulnerability**: Invoice Ninja does not properly secure Laravel `APP_KEY` usage.
- **Impact**: If the `APP_KEY` is known or guessable, remote attackers can:
  - Decrypt cookies or serialized data.
  - Craft malicious payloads.
  - Execute arbitrary PHP code.
- **Reference**:
  - [Synacktiv Advisory](https://www.synacktiv.com/advisories/invoiceninja-unauthenticated-remote-command-execution-when-appkey-known)
  - [CVE-2024-55555 - NVD](https://nvd.nist.gov/vuln/detail/CVE-2024-55555)

## 🧠 Notes

- The script automatically selects the longest cookie (excluding `XSRF-TOKEN`) assuming it's the encrypted session.
- Parallel scanning is supported via `ThreadPoolExecutor` for faster performance.
- Only targets with Laravel-encrypted cookies will be processed.

## ✅ Example Output

```bash
[+] Key found for account.example.com: base64:RR++yb2rJ9kdtbrh3+AmbHLDtu+Q79i++co9Y8ybbno=
```

## ⚠️ Disclaimer

This tool is for **educational and authorized testing** only.  
Do **not** use this on systems without explicit permission.  
You are solely responsible for your actions.
File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →