Jay’s wife, Ann, was supposed to be out of town on business. It was a Tuesday evening in August 2013, and Jay, a 36-year-old IT manager, was at home in Indiana with their 5-year-old daughter and 9-year-old son when he made a jarring discovery. Their daughter had misplaced her iPad, so Jay used the app Find My iPhone to search for it. The app found the missing tablet right away, but it also located all the other devices on the family’s plan. What was Ann’s phone doing at a hotel five miles from their home?

His suspicions raised, Jay, who knew Ann’s passwords, read through her e-mails and Facebook messages. (Like others in this story, Jay asked that his and Ann’s names be changed.) He didn’t find anything incriminating, but neither could he imagine a good reason for Ann to be at that hotel. So Jay started using Find My iPhone for an altogether different purpose: to monitor his wife’s whereabouts.

Two nights later, when Ann said she was working late, Jay tracked her phone to the same spot. This time, he drove to the hotel, called her down to the parking lot, and demanded to know what was going on. Ann told him she was there posing for boudoir photos, with which she planned to surprise him for his upcoming birthday. She said the photographer was up in the room waiting for her.

Jay wanted to believe Ann. They’d been married for 12 years, and she had never given him cause to distrust her. So instead of demanding to meet the photographer or storming up to the room, Jay got in his car and drove home.

Still, something gnawed at him. According to Ann’s e-mails, the boudoir photo shoot had indeed taken place—but on the previous day, Wednesday. So her being at the hotel on Tuesday and again on Thursday didn’t make sense. Unless …

In an earlier era, a suspicious husband like Jay might have rifled through Ann’s pockets or hired a private investigator. But having stumbled upon Find My iPhone’s utility as a surveillance tool, Jay wondered what other apps might help him keep tabs on his wife. He didn’t have to look far. Spouses now have easy access to an array of sophisticated spy software that would give Edward Snowden night sweats: programs that record every keystroke; that compile detailed logs of our calls, texts, and video chats; that track a phone’s location in real time; that recover deleted messages from all manner of devices (without having to touch said devices); that turn phones into wiretapping equipment; and on and on.

Jay spent a few days researching surveillance tools before buying a program called Dr. Fone, which enabled him to remotely recover text messages from Ann’s phone. Late one night, he downloaded her texts onto his work laptop. He spent the next day reading through them at the office. Turns out, his wife had become involved with a co-worker. There were thousands of text messages between them, many X‑rated—an excruciatingly detailed record of Ann’s betrayal laid out on Jay’s computer screen. “I could literally watch her affair progress,” Jay told me, “and that in itself was painful.”

One might assume that the proliferation of such spyware would have a chilling effect on extramarital activities. Aspiring cheaters, however, need not despair: software developers are also rolling out ever stealthier technology to help people conceal their affairs. Married folk who enjoy a little side action can choose from such specialized tools as Vaulty Stocks, which hides photos and videos inside a virtual vault within one’s phone that’s disguised to look like a stock-market app, and Nosy Trap, which displays a fake iPhone home screen and takes a picture of anyone who tries to snoop on the phone. CATE (the Call and Text Eraser) hides texts and calls from certain contacts and boasts tricky features such as the ability to “quick clean” incriminating evidence by shaking your smartphone. CoverMe does much of the above, plus offers “military-grade encrypted phone calls.” And in the event of an emergency, there’s the nuclear option: apps that let users remotely wipe a phone completely clean, removing all traces of infidelity.

But every new app that promises to make playing around safer and easier just increases the appetite for a cleverer way to expose such deception. Some products even court both sides: a partner at CATE walked me through how a wife could install the app on her husband’s phone to create a secret record of calls and texts to be perused at her leisure. Which may be great from a market-demand standpoint, but is probably not so healthy for the broader culture, as an accelerating spiral of paranoia drives an arms race of infidelity-themed weapons aimed straight at the consumer’s heart.

Every tech trend has its early adopters. Justin, a 30-year-old computer programmer from Ohio, is at the vanguard of this one.

