Cross-Tenant IOC Search¶
LimaCharlie indexes the indicators seen in an organization: domains, IP addresses, file hashes, file paths, file names, users, email addresses, services and packages. An IOC search answers one question from that index: which sensors have seen a given value, and when.
Each organization is a separate tenant with its own data. To search across tenants, you run the same search against every organization your credentials can reach. One login or one User API key covers all of them, so a hash, domain or IP address can be checked across a whole client base with one script.
This page covers the web app, the CLI, the Python SDK and the REST API, and ends with an automated monthly client report.
How it works¶
- Scope: an IOC search runs against one organization. A cross-tenant search is the same call repeated for each organization.
- History: searches cover the last 12 months. Every organization keeps 12 months of telemetry by default, and extended retention does not lengthen the IOC search window.
- Two answers:
summaryreturns hit counts in four time buckets (last_1_days,last_7_days,last_30_daysandlast_365_days).locationsreturns the sensors themselves, with sensor ID, hostname, first seen and last seen. - Batching: a batch search checks many indicators in one API request. Prefer one batch per organization over one request per indicator.
- Wildcards:
%matches anything, so10.10.%or%.example.comsearch for patterns. - Limits: exact-match searches, and patterns with a single leading or trailing
%, have no extra search limit. Other wildcard patterns are limited per organization. See API rate limits.
Indicator types¶
| Type | Matches |
|---|---|
domain |
DNS domain name |
ip |
IPv4 or IPv6 address |
file_hash |
File hash: MD5, SHA-1 or SHA-256 |
file_path |
Full file path |
file_name |
File name without the directory |
user |
User or account name |
email |
Email address |
service_name |
Service or daemon name |
package_name |
Installed package name |
Requirements¶
- Access to each organization you want to search, with the
insight.evt.getorinsight.evt.get.simplepermission. Organization Groups are the usual way to grant one team the same permissions across many client organizations. - For automation, a User API key. It carries your access across all your organizations, so store it like a password.
The examples below report the organizations they could not search, so a gap in coverage is visible.
Web app¶
The web app searches one organization at a time.
- Open the organization and open its search dialog.
- Enter the indicator in Search for sensors or indicators. Use
%as a wildcard, for example%gle.com. - Choose the Indicator type and the Time period.
- Click Search. The results list the sensors that saw the indicator.

