singtreb/sword-riding/pentesting-freeipa
Claude Code and agent skill by singtreb/sword-riding
- community
Checking that the SKILL.md file is still in the repository.
Enumerating and attacking FreeIPA domains during authorized engagements — anonymous and authenticated LDAP
Install
npx vskill@latest install singtreb/sword-riding/pentesting-freeipaSKILL.md
The same SKILL.md was published earlier as xalgord/xalgorix/pentesting-freeipa.
Pentesting FreeIPA
When to Use
- During authorized engagements against Unix/Linux environments that use FreeIPA for centralized identity
- When
/etc/krb5.conf,/etc/ipa/default.conf, or/etc/krb5.keytabare present on a compromised host (FreeIPA-joined) - After capturing a CCACHE ticket from
/tmp, the keyring, or a keytab file - When you need an AD-BloodHound-style attack graph for a Unix domain
- For HBAC/sudo-rule and role/privilege misconfiguration review
Critical: Techniques Most Often Missed
FreeIPA looks like "just LDAP + Kerberos," so testers under-enumerate. The richest paths are in HBAC rules, delegation attributes, and ticket reuse.
- Anonymous LDAP bind leaks the whole directory. FreeIPA allows anonymous binds by default.
- How to CONFIRM:
ldapsearch -x -h <ipa-server> -b "dc=domain,dc=local"returns users/groups/hosts without credentials. - CCACHE ticket reuse = passwordless auth. Tickets in
/tmp(mode 600) or the keyring can be exported and reused. - How to CONFIRM:
KRB5CCNAME=/tmp/krb5cc_1000 klistshows a valid TGT; subsequentipa user-findsucceeds with no password. - Keytab files yield TGTs without a password.
/etc/krb5.keytabor service keytabs let youkinit -kt. - How to CONFIRM:
klist -kt /etc/krb5.keytablists principals;kinit -kt /etc/krb5.keytab host/$(hostname)gets a TGT. - HBAC CanSSH + CanSUDO to a DC is full domain compromise. A sudo rule with
!authenticateon the IPA server lets you readid2entry.db. - How to CONFIRM:
ipa sudorule-show <rule> --allshowsipaSudoOpt: !authenticateand a host = the IPA server. - Delegation attributes expose takeover paths.
ipaAllowedToPerform;write_keys(ForceChangePassword),write_delegation(RBCD),IPAKrbOkToAuthAsDelegate. - How to CONFIRM: IPAHound surfaces
ReadKerberosKey/ForceChangePassword/AddRBCDedges from these attributes. - `root` IPA user == AD Domain Admin; IPA server root reads all hashes.
dbscanon the server dumpsuserPassword/ipaNTHash. - How to CONFIRM: as root on the IPA server,
dbscanover the directory DB returns base64 password hashes.
Workflow
Step 1: Fingerprint the FreeIPA Environment
Step 2: Unauthenticated LDAP Enumeration
Step 3: Authenticate, Then Enumerate with ipa / LDAP (GSSAPI)
Step 4: Analyze HBAC, Sudo Rules, Roles & Privileges
Step 5: Harvest & Reuse Kerberos Credentials
Step 6: Build an Attack Graph (IPAHound) & Find Delegation Paths
Step 7: PKINIT / S4U2proxy Delegation Takeover (owned computer/service)
Key Concepts
| Concept | Description | |
|---|---|---|
| FreeIPA | Open-source AD alternative: LDAP directory + MIT Kerberos KDC + Dogtag CA, SSSD-integrated | |
| CCACHE | Binary Kerberos credential cache (in /tmp mode 600 or the keyring); reusable via KRB5CCNAME | |
| Keytab | File of principals + encrypted keys; yields a TGT with kinit -kt, no password | |
| HBAC rule | Host-Based Access Control — defines which users/hosts may reach which services (e.g. sshd) | |
| Sudo rule | Centralized sudo policy; ipaSudoOpt=!authenticate enables passwordless escalation | |
| ipaNTHash / userPassword | Base64 password material in LDAP; crackable (ipaNTHash easiest, then SSHA512, PBKDF2_SHA256) | |
| PKINIT | Certificate-based Kerberos pre-auth; abused by writing a cert into an owned object |
Tools & Systems
| Tool | Purpose | |
|---|---|---|
| ipa | Native domain enumeration/management CLI (user-find, sudorule-show, etc.) | |
| ldapsearch | Anonymous (-x) and authenticated (-Y gssapi) directory enumeration | |
| kinit / klist / kvno | Obtain, inspect, and request Kerberos tickets and service tickets | |
| Tickey | Extracts Kerberos tickets from the Linux keyring | |
| dbscan | Dumps LDAP DB on the IPA server to extract password hashes (requires root there) | |
| IPAHound / IPAHound-GUI | BloodHound-style FreeIPA attack-path graphing into Neo4j | |
| LinikatzV2 / linikatz | Extract IPA/SSSD credentials and tickets from a compromised host |
Common Scenarios
Scenario 1: Anonymous enumeration to spray list
Anonymous ldapsearch -x dumps all uid values. IPAHound's PasswordAuthAllow=True query trims this to a focused spray list, recovering a low-priv account.
Scenario 2: Keytab reuse for lateral movement
A web app host holds /etc/krb5.keytab. kinit -kt produces a host TGT; combined with a CanSSH HBAC edge, the tester moves to another host without any password.
Scenario 3: Sudo rule with !authenticate on the IPA server
ipa sudorule-show reveals a rule granting a service account !authenticate root on the IPA server. SSHing there and copying id2entry.db exposes every domain hash.
Scenario 4: Service delegation to LDAP admin
An owned computer account owns its service principal. Writing a cert (PKINIT) and abusing an AllowedToDelegate path via S4U2proxy impersonates admin to LDAP, achieving domain compromise.
Output Format
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinginternal/tools/skills/data/linux-hardening/pentesting-freeipa/SKILL.md
Popularity
- Repository stars
- 3
- 7-day trend score
- 7
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/singtreb/sword-riding/pentesting-freeipa)