Justin first discovered CATE on the September 21, 2012, episode of Shark Tank, ABC’s venture-capital reality show. The Call and Text Eraser, pitched specifically as a “cheating app,” won $70,000 in seed money on the program. Justin knew he had to have it.

His girlfriend at the time—we’ll call her Scarlett—was “the jealous type,” forever poking through his smartphone and computer. Not that he could blame her, given that she’d already busted him once for having sex with another woman. “It took a lot of talking and a lot of promising that it wouldn’t happen again,” he told me over e-mail. (I found Justin through a user review of CATE.) “So her wanting to check up on me was understandable,” he allowed. “But at the same time, it was my business and if I wanted to share I would have.”

Even a not-so-jealous girlfriend might have taken exception to many of the messages on Justin’s phone: “casual texting” (that is, flirting) with other women, “hard core” (explicitly sexual) texting, texts arranging “hookups.” In the past, he’d been busted repeatedly for such communiqués. (Scarlett is not the only girlfriend with whom Justin has found monogamy to be a challenge.) With CATE, all Justin had to do was create a list of contacts he didn’t want Scarlett to know about, and any incriminating texts and phone calls with those contacts got channeled directly into a pass-code-protected vault.

CATE is just one of many tools Justin uses to, as he puts it, “stay one step ahead.” His go-to method for exchanging explicit photos is Snapchat, the popular app that causes pics and videos to self-destruct seconds after they are received. (Of course, as savvy users know, expired “snaps” aren’t really deleted, but merely hidden in the bowels of the recipient’s phone, so Justin periodically goes in and permanently scrubs them.) And for visuals so appealing that he cannot bear to see them vanish into the ether, he has Gallery Lock, which secretes pics and videos inside a private “gallery” within his phone.

Justin wound up cheating on Scarlett “several more times” before they finally broke up—a pattern he’s repeated with other girlfriends. Oh, sure, he enjoys the social and domestic comforts of a relationship (“It’s always nice to have someone to call your girl”). He understands the suffering that infidelity can cause (“I have been cheated on so I know how much it hurts”). He even feels guilty about playing around. But for him, the adrenaline kick is irresistible. “Not to mention,” he adds, “no woman is the same [and] there is always going to be someone out there who can do something sexually that you have never tried.” Then, of course, there’s “the thrill of never knowing if you are going to get caught.”

All of which makes it more than a little troubling that, while laboring to keep one semiserious girlfriend after another in the dark with privacy-enhancing apps, Justin has been equally aggressive about using spy apps to keep a virtual eye on said girlfriends.

Therapists say they’re seeing more spouses casually tracking each other, and lawyers are starting to recommend digital-privacy clauses for prenup and postnup agreements.

Justin has tried it all: keystroke loggers, phone trackers, software enabling him to “see text messages, pictures, and all the juicy stuff … even the folder to where your deleted stuff would go.” He figures he’s tried nearly every spy and cheater app on the market, and estimates that since 2007, he has “kept tabs,” serially, on at least half a dozen girlfriends. “The monitoring is really just for my peace of mind,” he says. Plus, if he catches a girlfriend straying, “it kind of balances it out and makes it fair.” That way, he explains, if she ever busts him, “I have proof she was cheating so therefore she would have no reason to be mad.”

Not that Justin is immune to the occasional flash of jealousy. More than once, he has gone out to confront a girlfriend whose phone revealed her to be somewhere other than where she’d claimed to be. One relationship ended with particularly dramatic flair: “The phone went to the location off of a country road in the middle of nowhere and there she was having sex in the backseat of the car with another man.” A fistfight ensued (with the guy, not the girlfriend), followed later by “breakup sex” (vice versa). One year on, Justin says, “I still don’t believe that she has figured out how I found out.”

Justin knows that many folks may find his playing both sides of the cheating-apps divide “twisted.” But, he reasons, “I am doing it for my safety to make sure I don’t get hurt. So doesn’t that make it right??”

