The Kodi box pitch is hard to resist. A little black plastic square, in look not much different from a Roku or Apple TV, and similar in function as well. This streamer, though, offers something those others never will: Free access to practically any show or movie you can dream of. No rental fees. No subscriptions. Just type in the name of a blockbuster, and start watching a high-definition stream in seconds.

For years, piracy persisted mainly in the realm of torrents, with sites like The Pirate Bay and Demonoid connecting internet denizens to premium content gratis. But a confluence of factors have sent torrent usage plummeting from 23 percent of all North American daily internet traffic in 2011 to under 5 percent last year. Legal crackdowns shuttered prominent torrent sites. Paid alternatives like Netflix and Hulu made it easier just to pay up. And then there were the "fully loaded" Kodi boxes—otherwise vanilla streaming devices that come with, or make easily accessible, so-called addons that seek out unlicensed content—that deliver pirated movies and TV shows with push-button ease.

"Kodi and the plugin system and the people who made these plugins have just dumbed down the process," says Dan Deeth, spokesperson for network-equipment company Sandvine. "It's easy for anyone to use. It's kind of set it and forget it. Like the Ron Popeil turkey roaster."

Kodi itself is just a media player; the majority of addons aren't piracy focused, and lots of Kodi devices without illicit software plug-ins are utterly uncontroversial. Still, that Kodi has swallowed piracy may not surprise some of you; a full six percent of North American households have a Kodi device configured to access unlicensed content, according to a recent Sandvine study. But the story of how a popular, open-source media player called XBMC became a pirate's paradise might. And with a legal crackdown looming, the Kodi ecosystem's present may matter less than its uncertain future.

In the beginning, there was Xbox Media Center, and it was great. Despite the name, XBMC wasn't born out of a Microsoft development team. It began as a homebrew project (for the first year, called Xbox Media Player), an open-source attempt at building a better media client for Xbox consoles.

XBMC acquired a loyal fan base, its development guided by the nonprofit XBMC Foundation. The tent wasn't quite big enough, though, to accommodate all of the competing visions for what XBMC could become. Fissures inevitably appeared. (Popular media player Plex, for instance, is an XBMC fork.)

It wasn't until 2012, though, that the conflict over addons splintered XBMC for good.

"We saw these piracy addons starting to take off, and we realized they were very simple to use," says Nathan Betzen, XBMC/Kodi Foundation President. "It looks so easy to use these things that we wanted no part of it. We're a nonprofit software development group. We're pretty happy not getting sued. So we banned them from our forum."

Rather than give up their work, or submit to what they saw as XBMC's onerous guidelines, a group of XBMC developers instead formed XBMC Hub, a place where people were free to tinker on whatever addons they liked without worry of restrictions or reprisal. And for all the focus on piracy, the majority of addons facilitate perfectly legal features, from interface tweaks to Dropbox integration to music streaming.

'It's easy for anyone to use. It's kind of set it and forget it. Like the Ron Popeil turkey roaster.' Dan Deeth, Sandvine

While XBMC Hub managed to draw interest from a wide range of developers, infringing addons found a home there as well. In 2014, to distance itself even further from the offshoot, the original XBMC rebranded itself as Kodi. XBMC Hub changed its name as well, to TV Addons. And then came the boxes.

Like any open-source ecosystem, Kodi contains multitudes. There's the Kodi media player itself. There's TV Addons and other developer communities. There are the plugins that scrape the internet for pirated material. There are the uploaders, the people who host the latest episode of, say, Game of Thrones on Google Drive or wherever. And there are the devices, which can be streaming boxes, Android tablets, and so on.