![]() |
VOOZH | about |
dotnet add package Mostlylucid.BotDetection.ApiHolodeck --version 1.0.0
NuGet\Install-Package Mostlylucid.BotDetection.ApiHolodeck -Version 1.0.0
<PackageReference Include="Mostlylucid.BotDetection.ApiHolodeck" Version="1.0.0" />
<PackageVersion Include="Mostlylucid.BotDetection.ApiHolodeck" Version="1.0.0" />Directory.Packages.props
<PackageReference Include="Mostlylucid.BotDetection.ApiHolodeck" />Project file
paket add Mostlylucid.BotDetection.ApiHolodeck --version 1.0.0
#r "nuget: Mostlylucid.BotDetection.ApiHolodeck, 1.0.0"
#:package Mostlylucid.BotDetection.ApiHolodeck@1.0.0
#addin nuget:?package=Mostlylucid.BotDetection.ApiHolodeck&version=1.0.0Install as a Cake Addin
#tool nuget:?package=Mostlylucid.BotDetection.ApiHolodeck&version=1.0.0Install as a Cake Tool
A honeypot extension for that creates a fake API "holodeck" for detected bots.
Instead of simply blocking detected bots, ApiHolodeck redirects them to fake API endpoints that return realistic-looking but useless data. This:
# Install the package
dotnet add package Mostlylucid.BotDetection.ApiHolodeck
// Program.cs
builder.Services.AddBotDetection();
builder.Services.AddApiHolodeck(options =>
{
options.MockApiBaseUrl = "http://localhost:5116/api/mock";
options.Mode = HolodeckMode.RealisticButUseless;
});
app.UseBotDetection();
ollama pull gemma3:4b# Docker
docker run -p 5116:5116 -e OLLAMA_URL=http://host.docker.internal:11434 scottgal/mockllmapi
# Or add to your app
dotnet add package mostlylucid.mockllmapi
// Add MockLLMApi to your app
builder.Services.AddLLMockApi(config =>
{
config.OllamaUrl = "http://localhost:11434";
config.DefaultModel = "gemma3:4b";
});
app.MapLLMockApi("/api/mock");
Redirects detected bots to MockLLMApi instead of your real backend.
{
"BotDetection": {
"ActionPolicies": {
"holodeck": {
"Type": "Holodeck",
"MockApiBaseUrl": "http://localhost:5116/api/mock",
"Mode": "realistic-but-useless",
"MaxStudyRequests": 50
}
},
"DetectionPolicies": {
"default": {
"Transitions": [
{ "WhenRiskExceeds": 0.6, "ActionPolicyName": "holodeck" },
{ "WhenRiskExceeds": 0.9, "ActionPolicyName": "block" }
]
}
}
}
}
Detects when bots access trap paths that real users would never visit.
Built-in honeypot paths include:
/wp-login.php, /wp-admin - WordPress probes/.env, /config.php - Config file access/.git/config - Version control exposure/phpmyadmin, /adminer.php - Database admin/backup.sql, /dump.sql - Database dumpsAny access to these paths = instant high-confidence bot detection.
Reports malicious IPs to threat intelligence services (Project Honeypot, AbuseIPDB).
{
"BotDetection": {
"Holodeck": {
"ReportToProjectHoneypot": true,
"ProjectHoneypotAccessKey": "your-key",
"MinRiskToReport": 0.85
}
}
}
| Mode | Description |
|---|---|
Realistic |
Generate believable fake data |
RealisticButUseless |
Fake data with wrong schemas, demo values |
Chaos |
Random errors, timeouts, inconsistencies |
StrictSchema |
OpenAPI-based structured fakes |
Adversarial |
Mix of all tactics |
{
"BotDetection": {
"Holodeck": {
"MockApiBaseUrl": "http://localhost:5116/api/mock",
"Mode": "RealisticButUseless",
"ContextSource": "Fingerprint",
"MaxStudyRequests": 50,
"MockApiTimeoutMs": 5000,
"EnableHoneypotLinkDetection": true,
"HoneypotPaths": [
"/admin-secret",
"/wp-login.php",
"/.env"
],
"ReportToProjectHoneypot": false,
"ProjectHoneypotAccessKey": "",
"MinRiskToReport": 0.85,
"MaxReportsPerHour": 100
}
}
}
Request -> BotDetection
|
+-- Low Risk -> Real Backend
|
+-- High Risk -> HolodeckActionPolicy
|
+-- Build context key (fingerprint/IP)
|
+-- Forward to MockLLMApi
| +-- /api/mock/{original-path}?context={key}
|
+-- Return LLM-generated fake response
+-- Bot thinks it's real data!
Each bot gets a consistent fake world based on their fingerprint. If they make 10 requests, they get coherent (but fake) responses. This makes it harder to detect they're being sandboxed.
The ContextSource setting determines how bots are identified:
| Source | Description |
|---|---|
Fingerprint |
Browser/client fingerprint (most accurate) |
Ip |
IP address only |
Session |
Session ID |
Combined |
IP + Fingerprint |
After MaxStudyRequests, the bot is hard-blocked. This prevents infinite resource consumption while still gathering
useful intelligence about their scraping patterns.
// Protect your API with a holodeck fallback
builder.Services.AddBotDetection(options =>
{
options.BotThreshold = 0.6; // Lower threshold for holodeck
options.BlockDetectedBots = false; // Don't block, redirect to holodeck
});
builder.Services.AddApiHolodeck(options =>
{
options.Mode = HolodeckMode.Adversarial;
options.MaxStudyRequests = 100;
});
Legitimate users get your real API. Bots get a fake one that wastes their time.
# docker-compose.yml
services:
gateway:
image: scottgal/mostlylucid.yarpgateway
ports:
- "8080:8080"
environment:
- DEFAULT_UPSTREAM=https://your-api.com
- BOTDETECTION__HOLODECK__MOCKAPIBASEURL=http://mockllmapi:5116/api/mock
- BOTDETECTION__HOLODECK__MODE=RealisticButUseless
depends_on:
- mockllmapi
mockllmapi:
image: scottgal/mockllmapi
environment:
- OLLAMA_URL=http://host.docker.internal:11434
Unlicense - Public Domain
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 80 | 4/22/2026 |
v1.0.0 - Initial Release
- HolodeckActionPolicy: Redirect detected bots to fake API endpoints powered by MockLLMApi
- HoneypotLinkContributor: Detect when bots follow hidden honeypot links
- HoneypotReporter: Report malicious IPs to Project Honeypot
- Integration with mostlylucid.mockllmapi for LLM-powered fake responses
- Configurable modes: realistic, realistic-but-useless, chaos, strict-schema
- Context-based fake worlds per bot fingerprint