DALIAN, China — Terrorists have used technology to their advantage, but now it's time for the industry to band together to combat that, said David Scharia from the UN Security Council Counter-Terrorism Committee Executive Directorate.

These days, terrorists use technology "from radicalization, to incitement, to recruitment, to training … even the perpetration of the attack itself," Scharia told CNBC at the World Economic Forum's "Summer Davos" meeting in Dalian, China.

To fight those groups, tech firms must agree on the kind of terrorist content they won't allow on their services, and "once companies agree that this kind of propaganda will not be part of their platform, then the next challenge comes in how to identify, and how to take it down."

Just this week, Google, Facebook, Microsoft and Twitter announced an initiative with Scharia's division of the UN to tackle the issue with today's new tools — for instance, using machine learning to find and remove certain terrorist content. Along with the UN counter-terrorism executive directorate, the companies will also help smaller firms work on the same processes to tackle extremist content online.

Tech platforms have struggled to find a balance between issues of freedom of speech and privacy while working to curb the spread of terrorist content online. In other instances, there are also law enforcement debates on whether or not government can compel companies like Apple to allow access to consumer devices in related investigations. The long-standing question has been where to draw the line, and what a regulatory and legal framework would look like.

"A result of technology is that terrorists can hit anywhere, everywhere," Scharia said. "They're not limited by national borders — they can travel, and they can also plan attacks in one part of the world and execute it in a completely other part of the world, so everybody should be worried [and] everybody should work together."

The challenges associated with terrorism's online presence are here to stay, and it's important to work to stay one step ahead, said Scharia.

"When we look at the information technology revolution, it was developed without thinking about the fact that it may be used by terrorists," he said. Society needs to be planning ahead, so that in a few years' time, "when we have trucks that are autonomous, nobody will be able to hack them and get into the streets of Paris or New York."

"The spread of terrorism and violent extremism is a pressing global problem and a critical challenge for us all," the four firms said in a joint statement. "We take these issues very seriously, and each of our companies have developed policies and removal practices that enable us to take a hard line against terrorist or violent extremist content on our hosted consumer services."

See more of CNBC's World Economic Forum "Summer Davos" coverage here.