# Ad environment constraints

> Ad environment constraints is an open-source agent skill for security. Active Directory hardening checks that stop auth and LDAP failures looking like bad. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/ADScanPro/Claude-AD/tree/main/skills/ad-environment-constraints
- **Repository:** https://github.com/adscanpro/claude-ad
- **GitHub stars:** 227
- **License:** MIT
- **Skill name:** ad-environment-constraints
- **Collection:** https://github.com/ADScanPro/Claude-AD
- **Categories:** [security](https://ai-powered.com/categories/security)
- **Listing updated:** 2026-12-02

## About

This skill is a reference for penetration testers and admins working against Windows Active Directory domains that have been hardened. It lists constraints such as NTLM being disabled, RC4 blocked on AES-only key distribution centers, LDAP signing and channel binding that require LDAPS on port 636, Kerberos clock skew limits, and SPNs that must use fully qualified domain names. It explains how each of these failures tends to appear as an ordinary logon error, so the agent can tell a hardening control apart from wrong credentials.

The guidance centers on fingerprinting the domain before authenticating: checking whether NTLM answers, whether RC4 is accepted, whether signing is required and whether LDAPS is listening. It then covers how to pick Kerberos or NTLM paths, how to handle protected accounts such as Protected Users, LAPS, gMSA and MachineAccountQuota, how to avoid silent truncation from the 1000-object LDAP page limit, and how to size timeouts for high-latency VPN links.

The examples use standard tooling such as netexec, impacket, certipy, bloodyAD and kerbrute. The skill is documentation only and includes no scripts; it expects the user to supply the target domain, credentials and network access.

## When your agent uses it

> Real-world Active Directory environment constraints that silently break attacks when ignored: NTLM disabled (Kerberos fallback), AES-only KDCs (RC4 blocked by GPO), LDAP signing and channel binding requiring LDAPS on 636, Kerberos clock skew (KRB_AP_ERR_SKEW), SPNs that must be FQDNs never short names or IPs (the misleading invalidCredentials), Protected Users / LAPS / gMSA / MachineAccountQuota, LDAP 1000-object paging, and VPN latency. Use this whenever a bind, TGT request, LDAP query, or SMB negotiation fails in a way that looks like bad credentials but is really hardening, or before running any AD tooling against a domain you have not fingerprinted. Standard-tooling knowledge (netexec, impacket, certipy, bloodyAD, kerbrute), no vendor-specific engine.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/ADScanPro/Claude-AD/tree/HEAD/skills/ad-environment-constraints)
- [License: MIT](https://github.com/ADScanPro/Claude-AD/tree/HEAD/skills/ad-environment-constraints)

## Features

- **NTLM disablement detection:** Explains how to tell a disabled NTLM setting from a plain wrong password and when to switch to Kerberos.
- **Kerberos SPN and FQDN rules:** Covers why short names and IP addresses break service tickets and how to target hosts by FQDN.
- **LDAP signing and LDAPS:** Describes channel binding, signing requirements and when to move from port 389 to LDAPS on 636.
- **Clock skew and encryption types:** Lists the five-minute Kerberos skew window and the handling of AES-only KDCs that reject RC4.
- **Protected account handling:** Outlines limits on Protected Users, LAPS, gMSA, AS-REP roasting and MachineAccountQuota checks.
- **Paging and VPN timeouts:** Covers the 1000-object LDAP page cap and sizing timeouts to high round-trip latency.

## Good for

- Diagnose why an NTLM bind fails against a hardened domain controller
- Switch an impacket or netexec run to Kerberos authentication with a TGT
- Plan LDAP queries that retrieve all users without silent truncation
- Set timeouts for an Active Directory assessment over a high-latency VPN
- Check whether MachineAccountQuota allows creating a machine account before an attack

## Install

### Claude Code

This skill ships in the `claude-ad` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add ADScanPro/Claude-AD
/plugin install claude-ad@claude-ad
```

Or copy only this skill to `~/.claude/skills/ad-environment-constraints`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ADScanPro/Claude-AD.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/ad-environment-constraints &&
cp -R "$tmp/skills/ad-environment-constraints" ~/.claude/skills/ad-environment-constraints &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/ad-environment-constraints` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/ad-environment-constraints` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ADScanPro/Claude-AD.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/ad-environment-constraints &&
cp -R "$tmp/skills/ad-environment-constraints" ~/.agents/skills/ad-environment-constraints &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/ad-environment-constraints` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/ad-environment-constraints` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ADScanPro/Claude-AD.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/ad-environment-constraints &&
cp -R "$tmp/skills/ad-environment-constraints" ~/.cursor/skills/ad-environment-constraints &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/ad-environment-constraints` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/ADScanPro/Claude-AD.git --path skills/ad-environment-constraints
```

Or copy the folder to `~/.gemini/skills/ad-environment-constraints` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/ad-environment-constraints`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ADScanPro/Claude-AD.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/ad-environment-constraints &&
cp -R "$tmp/skills/ad-environment-constraints" ~/.copilot/skills/ad-environment-constraints &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/ad-environment-constraints` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ADScanPro/Claude-AD.git
```

Then copy `Claude-AD/skills/ad-environment-constraints` into your agent's skills folder as `ad-environment-constraints`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does Ad environment constraints include scripts?

No, it has no scripts. It is a single SKILL.md file with guidance and example commands.

### Which tools does Ad environment constraints reference?

It refers to netexec, impacket, certipy, bloodyAD and kerbrute, described as standard tooling with no vendor-specific engine.

### How do I know if NTLM is disabled?

The skill says a failed bind with a wrong password on an NTLM-enabled DC returns invalidCredentials, so that alone does not prove NTLM is off. NTLM is disabled when SSP collapse markers such as STATUS_NTLM_BLOCKED appear or when a valid Kerberos TGT for the same identity succeeds while the bind fails.

### What license does Ad environment constraints use?

The repository is released under the MIT license.

### How do I install Ad environment constraints in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/ad-environment-constraints to use it in all your projects, or to .claude/skills/ad-environment-constraints in one project. Or install the claude-ad plugin, which includes it: /plugin marketplace add ADScanPro/Claude-AD, then /plugin install claude-ad@claude-ad.

### Does Ad environment constraints run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Ad environment constraints?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Ad environment constraints?

The closest alternatives to Ad environment constraints are Kerberos attacks, Ad methodology, Ad opsec telemetry, Acl abuse and System.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Kerberos attacks](https://ai-powered.com/skills/kerberos-attacks): Kerberos attacks is an open-source agent skill for security.
- [Ad methodology](https://ai-powered.com/skills/ad-methodology): Ad methodology is an open-source agent skill for security.
- [Ad opsec telemetry](https://ai-powered.com/skills/ad-opsec-telemetry): Ad opsec telemetry is an open-source agent skill for security.
- [Acl abuse](https://ai-powered.com/skills/acl-abuse): Acl abuse is an open-source agent skill for security.
- [System](https://ai-powered.com/skills/system): System is an open-source agent skill for security.
- [Coercion ntlm relay](https://ai-powered.com/skills/coercion-ntlm-relay): Coercion ntlm relay is an open-source agent skill for security.
- [Adcs attacks](https://ai-powered.com/skills/adcs-attacks): Adcs attacks is an open-source agent skill for security.
- [Compliance mapping](https://ai-powered.com/skills/compliance-mapping): Compliance mapping is an open-source agent skill for security.

---
Source: https://ai-powered.com/skills/ad-environment-constraints
