A man holds up a sign in memory of U.S. journalist James Foley during a protest against the Assad regime in Syria in Times Square in New York August 22, 2014. Reuters/ Carlo Allegri

The deaths of Islamic State group, or ISIS, hostages James Foley, Steven Sotloff, David Cawthorne Haines and Alan Henning were gruesome, shocking and very public, the video footage of their beheadings in the desert widely distributed by their captors. But the world has known little, if anything, about the months and years of captivity leading up to those final moments.

It was hell.

As recounted in a vivid New York Times report, drawn in part from interviews with former cellmates, Foley and fellow victims endured periods of living in near total darkness, rations that amounted to a "teacup" of food per day, and, of course, torture. Foley, one of at least 23 hostages from 12 Western countries, had it worst of all. "In addition to receiving prolonged beatings, he underwent mock executions and was repeatedly waterboarded," writes the Times' Rukmini Callimachi, who in July traced how ransoms paid for European hostages have bankrolled al Qaeda's operations.

This latest story sheds yet more light on the financing tactics of the Islamic State, which did not exist as a group the day in November 2012 when Foley and British photojournalist John Cantlie were kidnapped, and which today the Obama administration considers to be "probably the best-funded terrorist organization we have confronted.” Last week, David Cohen, the Treasury Department's under secretary for terrorism and financial intelligence, said the Islamic State earns about $30 million a month from smuggling oil. During 2014, the group has generated an estimated $20 million from kidnappings and ransoms.

Cohen has previously warned that paying ransoms incentives more kidnappings -- that "each transaction encourages another transaction."

For Foley -- who somehow managed to organize games, and a Secret Santa exchange with gifts made out of trash -- and his fellow hostages, "different passports spelled different fates," the Times said. One Russian hostage, who was shot and killed in April, was held up as an example to the rest of what would happen to them if their governments didn't pay. By June, ISIS had negotiated the release of all the other hostages, including three Spanish journalists, save for those seven whose governments refused to pay: four Americans, and three Britons.

With the deaths of Foley and Sotloff, both American journalists, and those of Haines and Henning, both British, now three of the seven remain. ISIS has announced that American Peter Kassig, who now goes by Abdul Rahman Kassig since converting to Islam, will be killed next.