To check many organizations at once, use the CLI, SDK or API.
CLI¶
Search one organization. The default answer is the summary:
Add --info locations to list the sensors, and --wildcards to search for a pattern:
limacharlie --oid YOUR_OID ioc search --type ip --value 203.0.113.50 --info locations
limacharlie --oid YOUR_OID ioc search --type ip --value '10.10.%' --info locations --wildcards
Search every organization you can access. auth list-orgs returns them, and the loop runs the search in each:
#!/bin/bash
# ./ioc_sweep.sh domain evil.example.com
TYPE="$1"; VALUE="$2"
limacharlie --output json auth list-orgs | jq -r '.[] | [.oid, .name] | @tsv' |
while IFS=$'\t' read -r OID NAME; do
limacharlie --oid "$OID" --output json ioc search --type "$TYPE" --value "$VALUE" --info locations |
jq -r --arg org "$NAME" 'to_entries[] | select(.value | type == "object" and has("sid"))
| [$org, (.value.hostname // ""), .value.sid, (.value.last_ts | todate)] | @tsv'
done
Acme Manufacturing ws-fin-0142 6a1f... 2026-11-18T22:55:23Z
Northwind Dental srv-web-01 c4d2... 2026-11-17T09:10:48Z
To check a list of indicators, put them in a file and use batch-search:
# iocs.yaml
domain:
- evil.example.com
- bad.example.org
ip:
- 203.0.113.50
file_hash:
- e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Python SDK¶
This script checks a list of indicators against every organization you can access, in parallel, with one batch search per organization.
#!/usr/bin/env python3
"""Check a list of indicators against every organization you can access.
Usage: python3 ioc_sweep.py iocs.yaml [name-filter]
"""
import json
import sys
from concurrent.futures import ThreadPoolExecutor
from datetime import datetime, timezone
import yaml
from limacharlie.client import Client
from limacharlie.sdk.insight import Insight
from limacharlie.sdk.organization import Organization
iocs = yaml.safe_load(open(sys.argv[1]))
name_filter = sys.argv[2] if len(sys.argv) > 2 else None
# Every organization this login can access: {"orgs": [oid, ...], "names": {oid: name}}
accessible = Organization(Client()).list_accessible_orgs(filter_text=name_filter)
def sweep(oid):
try:
org = Organization(Client(oid=oid))
return oid, Insight(org).batch_search(iocs, info="locations", limit=100), None
except Exception as e: # for example, no permission in this organization
return oid, None, str(e)
def iso(ts):
return datetime.fromtimestamp(ts, timezone.utc).isoformat()
hits, errors = [], []
with ThreadPoolExecutor(max_workers=8) as pool:
for oid, result, err in pool.map(sweep, accessible["orgs"]):
org_name = accessible["names"].get(oid, oid)
if err:
errors.append({"org": org_name, "oid": oid, "error": err})
continue
# Present only when some indicator types failed: {type: message}
for ioc_type, message in result.pop("errors", {}).items():
errors.append({"org": org_name, "oid": oid, "error": f"{ioc_type}: {message}"})
for ioc_type, values in result.items():
for value, found in values.items():
for loc in found.get("locations", []):
if "sid" not in loc: # seen in an external log source, not on a sensor
continue
hits.append({
"org": org_name, "oid": oid, "type": ioc_type, "indicator": value,
"hostname": loc.get("hostname") or "", "sid": loc["sid"],
"first_seen": iso(loc["first_ts"]), "last_seen": iso(loc["last_ts"]),
})
for h in sorted(hits, key=lambda h: (h["org"], h["indicator"], h["hostname"])):
print(f'{h["org"]:<28} {h["type"]:<10} {h["indicator"]:<40} {h["hostname"]:<28} last seen {h["last_seen"]}')
print(f'\n{len(hits)} hits across {len({h["oid"] for h in hits})} of {len(accessible["orgs"])} organizations; '
f'{len(errors)} errors')
json.dump({"hits": hits, "errors": errors}, open("sweep.json", "w"), indent=2)
The script uses the credentials the CLI is logged in with. To run it unattended, set the LC_UID and LC_API_KEY environment variables to a User API key.
REST API¶
Exchange a User API key for a JWT, list your organizations, then search each one.
# 1. Get a JWT for your user
JWT=$(curl -s -X POST "https://jwt.limacharlie.io" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "uid=YOUR_USER_ID&secret=YOUR_API_KEY" | jq -r .jwt)
# 2. List the organizations the key can access
curl -s "https://api.limacharlie.io/v1/user/orgs?fields=oid,name&limit=1000" \
-H "Authorization: Bearer $JWT"
# 3. Search one organization for one indicator
curl -s "https://api.limacharlie.io/v1/insight/YOUR_OID/objects/domain?name=evil.example.com&info=locations&case_sensitive=true&with_wildcards=false" \
-H "Authorization: Bearer $JWT"
# 4. Or search one organization for many indicators in one request
curl -s -X POST "https://api.limacharlie.io/v1/insight/YOUR_OID/objects" \
-H "Authorization: Bearer $JWT" \
--data-urlencode 'objects={"domain": ["evil.example.com"], "ip": ["203.0.113.50"]}' \
--data-urlencode 'case_sensitive=true' \
--data-urlencode 'info=locations'
The organization list is paged. If the response has has_more set, request the next page.
With info=locations, a batch response groups results by type and indicator:
{
"domain": {
"evil.example.com": {
"locations": [
{
"sid": "cda57e54-3ae8-4074-9c3c-3f8dc04d2f12",
"hostname": "ws-fin-0142",
"first_ts": 1795042229,
"last_ts": 1795042523
}
]
}
},
"ip": {
"203.0.113.50": {
"locations": []
}
}
}
If some indicator types could not be searched, the response also has a top-level errors key that maps each failed type to a message. A location can also be an external log source instead of a sensor; those entries have no sid.
If the JWT from a User API key is too large for the API gateway (HTTP 413), request a JWT per organization by adding oid=YOUR_OID to step 1.
Automated monthly client report¶
This script produces one Markdown report per client organization, listing which of the month's indicators were observed, on which hosts, and when. Run it from cron on the first of the month.
#!/usr/bin/env python3
"""Write one Markdown indicator report per organization you can access.
Usage: python3 ioc_monthly_report.py iocs.yaml reports/
cron: 0 6 1 * * cd /opt/lc-reports && python3 ioc_monthly_report.py iocs.yaml reports/
"""
import os
import re
import sys
from datetime import datetime, timedelta, timezone
import yaml
from limacharlie.client import Client
from limacharlie.sdk.insight import Insight
from limacharlie.sdk.organization import Organization
iocs = yaml.safe_load(open(sys.argv[1]))
out_dir = sys.argv[2]
os.makedirs(out_dir, exist_ok=True)
now = datetime.now(timezone.utc)
month = now.strftime("%Y-%m")
recent_after = (now - timedelta(days=30)).timestamp()
total = sum(len(v) for v in iocs.values())
accessible = Organization(Client()).list_accessible_orgs()
for oid in accessible["orgs"]:
name = accessible["names"].get(oid, oid)
try:
result = Insight(Organization(Client(oid=oid))).batch_search(iocs, info="locations", limit=100)
except Exception as e:
print(f"skipped {name}: {e}".splitlines()[0])
continue
for ioc_type, message in result.pop("errors", {}).items():
print(f"{name}: {ioc_type} not searched: {message}")
rows = []
for ioc_type, values in result.items():
for value, found in values.items():
sensors = [loc for loc in found.get("locations", []) if "sid" in loc]
if not sensors:
continue
hosts = ", ".join(sorted({loc.get("hostname") or loc["sid"] for loc in sensors}))
last = max(loc["last_ts"] for loc in sensors)
rows.append(f'| {ioc_type} | `{value}` | {len(sensors)} | {hosts} | '
f'{datetime.fromtimestamp(last, timezone.utc):%Y-%m-%d} | '
f'{"yes" if last >= recent_after else "no"} |')
lines = [f"# Indicator exposure report: {name}", "", f"Period: {month}. Indicators checked: {total}.", ""]
if rows:
lines += [f"**{len(rows)} of {total} indicators were observed in this environment.**", "",
"| Type | Indicator | Sensors | Hosts | Last seen | Seen in the last 30 days |",
"|---|---|---|---|---|---|", *rows]
else:
lines += [f"None of the {total} indicators were observed in this environment."]
slug = re.sub(r"[^A-Za-z0-9]+", "-", name).strip("-").lower()
open(os.path.join(out_dir, f"{slug}-{month}.md"), "w").write("\n".join(lines) + "\n")
Example output for one client:
# Indicator exposure report: Acme Manufacturing
Period: 2026-11. Indicators checked: 3.
**2 of 3 indicators were observed in this environment.**
| Type | Indicator | Sensors | Hosts | Last seen | Seen in the last 30 days |
|---|---|---|---|---|---|
| domain | `evil.example.com` | 1 | ws-fin-0142 | 2026-11-18 | yes |
| ip | `203.0.113.50` | 2 | srv-web-01, ws-ops-0058 | 2026-11-17 | yes |
Keep iocs.yaml in version control and update it from your threat intelligence sources each month. The same report can be sent to a ticketing system or attached to a case from the script.
Related searches¶
- Full event detail: an IOC search tells you which sensors saw an indicator. To see the events themselves, run an LCQL query in the Query Console.
- Indicators already attached to cases: the Cases cross-case entity search finds every case that contains an indicator.
- Detecting an indicator from now on: add it to a lookup and reference the lookup from a detection and response rule. A search covers the past; a rule covers what comes next.
Frequently asked questions¶
Can I search for an IOC across all my client organizations at once? Yes. Use the CLI loop, the Python script or the REST API on this page. They run the same IOC search in every organization your credentials can access and merge the results.
How far back does an IOC search go? 12 months. Extended retention does not lengthen the IOC search window.
Does a cross-tenant search mix client data? No. Each organization stays a separate tenant. The search runs inside each organization with your own permissions, and the results are combined on your side.
Which indicator types can I search for? Domains, IP addresses, file hashes, file paths, file names, users, email addresses, service names and package names.
Can I search for many indicators at once? Yes. A batch search checks a list of indicators in one request per organization.