Right or wrong, cheating apps tap into a potentially lucrative market: While the national infidelity rate is hard to pin down (because, well, people lie), reputable research puts the proportion of unfaithful spouses at about 15 percent of women and 20 percent of men—with the gender gap closing fast. And while the roots of infidelity remain more or less constant (the desire for novelty, attention, affirmation, a lover with tighter glutes … ), technology is radically altering how we enter into, conduct, and even define it. (The affairs in this piece all involved old-school, off-line sex, but there is a growing body of research on the devastation wrought by the proliferation of online-only betrayal.) Researchers regard the Internet as fertile ground for female infidelity in particular. “Men tend to cheat for physical reasons and women for emotional reasons,” says Katherine Hertlein, who studies the impact of technology on relationships as the director of the Marriage and Therapy Program at the University of Nevada at Las Vegas. “The Internet facilitates a lot of emotional disclosure and connections with someone else.”

At the same time, privacy has become a rare commodity. Forget the National Security Agency and Russian mobsters: in a recent survey conducted in the United Kingdom, 62 percent of men in relationships admitted to poking around in a current or ex-partner’s mobile phone. (Interestingly, among women, the proportion was only 34 percent. So much for the stereotype of straying guys versus prying gals.) On the flip side, according to the Pew Research Center’s Internet and American Life Project, 14 percent of adults have taken steps to hide their online activity from a family member or romantic partner. Therapists say they’re seeing more spouses casually tracking each other as well as more clashes over online spying, and lawyers are starting to recommend digital-privacy clauses for prenup and postnup agreements. Such clauses aim to prevent spouses from using personal texts, e‑mails, or photos against each other should they wind up in divorce court.

Tech developers by and large didn’t set out looking to get involved. As is so often the case with infidelity, it just sort of happened. Take Find My iPhone. Apple did not create the app with suspicious lovers in mind, but users pretty quickly realized its potential. Dr. Fone is marketed primarily as a way to recover lost data. Likewise, messaging apps such as Snapchat have many more uses than concealing naughty talk or naked photos, but the apps are a hit with cheaters.

The multipurpose nature and off-label use of many tools make it difficult to gauge the size of this vast and varied market. The company mSpy offers one of the top-rated programs for monitoring smartphones and computers; 2 million subscribers pay between $20 and $70 a month for the ability to do everything from review browsing history to listen in on phone calls to track a device’s whereabouts. Some 40 percent of customers are parents looking to monitor their kids, according to Andrew Lobanoff, the head of sales at mSpy, who says the company does basic consumer research to see who its customers are and what features they want added. Another 10 to 15 percent are small businesses monitoring employees’ use of company devices (another growing trend). The remaining 45 to 50 percent? They could be up to anything.

Apps marketed specifically as tools for privacy and secret-keeping* for the most part aren’t seeing the download numbers of a heavy hitter like, say, Grindr, the hookup app for gay men (10 million downloads and more than 5 million monthly users). But plenty have piqued consumer interest: The private-texting-and-calling app CoverMe has more than 2 million users. TigerText, which (among other features) causes messages to self-destruct after a set amount of time, has been downloaded 3.5 million times since its introduction in February 2010. (It hit the market a couple of months after the Tiger Woods sexting scandal, though the company maintains that the app is not named for Woods.)

Once the marketplace identifies a revenue stream, of course, the water has been chummed and everyone rushes in for a taste. By now, new offerings are constantly popping up from purveyors large and small. Ashley Madison, the online-dating giant for married people (company slogan: “Life is short. Have an affair.”), has a mobile app that provides some 30 million members “on the go” access to its services. Last year, the company introduced an add-on app called BlackBook, which allows users to purchase disposable phone numbers with which to conduct their illicit business. Calls and texts are placed through the app much as they are through Skype, explains the company’s chief operating officer, Rizwan Jiwan. “One of the leading ways people get caught in affairs is by their cellphone bill,” he observes. But with the disposable numbers, all calls are routed through a user’s Ashley Madison account, which appears on his or her credit-card statements under a series of business aliases. “The phone number isn’t tied to you in any way.”

