Modularity is a means of partitioning technical knowledge about a product or process. When state-sanctioned intellectual property (IP) rights are ineffective or costly to enforce, modularity can be used to hide information and thus protect IP. We investigate the impact of modularity on IP protection by formally modeling the threat of expropriation by agents. The principal has three options to address this threat: trust, licensing, and paying agents to stay loyal. We show how the principal can influence the value of these options by modularizing the system and by hiring clans of agents, thus exploiting relationships among them. Extensions address screening and signaling in hiring, the effects of an imperfect legal system, and social norms of fairness. We illustrate our arguments with examples from practice