(CNN)From his hideout in the mountains of Northwest Mexico, Joaquin "El Chapo" Guzman took pleasure in secretly listening in on the conversations of his wife, mistress and cartel associates, thanks to spyware the cartel leader had installed on their cell phones by an IT technician.
Meet the IT guy who led authorities to El Chapo's secrets
That technician is Christian Rodriguez, a 32-year-old Colombian who dropped out of college to start his own cybersecurity company and ended up working helping drug cartel members secure their communications.
Rodriguez is a cooperating witness who is living in the United States, and prosecutors have asked that his face not be drawn or shown as he testifies against his former client. The two locked eyes as he began his testimony, and Rodriguez appeared nervous during questioning.
A frightened Rodriguez first met Guzman in 2008, at a meeting in the mountains where the Sinaloa Cartel leader had been hiding from authorities after his laundry-cart escape from a Mexican prison years earlier. Rodriguez described being taken to a clandestine airstrip to be flown to the meeting, and says he was met on the ground by "armed military." Rodriguez's work initially involved creating an office-like phone extension system for Sinaloa Cartel associates that would allow their conversations to be encrypted, or unable to be intercepted by authorities. Guzman, who did not enjoy working on computers, was pleased with the ability to have protected phone conversations.
At their next meeting, Guzman asked Rodriguez if he could install "spyware" to monitor the activities of certain devices. Rodriguez installed a program called FlexiSPY, which allowed Guzman to access text messages, emails, phone calls and GPS locations of phones that had it installed. Rodriguez was told to install the software on brand new phones which would be given to people Guzman chose. In all, Guzman was tracking 50 phones.
"It was like his toy," Rodriguez said. "He liked it very much."
Then Guzman wanted more: the ability to remotely turn on a phone's microphone so he could hear conversations happening around it.
He would call up someone, have a conversation with them and then hang up and open up their microphone "to hear what they would say about him," Rodriguez said.
Guzman called the devices that had spyware installed on them "special," and could transform phones and even computers. Sometimes, it would only take Rodriguez a few minutes to transform a device into a spying tool for the cartel leader.
While Guzman had the spyware installed on others' phones, he didn't know that Rodriguez would eventually end up cooperating with the US government, giving authorities access to conversations involving the cartel leader.
Authorities had another cooperating witness lure Rodriguez into a meeting in New York City under the guise of buying his encrypted communication services to evade law enforcement. Rodriguez was recorded at the 2010 meeting, and eventually agreed to work with the FBI, whose investigators realized they would not be able to see what Sinaloa associates were saying without "insider access."
Once Rodriguez gave the FBI access, they were able to access conversations Guzman had with everyone from cartel associates to his wife, Emma Coronel.
A spokesperson for FlexiSPY said the company had not been directly involved in Guzman's case but that the company generally assists law enforcement with their inquiries.
"If FlexiSPY was instrumental in uncovering illegal activities or bringing criminals to justice then of course we are delighted that our product was able to help," the spokesperson said in a statement to CNN.
Guzman and his wife spent much of their time apart as he evaded authorities, and he would check in on her and their twin daughters, born in California in 2011. Coronel would call Guzman "Don Joaquin" or "Mr. Joaquin" and "Daddy." He would call her "darling." She suggests, in one conversation, that "maybe it's best for Mommy to make (her enchiladas) for you. After all, it was her enchiladas that made you fall in love with her."
When their girls were about six months old, he remarked how one was "fearless."
"I'm going to give her an AK-47 so she can hang with me," Guzman said of one of the girls.
Guzman refers to his twin girls, nicknamed Mali and Kiki, as "little queens" in the texts, and advises Coronel to "register the babies under a different name" to be able to put a new house under their name.
With Coronel on her own much of the time, she lamented the difficulty of being "a single mother" and expressed concerns over her husband's safety. Her fears were warranted.
One day in February 2012, BlackBerry messages show Guzman checking in with Coronel to make sure she is safe. She tells him about one suspicious car, which Guzman says is a government vehicle. He advises her, "you go ahead and lead a normal life ... they just want to see if you come to where I am."
He later asks her if she has a gun and she tells him she has one of his. "Put it in the hidden compartment, darling," he tells her.
One February 22, 2012, hours go by between the couple's messages.
Suddenly, Guzman texts Coronel, "All is well, love. I'll get back to you later. I'm on the road."
The Los Cabos home he had been hiding in was raided. Three of his associates were arrested, and several of his phones and notebooks with information about the secret communication system were seized by US authorities.
"I saw them pounding on the door next door and I was able to jump out," Guzman messaged his wife.
El Chapo was able to evade US authorities during that raid, and later asks Coronel to buy him pants, underwear, shoes and mustache dye.
But while Guzman was messaging his "darling" Coronel, he was also sending romantic messages to a female associate named Agustina Cabanillas Acosta.
"You are the most important person to me, my love," Guzman messaged her.
CNN contacted a representative for Coronel who had "no comment" about allegations of Guzman's infidelity.
In messages Acosta sent to another person, she describes Guzman's spying habit, saying "I caught him yesterday looking at a whole bunch of pictures like coming from security cameras" and said he quickly closed the windows he'd been looking at when she walked in.
The intercepted messages gave authorities a look into more than just Guzman's complicated love life.
At one point in a conversation with Coronel, she hands her phone to her father and Guzman advises him to only use the BlackBerry for communications, saying "working with radios is dangerous because Border Patrol is listening."
He advises Coronel's father that if he is using a radio before taking a trafficking flight, "don't even send one kilo, otherwise everything will drop."
Guzman, whose screen name in the encrypted system is simply "J," freely messages about drug trafficking, asks Acosta to find someone who would be "willing to go fishing" -- to meet a cartel ship filled with drugs hundreds of miles off the coast of the US, and bring the drugs back in on a fishing boat.
Guzman even explicitly names the drugs he is accused of trafficking in some texts. At one point Acosta asks Guzman if he wants "the big ones" or "the small ones," a veiled question referencing marijuana versus cocaine, which comes in smaller packages.
Guzman answers, unguarded.