Both sides of the arms race have ego invested in not getting outgunned. Stressing Ashley Madison’s obsession with customer privacy, Jiwan boasts that the shift from computers to mobile devices makes it harder for members to get busted. “It’s much more difficult to get spyware on phones,” he told me. But mSpy’s Lobanoff pushed back: “All applications can be monitored. Let me make it clear for you. If you provide us what application you would like to track, within two weeks we can develop a feature to do that.” It all boils down to demand. For instance, he notes, after receiving some 300 calls from customers looking to monitor Snapchat, the company rolled out just such a feature.

Lobanoff admits that iPhones are tougher to monitor than phones from other brands, because Apple is strict about what runs on its operating system (although many Apple users “jailbreak” their devices, removing such limits). Which raises the question: Is an iPhone a good investment for cheaters worried about being monitored—or would it too tightly restrict their access to cheating apps? Such are the complexities of modern infidelity.

Of course, no app can remove all risk of getting caught. Technology can, in fact, generate a false sense of security that leads people to push limits or get sloppy. Justin has had several close calls, using CATE to conceal indiscreet texts and voicemails but forgetting to hide explicit photos. When a girlfriend found a naked picture of him that he’d failed to delete after sexting another woman, Justin had to think fast. “The way I talk my way out of it is that I say I was going to send it to her.” Then, of course, there is the peril of creeping obsolescence: after several months, regular upgrades to the operating system on Justin’s phone outpaced CATE’s, and more and more private messages began to slip through the cracks. (A scan of user reviews suggests this is a common problem.)

Virtual surveillance has its risks as well. Stumbling across an incriminating e‑mail your partner left open is one thing; premeditated spying can land you in court—or worse. Sometime in 2008 or 2009, a Minnesota man named Danny Lee Hormann, suspecting his wife of infidelity, installed a GPS tracker on her car and allegedly downloaded spyware onto her phone and the family computer. His now-ex-wife, Michele Mathias (who denied having an affair), began wondering how her husband always knew what she was up to. In March 2010, Mathias had a mechanic search her car. The tracker was found. Mathias called the police, and Hormann spent a month in jail on stalking charges. (It’s worth noting that a second conviction, specifically for illegally tracking her car, was overturned on appeal when the judge ruled that joint ownership gave Hormann the right to install the GPS tracker.)

Staying on the right side of the law is trickier than one might imagine. There are a few absolute no-nos. At the top of the list: never install software on a device that you do not own without first obtaining the user’s consent. Software sellers are careful to shift the legal burden onto consumers. On its site, mSpy warns that misuse of the software “may result in severe monetary and criminal penalties.” Similarly, SpyBubble, which offers cellphone-tracking software, reminds its customers of their duty to “notify users of the device that they are being monitored.” Even so, questions of ownership and privacy get messy between married partners, and the landscape remains in flux as courts struggle to apply old laws to new technology.

In 2010, a Texas man named Larry Bagley was acquitted of charges that he violated federal wiretapping laws by installing audio-recording devices around his house and keystroke-monitoring software on his then-wife’s computer. In his ruling, the district judge pointed to a split opinion among U.S. circuit courts as to whether the federal law applies to “interspousal wiretaps.” (The Fourth, Sixth, Eighth, Tenth, and Eleventh Circuit Courts said it does, he noted; the Second and Fifth said it doesn’t.) Similarly, in California, Virginia, Texas, Minnesota, and as of this summer New York, it is a misdemeanor to install a GPS tracker on someone’s vehicle without their consent. But when a vehicle is jointly owned, things get fuzzy.

“I always tell people two things: (1) do it legally, and (2) do it right,” says John Paul Lucich, a computer-forensics expert and the author of Cyber Lies, a do-it-yourself guide for spouses looking to become virtual sleuths. Lucich has worked his share of ugly divorces, and he stresses that even the most damning digital evidence of infidelity will prove worthless in court—and potentially land you in trouble—if improperly gathered. His blanket advice: Get a really good lawyer. Stat.

Such apps clearly have the potential to blow up relationships, but the question now may be whether they can be used to salvage them as well. Many of the betrayed partners I spoke with believe they can.

A couple of years ago, Ginger discovered that her husband, Tim, was having an affair with a woman he’d met through a nonprofit on whose board he sat. (As Ginger tells it, this was a classic case of a middle-aged man having his head turned by a much younger woman.) The affair lasted less than a year, but it took another eight months before Tim’s lover stopped sending him gifts and showing up in awkward places (even church!).

