Silicon Valley is currently, and correctly, under fire for the failure of leading platforms such as Facebook, Google and Twitter to protect against the spread of disinformation, hate speech and efforts to disrupt our elections. I don’t know why these companies behaved as they did.

But whatever the reason — naiveté, excessive focus on near-term profits or simply a lack of proper attention on mind-numbingly complex problems — it’s clear they have to do a better job of making sure technology makes our world safer, freer and more stable rather than the opposite.

But it’s not just these big companies that need to up their game. As venture capitalists, we need to do more to find, fund and help a new generation of technology companies that build the infrastructure and applications to deal with technology-based threats to stability and security. Yes, Facebook and Twitter must deal with unintended consequences of their massive platforms. But if history is any guide, it will be new companies that come up with the bold new visions and business models to address fundamental, once-in-a-generation challenges.

I don’t use the word fundamental lightly. Just think about all security failures you now take for granted that once would have been unthinkable. Our PCs and other devices are patched every few hours or days, rather than every few months. We are routinely warned by merchants — sometimes even credit agencies! — to change our passwords because they’ve been hacked. We are relieved, rather than annoyed, when the credit card company calls to verify our recent purchases.

We feel abused when we read how our online identity has been monetized without our knowledge or used to micro-target us with ads by groups seeking to polarize our politics. And there are deeper-seated concerns, like the nagging fear of a terror attack or a lone-wolf gunman when we enter an airport or let our teenage kid go to a concert. Our physical and cyber selves feel threatened on a regular basis. Like it or not, we are too often under attack, as individuals, consumers and as citizens. But like the proverbial frog in a pot, we don’t seem to notice the rising water temperature.

If we stick with the status quo, that water is only going to get hotter. We already know the Russians (and the Iranians and the North Koreans) are again targeting U.S. voting systems in advance of the midterm elections, and the Russians also have the ability to shut down large parts of our electric grid. It hasn’t happened yet, but will Americans start worrying about congregating in public spaces, whether it is to protest, attend large rallies or go to concerts? I grew up in Pakistan, where horrific gun and bomb attacks on civilians are more common. I can’t help fear the same scourge will come to our shores.

If this sounds like scare-mongering, so be it. There is no getting around the fact that more people have more ways to do large-scale damage than ever before. Thankfully there are technologists and entrepreneurs working diligently to find ways to defend us from such harm.

Our portfolio company Evolv Technology, for example, is using advanced sensors and AI in weapons detection systems that can screen hundreds of people per hour without making them slow down or empty their pockets and purses. Companies like ShieldAI, Convexxum, Echodyne and others are using machine vision and advanced radar/lidar technologies to prevent people from being put in harm’s way by drone-type attacks.

Funding such companies can be different than the deals Silicon Valley VCs are used to. In most cases, these firms must collaborate with trusted government actors, intelligence agencies and enforcement organizations — not to mention comply with their regulations. To be successful, they need to share information with other companies, including competitors.

But I’m betting the trouble will be well worth it. History tells us that companies that overcome big obstacles to create new markets often enjoy years of rapid growth, and few competitors.

Most of all, I believe a nervous world is ready to reward companies that make it feel safer. Just as Uber and Airbnb caught the front edge of the sharing economy boom, companies whose mission is aligned with a change in the societal zeitgeist can create huge value.

Investors are already doing their part. DCVC recently invested in Fortem Technologies, and Shasta Ventures in AirSpace, which make Star Wars-ish systems of AI-based drones whose only role is to automatically detect, identify and slam into drones that wander into unauthorized airspace — say, over a private estate, or a factory.

General Catalyst invested in Mark43, which makes a cloud platform to help police departments and their detectives investigate crimes more quickly and effectively.

While these mission-oriented companies may not provide the fastest or steepest ramp to riches, the best of these mission-oriented companies will create technology that affects each of us every day, and businesses that will be resilient to economic cycles, fads and fashion. For investors, it’s a two-fer of enlightened self-interest — both as investors and as citizens. To paraphrase JFK, we should invest in such companies “not because it is easy, but because it is hard.”