mirror of
https://github.com/SHOGGOTH-SECTOR/sica-fondt.git
synced 2026-08-01 08:30:20 +00:00
Place useful parts of the surrounding repos into sica-fondt by layer, per the
body model (Ada = membrane; brain/endocrine/capabilities/knowledge non-Ada):
- brain/ LLM reasoning + providers (dapr, hermes, MoMoA)
- capabilities/ REPRAG sidecars: hermes tools/skills, dapr tools, parallel
dispatch, A51 channels, and the OSINT cluster
- knowledge/ LORAG corpus: 754 cyber-skills, agency personas, secure-coding,
MITRE ATT&CK data
- reference/ defensive threat-reference (C3, shhbruh doc) + AdaYaml parser
License handling: AGPL sources (worldosint, advanced_evolution, mercury,
Reticulum) and GPL DeTTECT are SPEC-only clean-room/port descriptions — no
copyleft code copied. MIT/Apache/data parts copied as working trees.
Safety: shhbruh escape/persistence material and C3 covert-C2 kept as reference
only, not wired into the running organism. See CONSOLIDATION.md.
https://claude.ai/code/session_01UehUqEXXJJCsHoA4voCU5c
85 lines
1.8 KiB
Markdown
85 lines
1.8 KiB
Markdown
# API Reference: Automating IOC Enrichment
|
|
|
|
## VirusTotal API v3
|
|
|
|
### IP Lookup
|
|
|
|
```python
|
|
import requests
|
|
resp = requests.get(
|
|
"https://www.virustotal.com/api/v3/ip_addresses/1.2.3.4",
|
|
headers={"x-apikey": VT_KEY},
|
|
)
|
|
stats = resp.json()["data"]["attributes"]["last_analysis_stats"]
|
|
print(stats["malicious"], "/", sum(stats.values()))
|
|
```
|
|
|
|
### File Hash Lookup
|
|
|
|
```python
|
|
resp = requests.get(
|
|
f"https://www.virustotal.com/api/v3/files/{sha256}",
|
|
headers={"x-apikey": VT_KEY},
|
|
)
|
|
```
|
|
|
|
### Domain Lookup
|
|
|
|
```python
|
|
resp = requests.get(
|
|
f"https://www.virustotal.com/api/v3/domains/{domain}",
|
|
headers={"x-apikey": VT_KEY},
|
|
)
|
|
```
|
|
|
|
## AbuseIPDB API v2
|
|
|
|
```python
|
|
resp = requests.get(
|
|
"https://api.abuseipdb.com/api/v2/check",
|
|
headers={"Key": ABUSE_KEY, "Accept": "application/json"},
|
|
params={"ipAddress": "1.2.3.4", "maxAgeInDays": 90},
|
|
)
|
|
data = resp.json()["data"]
|
|
print("Confidence:", data["abuseConfidenceScore"])
|
|
print("Reports:", data["totalReports"])
|
|
```
|
|
|
|
## Shodan API
|
|
|
|
```python
|
|
import shodan
|
|
api = shodan.Shodan(SHODAN_KEY)
|
|
info = api.host("1.2.3.4")
|
|
print("Ports:", info.get("ports"))
|
|
print("Vulns:", info.get("vulns"))
|
|
```
|
|
|
|
## STIX 2.1 Export
|
|
|
|
```python
|
|
from stix2 import Indicator, Bundle
|
|
indicator = Indicator(
|
|
pattern="[ipv4-addr:value = '1.2.3.4']",
|
|
pattern_type="stix",
|
|
valid_from="2025-01-01T00:00:00Z",
|
|
confidence=85,
|
|
)
|
|
bundle = Bundle(objects=[indicator])
|
|
```
|
|
|
|
## Rate Limits
|
|
|
|
| API | Free Tier | Enterprise |
|
|
|-----|-----------|------------|
|
|
| VirusTotal | 4 req/min | 500 req/min |
|
|
| AbuseIPDB | 1000 req/day | 5000 req/day |
|
|
| Shodan | 1 req/sec | 10 req/sec |
|
|
|
|
### References
|
|
|
|
- VirusTotal API: https://docs.virustotal.com/reference/overview
|
|
- AbuseIPDB API: https://docs.abuseipdb.com/
|
|
- stix2 library: https://pypi.org/project/stix2/
|
|
- Shodan: https://shodan.readthedocs.io/
|