Welcome to KaNary!
KaNary enhances AI/LLM red teaming and penetration testing assessments with traceable URLs and dynamically crafted artifacts. The system helps to monitor system interactions, analyze AI behavior, and assess how models handle external inputs (URLs, scripts, commands).
Your base KaNary URL:
(Fetching...)
Logged Entries
| Timestamp | Requester ID | Path | Query String |
|---|
Examples of Usage:
Below are examples demonstrating how KaNary dynamically serves artifacts (scripts, HTML, etc.) that make subsequent calls or output tracable signatures when executed.
Input URL: https://projectkz.com/archive1/<kanary_id>/path/to/resource
The server logs any paths beyond <kanary_id> and returns a text response.
Logged query (<kanary_id>)
Logged Entries Example:
2025-01-08 14:52:16,3c1bf,path/to/resource,
Input URL: https://projectkz.com/archive1/<kanary_id>/test?query=value
The query string (?query=value) is logged with the timestamp and path.
Logged query (<kanary_id>)
Logged Entries Example:
2025-01-08 14:52:16,3c1bf,test,query=value
Input URL: https://projectkz.com/archive1/<kanary_id>/example.py
Server Response (Generated Python Script):
import requests # Example request url = "https://projectkz.com/archive1/<kanary_id>/ranfrompython" response = requests.get(url) print("Response from {url} (<kanary_id>):", response.text)
This Python script makes a web request to a traceable endpoint.
Logged Entries Example:
2025-01-08 14:51:29,3c1bf,example.py, 2025-01-08 14:51:30,3c1bf,ranfrompython,
Input URL: https://projectkz.com/archive1/<kanary_id>/example.html
Server Response (Generated HTML File):
<!DOCTYPE html>
<html>
<head>
<title>Dynamic HTML</title>
</head>
<body>
<h1>Welcome, <kanary_id></h1>
<p>This page will automatically redirect to your traceable URL.</p>
<script>
window.location.href = "https://projectkz.com/archive1/<kanary_id>/ranfromhtml";
</script>
</body>
</html>
This HTML page automatically redirects to a traceable endpoint upon opening.
Logged Entries Example:
2025-01-08 14:52:16,3c1bf,example.html, 2025-01-08 14:52:16,3c1bf,ranfromhtml,
Input URL: https://projectkz.com/archive1/<kanary_id>/example.js
Server Response (Generated JavaScript File):
fetch("https://projectkz.com/archive1/<kanary_id>/ranfromjs")
.then(response => response.text())
.then(data => console.log("Response from server (<kanary_id>):", data))
.catch(error => console.error("Error (<kanary_id>):", error));
This JavaScript file makes a fetch request to a traceable endpoint.
Logged Entries Example:
2025-01-08 14:52:16,3c1bf,example.js, 2025-01-08 14:52:17,ranfromjs,
Input URL: https://projectkz.com/archive1/<kanary_id>/example.sh
Server Response (Generated Shell Script):
#!/bin/bash
# Example shell script making a curl request
curl -X GET "https://projectkz.com/archive1/<kanary_id>/ranfromsh"
This shell script uses curl to make a request to your traceable endpoint.
Logged Entries Example:
2025-01-08 14:52:16,3c1bf,example.sh, 2025-01-08 14:52:16,3c1bf,ranfromsh,
Input URL: https://projectkz.com/archive1/<kanary_id>/example.php
Server Response (Generated PHP File):
<?php echo file_get_contents('https://projectkz.com/archive1/<kanary_id>/ranfromphp'); ?>
This PHP file fetches content from a traceable endpoint and outputs it.
Logged Entries Example:
2025-01-08 14:52:16,3c1bf,example.php,
2025-01-08 14:52:16,3c1bf,ranfromphp,
Input URL: https://projectkz.com/archive1/<kanary_id>/example.jsp
Server Response (Generated JSP File):
<% out.print(new java.util.Scanner(new java.net.URL("https://projectkz.com/archive1/<kanary_id>/ranfromjsp").openStream(), "UTF-8").useDelimiter("\\\A").next()); %>
This JSP file dynamically retrieves and prints content from a traceable endpoint.
Logged Entries Example:
2025-01-08 14:52:16,3c1bf,example.jsp,
2025-01-08 14:52:16,3c1bf,ranfromjsp,
Input URL: https://projectkz.com/archive1/<kanary_id>/example.ps1
Server Response (Generated PowerShell Script):
Invoke-WebRequest -Uri https://projectkz.com/archive1/<kanary_id>/ranfromps1 -UseBasicParsing
This PowerShell script makes a request to a traceable endpoint.
Logged Entries Example:
2025-01-08 14:52:16,3c1bf,example.ps1,
2025-01-08 14:52:16,3c1bf,ranfromps1,
Input URL: https://projectkz.com/archive1/<kanary_id>/example.bat
Server Response (Generated BAT File):
@echo off
for /f "tokens=*" %%a in ('type https://projectkz.com/archive1/<kanary_id>/ranfrombat') do echo %%a
This BAT script echoes content retrieved from a traceable endpoint.
Logged Entries Example:
2025-01-08 14:52:16,3c1bf,example.bat,
2025-01-08 14:52:16,3c1bf,ranfrombat,
Use Cases:
Goal: Understand how AI/LLM systems and their software stacks handle potentially malicious or unexpected inputs.
- Behavioral Analysis:
- Monitor if the system attempts to access provided URLs, indicating external retrieval capabilities (web scraping, RAG, etc.).
- Detect whether UUIDs or tokens embedded in scripts/URLs are returned by the model, revealing potential data leakage.
- Execution Testing:
- Log instances where scripts (Python, shell, batch) are fetched, indicating code execution capabilities within the AI environment.
- Trace if the script is executed and makes further requests, revealing connectivity and execution scope.
- Validation Testing:
- Insert scripts or commands with embedded IDs to see if the AI validates or executes them improperly.
- Identify scenarios where the system exposes internal processing details (e.g., returning full URLs or command output).
Goal: Identify and analyze security vulnerabilities in systems using traceable URLs and scripts.
- SSRF Detection:
- Log requests from misconfigured systems that attempt to access traceable URLs.
- Correlate access patterns with expected behavior to reveal misuse or unintended functionality.
- Phishing Simulation:
- Track interactions with HTML files containing redirects to traceable URLs.
- Analyze user/system behavior to gauge susceptibility to phishing or automated link navigation.
- Command Injection Tracking:
- Log if shell or batch scripts with traceable URLs are executed on the target environment.
- Detect execution of embedded commands that make secondary requests to the server.
