evil-ollama 3.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- evil_ollama-3.0.0/PKG-INFO +330 -0
- evil_ollama-3.0.0/README.md +303 -0
- evil_ollama-3.0.0/evil_ollama.egg-info/PKG-INFO +330 -0
- evil_ollama-3.0.0/evil_ollama.egg-info/SOURCES.txt +11 -0
- evil_ollama-3.0.0/evil_ollama.egg-info/dependency_links.txt +1 -0
- evil_ollama-3.0.0/evil_ollama.egg-info/entry_points.txt +2 -0
- evil_ollama-3.0.0/evil_ollama.egg-info/not-zip-safe +1 -0
- evil_ollama-3.0.0/evil_ollama.egg-info/requires.txt +3 -0
- evil_ollama-3.0.0/evil_ollama.egg-info/top_level.txt +1 -0
- evil_ollama-3.0.0/evilollama/__init__.py +2792 -0
- evil_ollama-3.0.0/evilollama/__main__.py +3 -0
- evil_ollama-3.0.0/setup.cfg +4 -0
- evil_ollama-3.0.0/setup.py +51 -0
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: evil-ollama
|
|
3
|
+
Version: 3.0.0
|
|
4
|
+
Summary: ๐ฆ Exposed Ollama Instance Hunter, Proxy & API Manipulation Tool
|
|
5
|
+
Home-page: https://github.com/evogix/Evil-Ollama
|
|
6
|
+
Author: evogix
|
|
7
|
+
Author-email:
|
|
8
|
+
Project-URL: Documentation, https://github.com/evogix/Evil-Ollama/blob/main/DOCS.md
|
|
9
|
+
Project-URL: Source, https://github.com/evogix/Evil-Ollama
|
|
10
|
+
Keywords: ollama,security,bug-bounty,llm,ai,pentesting,red-team
|
|
11
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
12
|
+
Classifier: Intended Audience :: Information Technology
|
|
13
|
+
Classifier: Topic :: Security :: Penetration Testing
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
21
|
+
Classifier: Operating System :: OS Independent
|
|
22
|
+
Requires-Python: >=3.8
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
Requires-Dist: aiohttp>=3.8.0
|
|
25
|
+
Requires-Dist: flask>=2.0.0
|
|
26
|
+
Requires-Dist: requests>=2.28.0
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
30
|
+
โ โ
|
|
31
|
+
โ โโโโโโโโโโโ โโโโโโโโโ โโโโโโโ โโโ โโโ โโโโโโ โ
|
|
32
|
+
โ โโโโโโโโโโโ โโโโโโโโโ โโโโโโโโโโโโ โโโ โโโโโโโโ โ
|
|
33
|
+
โ โโโโโโ โโโ โโโโโโโโโ โโโ โโโโโโ โโโ โโโโโโโโ โ
|
|
34
|
+
โ โโโโโโ โโโโ โโโโโโโโโโ โโโ โโโโโโ โโโ โโโโโโโโ โ
|
|
35
|
+
โ โโโโโโโโ โโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโ โ
|
|
36
|
+
โ โโโโโโโโ โโโโโ โโโโโโโโโโโ โโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโ โ
|
|
37
|
+
โ โ
|
|
38
|
+
โ โโโโโโโ โโโ โโโ โโโโโโ โโโโ โโโโ โโโโโโ โ
|
|
39
|
+
โ โโโโโโโโโโโ โโโ โโโโโโโโโโโโโ โโโโโโโโโโโโโ โ
|
|
40
|
+
โ โโโโโโโโโโโ โโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
|
|
41
|
+
โ โโโโโโโ โโโ โโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
|
|
42
|
+
โ โโโ โโโโโโโโโโโโโโโโโโโ โโโโโโ โโโ โโโโโโ โโโ โ
|
|
43
|
+
โ โโโ โโโโโโโโโโโโโโโโโโโ โโโโโโ โโโโโโ โโโ โ
|
|
44
|
+
โ โ
|
|
45
|
+
โ ๐ฅ Exposed Ollama Instance Hunter v3.0 ๐ฅ โ
|
|
46
|
+
โ Find ยท Exploit ยท Proxy ยท PWN โ
|
|
47
|
+
โ โ
|
|
48
|
+
โ [ For Authorized Security Testing Only ] โ
|
|
49
|
+
โ โ
|
|
50
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
# ๐ฆ EVIL-OLLAMA
|
|
54
|
+
|
|
55
|
+
> **Next-Gen Exposed Ollama Instance Finder, Vulnerability Scanner & Proxy Tool**
|
|
56
|
+
>
|
|
57
|
+
> Find publicly exposed Ollama LLM instances across the internet, scan for vulnerabilities, proxy through them, and more.
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
61
|
+
โ [+] TARGET: Any exposed Ollama instance โ
|
|
62
|
+
โ [+] METHOD: Async TCP ยท DNS ยท CT Logs ยท Shodan ยท Censys ยท FOFA โ
|
|
63
|
+
โ [+] VULN SCAN: Auth ยท CVE-2024-37032 ยท SSRF ยท CORS ยท Metrics โ
|
|
64
|
+
โ [+] PROXY: OpenAI-compatible ยท Chat ยท Generate โ
|
|
65
|
+
โ [+] STATUS: ACTIVE โ
|
|
66
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## ๐ฅ FEATURES
|
|
72
|
+
|
|
73
|
+
| Category | Features |
|
|
74
|
+
|----------|----------|
|
|
75
|
+
| **๐ SCANNING** | Random IP (weighted) ยท CIDR ยท IP List ยท DNS Discovery ยท CT Logs ยท Shodan ยท Censys ยท FOFA ยท **9 methods total** |
|
|
76
|
+
| **๐ VULNERABILITY** | Auth check ยท CVE-2024-37032 (RCE) ยท Model Create/Delete ยท CORS ยท SSRF ยท Metrics ยท Info Disclosure ยท Timing ยท **10 checks** |
|
|
77
|
+
| **๐ PROXY** | OpenAI SDK compatible ยท Streaming ยท Full API forward ยท All HTTP methods |
|
|
78
|
+
| **๐ฌ CHAT** | Interactive ยท Batch mode ยท System prompts ยท Temperature ยท Raw API |
|
|
79
|
+
| **๐ FINGERPRINT** | 18 endpoints ยท GPU detection ยท Model analysis ยท Size calc ยท Running models |
|
|
80
|
+
| **๐ฆ MODELS** | List ยท Pull info ยท Deep analyze ยท Size breakdown |
|
|
81
|
+
| **๐ EXPORT** | HTML (beautiful) ยท CSV ยท JSON ยท Vuln stats ยท Geo distribution |
|
|
82
|
+
| **๐ค AUTO-PWN** | Scan โ Vuln Scan โ Geolocate โ Proxy โ Report โ **one command** |
|
|
83
|
+
| **๐ก MONITOR** | CLI-only daemon ยท Telegram alerts ยท Auto-export |
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## โก QUICK START
|
|
88
|
+
|
|
89
|
+
### ๐ Installation
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
git clone https://github.com/evogix/Evil-Ollama
|
|
93
|
+
cd Evil-Ollama
|
|
94
|
+
pip install aiohttp flask requests
|
|
95
|
+
chmod +x launcher.sh
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### ๐ฏ Basic Scan
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
# Scan 10,000 random IPs for Ollama instances
|
|
102
|
+
./launcher.sh scan --random 10000
|
|
103
|
+
|
|
104
|
+
# Scan with geolocation + export
|
|
105
|
+
./launcher.sh scan --random 10000 --geo --export html --notify
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## ๐ COMMANDS
|
|
111
|
+
|
|
112
|
+
### ๐ SCANNING
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
# Random IP scan (weighted for real-world density)
|
|
116
|
+
./launcher.sh scan --random 10000
|
|
117
|
+
|
|
118
|
+
# CIDR range scan
|
|
119
|
+
./launcher.sh scan --cidr 0.0.0.0/8
|
|
120
|
+
|
|
121
|
+
# DNS discovery โ find ollama.example.com, ai.example.com, etc.
|
|
122
|
+
./launcher.sh scan --dns example.com
|
|
123
|
+
|
|
124
|
+
# Certificate Transparency log discovery
|
|
125
|
+
./launcher.sh scan --ct example.com
|
|
126
|
+
|
|
127
|
+
# Internet DB search
|
|
128
|
+
./launcher.sh scan --shodan API_KEY
|
|
129
|
+
./launcher.sh scan --censys ID:SECRET
|
|
130
|
+
./launcher.sh scan --fofa EMAIL:KEY
|
|
131
|
+
|
|
132
|
+
# Scan with extras
|
|
133
|
+
./launcher.sh scan --random 5000 --geo --export html --notify
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### ๐ VULNERABILITY SCANNING
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# Scan a specific instance
|
|
140
|
+
./launcher.sh vuln --target 1.2.3.4:11434
|
|
141
|
+
|
|
142
|
+
# Scan ALL found instances
|
|
143
|
+
./launcher.sh vuln --all
|
|
144
|
+
|
|
145
|
+
# Exploit a specific CVE
|
|
146
|
+
./launcher.sh exploit --cve CVE-2024-37032 --target 1.2.3.4:11434
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Vulnerability checks:
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
๐ [CRITICAL] CVE-2024-37032 โ RCE via Crafted Model Import
|
|
153
|
+
๐ [HIGH ] No Authentication โ Open API access
|
|
154
|
+
๐ [HIGH ] Unauthenticated Model Creation
|
|
155
|
+
๐ [HIGH ] Unauthenticated Model Deletion
|
|
156
|
+
๐ [HIGH ] CVE-2024-39721 โ SSRF in Model Pulling
|
|
157
|
+
๐ [MEDIUM ] CORS Misconfiguration
|
|
158
|
+
๐ [MEDIUM ] Prometheus Metrics Exposed
|
|
159
|
+
๐ [LOW ] Server Information Disclosure
|
|
160
|
+
๐ [LOW ] No CSRF Protection
|
|
161
|
+
๐ [LOW ] Response Timing Leak
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### ๐ PROXY (OpenAI Compatible)
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
# Start proxy to remote Ollama
|
|
168
|
+
./launcher.sh proxy --target 1.2.3.4:11434 --port 8080
|
|
169
|
+
|
|
170
|
+
# Use with OpenAI SDK:
|
|
171
|
+
# from openai import OpenAI
|
|
172
|
+
# client = OpenAI(base_url="http://127.0.0.1:8080/v1/", api_key="ollama")
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### ๐ฌ INTERACTIVE CHAT
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
# Chat with a remote model
|
|
179
|
+
./launcher.sh chat --target 1.2.3.4:11434
|
|
180
|
+
|
|
181
|
+
# Batch execute prompts from file
|
|
182
|
+
./launcher.sh chat --batch prompts.txt --target 1.2.3.4:11434
|
|
183
|
+
|
|
184
|
+
# Chat commands: /help, /models, /clear, /model N, /system, /temp, /raw, /info, /export
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### ๐ DEEP FINGERPRINT
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
# Fingerprint a single instance
|
|
191
|
+
./launcher.sh fingerprint --target 1.2.3.4:11434
|
|
192
|
+
|
|
193
|
+
# Fingerprint ALL found instances
|
|
194
|
+
./launcher.sh fingerprint --all
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Checks 18 endpoints including: `/api/tags`, `/api/version`, `/api/ps`, `/api/show`, `/api/blobs`, `/api/pull`, `/api/push`, `/api/create`, `/api/delete`, `/api/copy`, `/api/embed`, `/v1/models`, `/docs`, `/metrics`, `/debug`, `/health`, `/status`
|
|
198
|
+
|
|
199
|
+
### ๐ฆ MODEL OPERATIONS
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
# List models with details
|
|
203
|
+
./launcher.sh models --target 1.2.3.4:11434
|
|
204
|
+
|
|
205
|
+
# Pull model info/config
|
|
206
|
+
./launcher.sh models --pull 1.2.3.4:11434 llama3.2
|
|
207
|
+
|
|
208
|
+
# Deep analyze a model
|
|
209
|
+
./launcher.sh models --analyze 1.2.3.4:11434 llama3.2
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### ๐ EXPORT
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
./launcher.sh export --format html # Beautiful HTML report with geo & vuln stats
|
|
216
|
+
./launcher.sh export --format csv # CSV for analysis
|
|
217
|
+
./launcher.sh export --format json # Raw JSON
|
|
218
|
+
./launcher.sh export --format all # All formats
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### ๐ค AUTO-PWN (One Command)
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
# Scan โ Vuln Scan โ Geolocate โ Proxy โ Report
|
|
225
|
+
./launcher.sh autopwn --random 5000
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### ๐ก MONITOR DAEMON
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
# Continuous scanning (CLI only, no web)
|
|
232
|
+
./launcher.sh monitor --interval 3600 --random 5000 --notify --export html
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### โ๏ธ CONFIGURATION
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
./launcher.sh config --show # Show config
|
|
239
|
+
./launcher.sh config --telegram-token "BOT_TOKEN" # Telegram alerts
|
|
240
|
+
./launcher.sh config --telegram-chat "CHAT_ID"
|
|
241
|
+
./launcher.sh config --shodan-key "API_KEY"
|
|
242
|
+
./launcher.sh config --set scan_timeout 3 # Custom setting
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## ๐ SAMPLE OUTPUT
|
|
248
|
+
|
|
249
|
+
```
|
|
250
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
251
|
+
โ ๐ฆ EVIL-OLLAMA v3.0 โ
|
|
252
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
253
|
+
|
|
254
|
+
[12:30:01] [โถ STEP ] Step 1/4: Scanning 5000 random IPs...
|
|
255
|
+
[12:30:01] [๐ฏ INFO] Scanning 5000 hosts on port 11434 (concurrency: 1000)
|
|
256
|
+
[โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ] 45% | 2250/5000 | 850/s | Found: 12 | ETA: 3.2s
|
|
257
|
+
[12:30:07] [๐ฆ FOUND] 203.0.113.42:11434 | v0.1.32 | llama3.2, mistral, codellama
|
|
258
|
+
[12:30:07] [๐ฆ FOUND] 198.51.100.73:11434 | v0.3.0 | llama3.1, nomic-embed-text
|
|
259
|
+
[...]
|
|
260
|
+
|
|
261
|
+
[12:30:10] [โถ STEP ] Step 2/4: Geolocating...
|
|
262
|
+
[12:30:10] [๐ GEO ] 203.0.113.42 โ San Francisco, US | DigitalOcean
|
|
263
|
+
[12:30:11] [๐ GEO ] 198.51.100.73 โ London, UK | Hetzner
|
|
264
|
+
|
|
265
|
+
[12:30:11] [โถ STEP ] Step 3/4: Vulnerability scanning...
|
|
266
|
+
[12:30:11] [๐ด VULN] 203.0.113.42:11434
|
|
267
|
+
๐ [HIGH ] No Authentication Required
|
|
268
|
+
๐ [CRITICAL] Potential RCE via Crafted Model Import (CVE-2024-37032)
|
|
269
|
+
๐ [HIGH ] Unauthenticated Model Creation
|
|
270
|
+
|
|
271
|
+
[12:30:14] [โถ STEP ] Step 4/4: Generating report...
|
|
272
|
+
[12:30:14] [๐ OK ] HTML report saved: evilollama_report.html (45.2 KB)
|
|
273
|
+
|
|
274
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
275
|
+
โ ๐ AUTO-PWN COMPLETE โ
|
|
276
|
+
โ Instances found: 7 โ
|
|
277
|
+
โ Total models: 23 โ
|
|
278
|
+
โ Vulnerabilities: 12 โ
|
|
279
|
+
โ CVEs detected: 5 โ
|
|
280
|
+
โ Report: evilollama_report.html โ
|
|
281
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
282
|
+
|
|
283
|
+
[12:30:15] [๐ PROXY] Proxy โ 127.0.0.1:9090 โ 203.0.113.42:11434
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## ๐ก๏ธ CVE DATABASE
|
|
289
|
+
|
|
290
|
+
| CVE ID | Severity | CVSS | Description | Affected Versions |
|
|
291
|
+
|--------|----------|------|-------------|-------------------|
|
|
292
|
+
| CVE-2024-37032 | **CRITICAL** | 9.1 | RCE via crafted model file (path traversal) | < 0.1.47 |
|
|
293
|
+
| CVE-2024-39720 | **HIGH** | 7.5 | Prompt injection via crafted system prompt | < 0.1.34 |
|
|
294
|
+
| CVE-2024-39721 | **HIGH** | 7.5 | SSRF in model pulling mechanism | < 0.1.34 |
|
|
295
|
+
| CVE-2024-39722 | **HIGH** | 7.3 | Path traversal in API endpoints | < 0.1.34 |
|
|
296
|
+
| CVE-2025-23104 | **HIGH** | 8.2 | API authentication bypass in /api/pull | < 0.3.0 |
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
## ๐ REQUIREMENTS
|
|
301
|
+
|
|
302
|
+
```
|
|
303
|
+
pip install aiohttp flask requests
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
## โ ๏ธ LEGAL DISCLAIMER
|
|
309
|
+
|
|
310
|
+
```
|
|
311
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
312
|
+
โ โ
|
|
313
|
+
โ This tool is for AUTHORIZED SECURITY TESTING only. โ
|
|
314
|
+
โ โ
|
|
315
|
+
โ Only use on systems you own or have explicit written permission โ
|
|
316
|
+
โ to test. Unauthorized scanning or exploitation is ILLEGAL. โ
|
|
317
|
+
โ โ
|
|
318
|
+
โ The authors assume no liability for misuse. โ
|
|
319
|
+
โ โ
|
|
320
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
```
|
|
326
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
327
|
+
โ EVIL-OLLAMA v3.0 ยท https://github.com/evogix/Evil-Ollama โ
|
|
328
|
+
โ For authorized security research & bug bounty purposes only โ
|
|
329
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
330
|
+
```
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
```
|
|
2
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
3
|
+
โ โ
|
|
4
|
+
โ โโโโโโโโโโโ โโโโโโโโโ โโโโโโโ โโโ โโโ โโโโโโ โ
|
|
5
|
+
โ โโโโโโโโโโโ โโโโโโโโโ โโโโโโโโโโโโ โโโ โโโโโโโโ โ
|
|
6
|
+
โ โโโโโโ โโโ โโโโโโโโโ โโโ โโโโโโ โโโ โโโโโโโโ โ
|
|
7
|
+
โ โโโโโโ โโโโ โโโโโโโโโโ โโโ โโโโโโ โโโ โโโโโโโโ โ
|
|
8
|
+
โ โโโโโโโโ โโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโ โ
|
|
9
|
+
โ โโโโโโโโ โโโโโ โโโโโโโโโโโ โโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโ โ
|
|
10
|
+
โ โ
|
|
11
|
+
โ โโโโโโโ โโโ โโโ โโโโโโ โโโโ โโโโ โโโโโโ โ
|
|
12
|
+
โ โโโโโโโโโโโ โโโ โโโโโโโโโโโโโ โโโโโโโโโโโโโ โ
|
|
13
|
+
โ โโโโโโโโโโโ โโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
|
|
14
|
+
โ โโโโโโโ โโโ โโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
|
|
15
|
+
โ โโโ โโโโโโโโโโโโโโโโโโโ โโโโโโ โโโ โโโโโโ โโโ โ
|
|
16
|
+
โ โโโ โโโโโโโโโโโโโโโโโโโ โโโโโโ โโโโโโ โโโ โ
|
|
17
|
+
โ โ
|
|
18
|
+
โ ๐ฅ Exposed Ollama Instance Hunter v3.0 ๐ฅ โ
|
|
19
|
+
โ Find ยท Exploit ยท Proxy ยท PWN โ
|
|
20
|
+
โ โ
|
|
21
|
+
โ [ For Authorized Security Testing Only ] โ
|
|
22
|
+
โ โ
|
|
23
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
# ๐ฆ EVIL-OLLAMA
|
|
27
|
+
|
|
28
|
+
> **Next-Gen Exposed Ollama Instance Finder, Vulnerability Scanner & Proxy Tool**
|
|
29
|
+
>
|
|
30
|
+
> Find publicly exposed Ollama LLM instances across the internet, scan for vulnerabilities, proxy through them, and more.
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
34
|
+
โ [+] TARGET: Any exposed Ollama instance โ
|
|
35
|
+
โ [+] METHOD: Async TCP ยท DNS ยท CT Logs ยท Shodan ยท Censys ยท FOFA โ
|
|
36
|
+
โ [+] VULN SCAN: Auth ยท CVE-2024-37032 ยท SSRF ยท CORS ยท Metrics โ
|
|
37
|
+
โ [+] PROXY: OpenAI-compatible ยท Chat ยท Generate โ
|
|
38
|
+
โ [+] STATUS: ACTIVE โ
|
|
39
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## ๐ฅ FEATURES
|
|
45
|
+
|
|
46
|
+
| Category | Features |
|
|
47
|
+
|----------|----------|
|
|
48
|
+
| **๐ SCANNING** | Random IP (weighted) ยท CIDR ยท IP List ยท DNS Discovery ยท CT Logs ยท Shodan ยท Censys ยท FOFA ยท **9 methods total** |
|
|
49
|
+
| **๐ VULNERABILITY** | Auth check ยท CVE-2024-37032 (RCE) ยท Model Create/Delete ยท CORS ยท SSRF ยท Metrics ยท Info Disclosure ยท Timing ยท **10 checks** |
|
|
50
|
+
| **๐ PROXY** | OpenAI SDK compatible ยท Streaming ยท Full API forward ยท All HTTP methods |
|
|
51
|
+
| **๐ฌ CHAT** | Interactive ยท Batch mode ยท System prompts ยท Temperature ยท Raw API |
|
|
52
|
+
| **๐ FINGERPRINT** | 18 endpoints ยท GPU detection ยท Model analysis ยท Size calc ยท Running models |
|
|
53
|
+
| **๐ฆ MODELS** | List ยท Pull info ยท Deep analyze ยท Size breakdown |
|
|
54
|
+
| **๐ EXPORT** | HTML (beautiful) ยท CSV ยท JSON ยท Vuln stats ยท Geo distribution |
|
|
55
|
+
| **๐ค AUTO-PWN** | Scan โ Vuln Scan โ Geolocate โ Proxy โ Report โ **one command** |
|
|
56
|
+
| **๐ก MONITOR** | CLI-only daemon ยท Telegram alerts ยท Auto-export |
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## โก QUICK START
|
|
61
|
+
|
|
62
|
+
### ๐ Installation
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
git clone https://github.com/evogix/Evil-Ollama
|
|
66
|
+
cd Evil-Ollama
|
|
67
|
+
pip install aiohttp flask requests
|
|
68
|
+
chmod +x launcher.sh
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### ๐ฏ Basic Scan
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
# Scan 10,000 random IPs for Ollama instances
|
|
75
|
+
./launcher.sh scan --random 10000
|
|
76
|
+
|
|
77
|
+
# Scan with geolocation + export
|
|
78
|
+
./launcher.sh scan --random 10000 --geo --export html --notify
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## ๐ COMMANDS
|
|
84
|
+
|
|
85
|
+
### ๐ SCANNING
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# Random IP scan (weighted for real-world density)
|
|
89
|
+
./launcher.sh scan --random 10000
|
|
90
|
+
|
|
91
|
+
# CIDR range scan
|
|
92
|
+
./launcher.sh scan --cidr 0.0.0.0/8
|
|
93
|
+
|
|
94
|
+
# DNS discovery โ find ollama.example.com, ai.example.com, etc.
|
|
95
|
+
./launcher.sh scan --dns example.com
|
|
96
|
+
|
|
97
|
+
# Certificate Transparency log discovery
|
|
98
|
+
./launcher.sh scan --ct example.com
|
|
99
|
+
|
|
100
|
+
# Internet DB search
|
|
101
|
+
./launcher.sh scan --shodan API_KEY
|
|
102
|
+
./launcher.sh scan --censys ID:SECRET
|
|
103
|
+
./launcher.sh scan --fofa EMAIL:KEY
|
|
104
|
+
|
|
105
|
+
# Scan with extras
|
|
106
|
+
./launcher.sh scan --random 5000 --geo --export html --notify
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### ๐ VULNERABILITY SCANNING
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# Scan a specific instance
|
|
113
|
+
./launcher.sh vuln --target 1.2.3.4:11434
|
|
114
|
+
|
|
115
|
+
# Scan ALL found instances
|
|
116
|
+
./launcher.sh vuln --all
|
|
117
|
+
|
|
118
|
+
# Exploit a specific CVE
|
|
119
|
+
./launcher.sh exploit --cve CVE-2024-37032 --target 1.2.3.4:11434
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Vulnerability checks:
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
๐ [CRITICAL] CVE-2024-37032 โ RCE via Crafted Model Import
|
|
126
|
+
๐ [HIGH ] No Authentication โ Open API access
|
|
127
|
+
๐ [HIGH ] Unauthenticated Model Creation
|
|
128
|
+
๐ [HIGH ] Unauthenticated Model Deletion
|
|
129
|
+
๐ [HIGH ] CVE-2024-39721 โ SSRF in Model Pulling
|
|
130
|
+
๐ [MEDIUM ] CORS Misconfiguration
|
|
131
|
+
๐ [MEDIUM ] Prometheus Metrics Exposed
|
|
132
|
+
๐ [LOW ] Server Information Disclosure
|
|
133
|
+
๐ [LOW ] No CSRF Protection
|
|
134
|
+
๐ [LOW ] Response Timing Leak
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### ๐ PROXY (OpenAI Compatible)
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
# Start proxy to remote Ollama
|
|
141
|
+
./launcher.sh proxy --target 1.2.3.4:11434 --port 8080
|
|
142
|
+
|
|
143
|
+
# Use with OpenAI SDK:
|
|
144
|
+
# from openai import OpenAI
|
|
145
|
+
# client = OpenAI(base_url="http://127.0.0.1:8080/v1/", api_key="ollama")
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### ๐ฌ INTERACTIVE CHAT
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
# Chat with a remote model
|
|
152
|
+
./launcher.sh chat --target 1.2.3.4:11434
|
|
153
|
+
|
|
154
|
+
# Batch execute prompts from file
|
|
155
|
+
./launcher.sh chat --batch prompts.txt --target 1.2.3.4:11434
|
|
156
|
+
|
|
157
|
+
# Chat commands: /help, /models, /clear, /model N, /system, /temp, /raw, /info, /export
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### ๐ DEEP FINGERPRINT
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
# Fingerprint a single instance
|
|
164
|
+
./launcher.sh fingerprint --target 1.2.3.4:11434
|
|
165
|
+
|
|
166
|
+
# Fingerprint ALL found instances
|
|
167
|
+
./launcher.sh fingerprint --all
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Checks 18 endpoints including: `/api/tags`, `/api/version`, `/api/ps`, `/api/show`, `/api/blobs`, `/api/pull`, `/api/push`, `/api/create`, `/api/delete`, `/api/copy`, `/api/embed`, `/v1/models`, `/docs`, `/metrics`, `/debug`, `/health`, `/status`
|
|
171
|
+
|
|
172
|
+
### ๐ฆ MODEL OPERATIONS
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
# List models with details
|
|
176
|
+
./launcher.sh models --target 1.2.3.4:11434
|
|
177
|
+
|
|
178
|
+
# Pull model info/config
|
|
179
|
+
./launcher.sh models --pull 1.2.3.4:11434 llama3.2
|
|
180
|
+
|
|
181
|
+
# Deep analyze a model
|
|
182
|
+
./launcher.sh models --analyze 1.2.3.4:11434 llama3.2
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### ๐ EXPORT
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
./launcher.sh export --format html # Beautiful HTML report with geo & vuln stats
|
|
189
|
+
./launcher.sh export --format csv # CSV for analysis
|
|
190
|
+
./launcher.sh export --format json # Raw JSON
|
|
191
|
+
./launcher.sh export --format all # All formats
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### ๐ค AUTO-PWN (One Command)
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
# Scan โ Vuln Scan โ Geolocate โ Proxy โ Report
|
|
198
|
+
./launcher.sh autopwn --random 5000
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### ๐ก MONITOR DAEMON
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
# Continuous scanning (CLI only, no web)
|
|
205
|
+
./launcher.sh monitor --interval 3600 --random 5000 --notify --export html
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### โ๏ธ CONFIGURATION
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
./launcher.sh config --show # Show config
|
|
212
|
+
./launcher.sh config --telegram-token "BOT_TOKEN" # Telegram alerts
|
|
213
|
+
./launcher.sh config --telegram-chat "CHAT_ID"
|
|
214
|
+
./launcher.sh config --shodan-key "API_KEY"
|
|
215
|
+
./launcher.sh config --set scan_timeout 3 # Custom setting
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## ๐ SAMPLE OUTPUT
|
|
221
|
+
|
|
222
|
+
```
|
|
223
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
224
|
+
โ ๐ฆ EVIL-OLLAMA v3.0 โ
|
|
225
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
226
|
+
|
|
227
|
+
[12:30:01] [โถ STEP ] Step 1/4: Scanning 5000 random IPs...
|
|
228
|
+
[12:30:01] [๐ฏ INFO] Scanning 5000 hosts on port 11434 (concurrency: 1000)
|
|
229
|
+
[โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ] 45% | 2250/5000 | 850/s | Found: 12 | ETA: 3.2s
|
|
230
|
+
[12:30:07] [๐ฆ FOUND] 203.0.113.42:11434 | v0.1.32 | llama3.2, mistral, codellama
|
|
231
|
+
[12:30:07] [๐ฆ FOUND] 198.51.100.73:11434 | v0.3.0 | llama3.1, nomic-embed-text
|
|
232
|
+
[...]
|
|
233
|
+
|
|
234
|
+
[12:30:10] [โถ STEP ] Step 2/4: Geolocating...
|
|
235
|
+
[12:30:10] [๐ GEO ] 203.0.113.42 โ San Francisco, US | DigitalOcean
|
|
236
|
+
[12:30:11] [๐ GEO ] 198.51.100.73 โ London, UK | Hetzner
|
|
237
|
+
|
|
238
|
+
[12:30:11] [โถ STEP ] Step 3/4: Vulnerability scanning...
|
|
239
|
+
[12:30:11] [๐ด VULN] 203.0.113.42:11434
|
|
240
|
+
๐ [HIGH ] No Authentication Required
|
|
241
|
+
๐ [CRITICAL] Potential RCE via Crafted Model Import (CVE-2024-37032)
|
|
242
|
+
๐ [HIGH ] Unauthenticated Model Creation
|
|
243
|
+
|
|
244
|
+
[12:30:14] [โถ STEP ] Step 4/4: Generating report...
|
|
245
|
+
[12:30:14] [๐ OK ] HTML report saved: evilollama_report.html (45.2 KB)
|
|
246
|
+
|
|
247
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
248
|
+
โ ๐ AUTO-PWN COMPLETE โ
|
|
249
|
+
โ Instances found: 7 โ
|
|
250
|
+
โ Total models: 23 โ
|
|
251
|
+
โ Vulnerabilities: 12 โ
|
|
252
|
+
โ CVEs detected: 5 โ
|
|
253
|
+
โ Report: evilollama_report.html โ
|
|
254
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
255
|
+
|
|
256
|
+
[12:30:15] [๐ PROXY] Proxy โ 127.0.0.1:9090 โ 203.0.113.42:11434
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## ๐ก๏ธ CVE DATABASE
|
|
262
|
+
|
|
263
|
+
| CVE ID | Severity | CVSS | Description | Affected Versions |
|
|
264
|
+
|--------|----------|------|-------------|-------------------|
|
|
265
|
+
| CVE-2024-37032 | **CRITICAL** | 9.1 | RCE via crafted model file (path traversal) | < 0.1.47 |
|
|
266
|
+
| CVE-2024-39720 | **HIGH** | 7.5 | Prompt injection via crafted system prompt | < 0.1.34 |
|
|
267
|
+
| CVE-2024-39721 | **HIGH** | 7.5 | SSRF in model pulling mechanism | < 0.1.34 |
|
|
268
|
+
| CVE-2024-39722 | **HIGH** | 7.3 | Path traversal in API endpoints | < 0.1.34 |
|
|
269
|
+
| CVE-2025-23104 | **HIGH** | 8.2 | API authentication bypass in /api/pull | < 0.3.0 |
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## ๐ REQUIREMENTS
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
pip install aiohttp flask requests
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## โ ๏ธ LEGAL DISCLAIMER
|
|
282
|
+
|
|
283
|
+
```
|
|
284
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
285
|
+
โ โ
|
|
286
|
+
โ This tool is for AUTHORIZED SECURITY TESTING only. โ
|
|
287
|
+
โ โ
|
|
288
|
+
โ Only use on systems you own or have explicit written permission โ
|
|
289
|
+
โ to test. Unauthorized scanning or exploitation is ILLEGAL. โ
|
|
290
|
+
โ โ
|
|
291
|
+
โ The authors assume no liability for misuse. โ
|
|
292
|
+
โ โ
|
|
293
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
```
|
|
299
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
300
|
+
โ EVIL-OLLAMA v3.0 ยท https://github.com/evogix/Evil-Ollama โ
|
|
301
|
+
โ For authorized security research & bug bounty purposes only โ
|
|
302
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
303
|
+
```
|