> ## Documentation Index
> Fetch the complete documentation index at: https://docs.infrawatch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Example rules

> Copyable detections for common internet-exposure patterns

These examples compile against the current `infrawatch` module. Copy one,
change the condition, then choose its classification, categories, and tags in
the rule editor.

## Redis without authentication

```yara theme={null}
import "infrawatch"

rule Exposed_Redis_Without_Authentication {
  meta:
    description = "Redis accepted a probe without requiring authentication"

  condition:
    defined infrawatch.scan.redis.authentication_required and
    infrawatch.scan.port == 6379 and
    not infrawatch.scan.redis.authentication_required
}
```

Suggested category: `exposure`

## Anonymous MQTT system topics

```yara theme={null}
import "infrawatch"

rule Anonymous_MQTT_System_Topics {
  meta:
    description = "MQTT accepted an anonymous connection and exposed system topics"

  condition:
    defined infrawatch.scan.mqtt.anonymous_connect_allowed and
    infrawatch.scan.mqtt.anonymous_connect_allowed and
    infrawatch.scan.mqtt.sys_subscribe_allowed
}
```

Suggested category: `exposure`

## Public HTTP administration surface

```yara theme={null}
import "infrawatch"

rule Public_HTTP_Admin_Panel {
  meta:
    description = "A successful HTTP response identifies an administration surface"

  condition:
    defined infrawatch.scan.http.response.status_code and
    infrawatch.scan.http.response.status_code == 200 and
    infrawatch.scan.http.response.body.html.title icontains "admin"
}
```

Suggested category: `exposure/admin-panel`

<Warning>
  A title alone is a weak signal. Add a favicon, body hash, header, certificate,
  or product-specific field before classifying a production match as malicious.
</Warning>

<CardGroup cols={2}>
  <Card title="Write a rule" icon="https://mintcdn.com/infrawatch/gCEz_Bv1hOrMPG8n/images/products/rules.svg?fit=max&auto=format&n=gCEz_Bv1hOrMPG8n&q=85&s=7e3cb3f0ad32cc0e44ddfc18a2bba0e8" href="/scanning/rules/writing-rules" width="32" height="32" data-path="images/products/rules.svg">
    Understand source, metadata, categories, and classifications.
  </Card>

  <Card title="Protocol fields" icon="https://mintcdn.com/infrawatch/gCEz_Bv1hOrMPG8n/images/products/network.svg?fit=max&auto=format&n=gCEz_Bv1hOrMPG8n&q=85&s=64774b6cf0ea24fc10c96f6c5df99b8b" href="/scanning/rules/protocols" width="32" height="32" data-path="images/products/network.svg">
    Browse typed HTTP, TLS, Redis, MQTT, SSH, and other protocol results.
  </Card>
</CardGroup>