Ginger and Tim decided to tough it out—they’ve been married for 35 years and have two adult children—but that took some doing. For the first year and a half, certain things Tim did or said would trigger Ginger’s anxiety. He would announce that he was going to the store; Ginger would fire up her tracking software to ensure he did just that. Business travel called for even more elaborate reassurances. “When he was away, I would be like, ‘I want you to FaceTime the whole room—the bathroom, the closet; open the hallway door.’ ”

Ginger’s anxiety has dimmed, but not vanished. She still occasionally uses Find My iPhone to make sure Tim is, in fact, staying late at the office. “And we use FaceTime all the time. He knows that if I try to FaceTime him, he’d better answer right then or have a very, very good reason why he didn’t.”

Jay and Ann, of the boudoir photo shoot, also decided to try to repair their marriage. When he first confronted her with a record of her texts, Ann denied that the sex talk was ever more than fantasy. But when Jay scheduled a polygraph, she confessed to a full-blown, physical affair.

As hard as it has been for Jay, one year later he reports that tech tools are helping. Ann’s affair grew out of her sense of neglect, Jay told me: “She wasn’t getting the attention she wanted from me, so she found someone else to give it to her.” To strengthen their bond, Jay and Ann have started using Couple, a relationship app geared toward promoting intimacy by setting up a private line of communication for texts, pics, video clips, and, of course, updates on each person’s whereabouts. Every now and again, Jay sneaks a peek at Find My iPhone. He also has set his iPad to receive copies of Ann’s texts. “I don’t know if she realizes I’m doing that,” he told me. But in general, she understands his desire for extra oversight. “She’s like, ‘Whatever you want.’ ”

In fact, post-affair surveillance seems to be an increasingly popular counseling prescription. Even as marriage and family therapists take a dim view of unprovoked snooping, once the scent of infidelity is in the air, many become enthusiastically pro-snooping—initially to help uncover the truth about a partner’s behavior but then to help couples reconcile by reestablishing accountability and trust. The psychotherapist and syndicated columnist Barton Goldsmith says he often advocates virtual monitoring in the aftermath of an affair. Even if a spouse never exercises the option of checking up, having it makes him or her feel more secure. “It’s like a digital leash.”

And that can be a powerful deterrent, says Frank, whose wife of 37 years learned of his fondness for hookers last February, after he forgot to close an e‑mail exchange with an escort. “He had set up a Gmail account I had no idea he had,” Carol, his wife, told me. Frank tried to convince her that the e-mails were just spam, even after she pointed out that the exchange included his cell number and photos of him.

Frank agreed to marriage counseling and enrolled in a 12-step program for sexual addiction. Carol now tracks his phone and regularly checks messages on both his phone and his computer. Still, she told me sadly, “I don’t think that I’m ever going to get the whole story. I believe he thinks that if I know everything, the marriage will come to an end.”

For his part, Frank—who comes across as a gruff, traditional sort of guy, uneasy sharing his feelings even with his wife—calls Carol’s discovery of his betrayal “excruciating,” but he mostly seems angry at the oversexed culture that he feels landed him in this mess. He grumbles about how “the ease and the accessibility and the anonymity of the Internet” made it “entirely too easy” for him to feed his addiction.

Frank has clearly absorbed some of the language and lessons of therapy. “As well as it is a learned behavior to act out, it is a learned behavior not to,” he told me. He doesn’t much like his wife’s having total access to his phone, but he claims that his sole concern is for the privacy of others in his 12-step group, who text one another for support. Frank himself clearly feels the tug of his digital leash. “Now that she checks my phone and computer, I have a deterrent.”

Even as he calls virtual surveillance “a powerful tool,” though, Frank also declares it a limited one. No matter how clever the technology becomes, there will always be work-arounds. For someone looking to stray, “absolutely nothing is going to stop it,” says Frank, emphatically. “Nothing.”

* The original version of this article stated incorrectly that TigerText and CoverMe market themselves as tools for cheaters and jealous spouses.