<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Víctor Jiménez Cerrada</title>
    <description>The latest articles on DEV Community by Víctor Jiménez Cerrada (@capitangolo).</description>
    <link>https://dev.to/capitangolo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F574059%2F32a498c1-5d90-4835-8cce-780b26de7b26.jpg</url>
      <title>DEV Community: Víctor Jiménez Cerrada</title>
      <link>https://dev.to/capitangolo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/capitangolo"/>
    <language>en</language>
    <item>
      <title>5 Reasons Why IT Security Tools Fall Short To Secure the Industry</title>
      <dc:creator>Víctor Jiménez Cerrada</dc:creator>
      <pubDate>Tue, 29 Oct 2024 13:43:17 +0000</pubDate>
      <link>https://dev.to/capitangolo/5-reasons-why-it-security-tools-fall-short-to-secure-the-industry-1cpd</link>
      <guid>https://dev.to/capitangolo/5-reasons-why-it-security-tools-fall-short-to-secure-the-industry-1cpd</guid>
      <description>&lt;p&gt;Operational Technology (OT) is often treated as a subset of IT. After all, the devices that control an industrial facility are just different flavors of computers, but computers, after all. However, in practice, they present some specific challenges that separate them from regular IT deployments.&lt;/p&gt;

&lt;p&gt;Using regular IT tools in OT environments leaves teams poorly equipped. They will take longer to perform some maintenance tasks or be unable to identify some security threats.&lt;/p&gt;

&lt;p&gt;We’ll explore four factors that differentiate OT from IT, and discuss why OT Security needs specific tools.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzty9fsiua5w447xsgok5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzty9fsiua5w447xsgok5.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  OT is Mission-Critical
&lt;/h2&gt;

&lt;p&gt;While stopping any IT infrastructure will considerably impact any business, as &lt;a href="https://www.forbes.com/sites/kateoflahertyuk/2024/08/07/crowdstrike-reveals-what-happened-why-and-whats-changed/" rel="noopener noreferrer"&gt;the Crowdstrike incident&lt;/a&gt; recently reminded us, in OT the impact is bigger by several orders of magnitude.&lt;/p&gt;

&lt;p&gt;If a part of a factory stops it will affect the whole production line, dozens of workers will become idle, and it may take several hours to get back online.&lt;/p&gt;

&lt;p&gt;While in IT it is relatively cheap to set up a high-availability system or spin up a mirror infrastructure, setting up a backup production line for OT takes too long (up to several months) and is too expensive to have it sitting idle just in case.&lt;/p&gt;

&lt;p&gt;Security tools for OT must be especially accurate when alerting. A false positive that would cause you to shut down a facility is a very expensive luxury.&lt;/p&gt;

&lt;h2&gt;
  
  
  OT has a Physical Plane
&lt;/h2&gt;

&lt;p&gt;Critical equipment inside an office is mostly gathered and locked in a single server room. In comparison, critical equipment in an industrial facility, like PLCs, is widely distributed across the plant.&lt;/p&gt;

&lt;p&gt;Knowing the physical location of a device becomes essential in OT to speed up maintenance tasks.&lt;/p&gt;

&lt;p&gt;We live in a post-industry digitalization era, ours is the industry 4.0. As a result, there is a myriad of devices and sensors across a production line. All those devices are gathering critical data that must be secured on the devices, and in transit to the central servers to ensure compliance.&lt;/p&gt;

&lt;p&gt;OT security tools must support engineers and technicians beyond their control rooms, and into the factory floor.&lt;/p&gt;

&lt;h2&gt;
  
  
  Management of OT devices is different
&lt;/h2&gt;

&lt;p&gt;Although PLCs are way simpler than regular computers, they have little in common when securing them.&lt;/p&gt;

&lt;p&gt;PLC firmware, although simple, has vulnerabilities too, and needs to be kept up to date. We are used to computers upgrading automatically at a given time window, but for PLCs, you need a separate computer to perform a firmware update. You’ll also want to carefully plan the upgrade process across a whole facility to ensure everything keeps working smoothly.&lt;/p&gt;

&lt;p&gt;The software running inside a PLC also needs special treatment. Let’s take &lt;a href="https://en.wikipedia.org/wiki/Stuxnet" rel="noopener noreferrer"&gt;the Stuxnet worm&lt;/a&gt; as an example. It targeted PLCs, changing their programs to destroy the industrial equipment connected to them. To protect against this kind of threat you need, besides a strong real-time detection, a registry of the changes made to your PLCs software, as well as keeping a backup copy of the software.&lt;/p&gt;

&lt;p&gt;Finally, there are differences in who performs equipment maintenance. While in an IT environment, the IT team is responsible for all the maintenance tasks, it’s quite common that manufacturers perform some level of maintenance in industrial equipment. Nowadays some of this maintenance is performed remotely, adding yet another entry point to secure.&lt;/p&gt;

&lt;p&gt;A security tool specially crafted for OT will bake these idiosyncrasies into its core, offering relevant help instead of “just being there”.&lt;/p&gt;

&lt;h2&gt;
  
  
  OT has Specific Relevant Context
&lt;/h2&gt;

&lt;p&gt;IT security is designed for computers with full operating systems, where you can install a probe and gather all kinds of data. However, PLCs are too simple for Host-based Intrusion Detection Systems (HIDS).&lt;/p&gt;

&lt;p&gt;Instead, with PLCs you follow a black-box approach, observing from the outside and relying on diagnostics information. A security tool for OT must be able to speak the equipment language, across several brands, to retrieve this relevant diagnostics data across all your devices.&lt;/p&gt;

&lt;p&gt;You must also consider the device’s status. Is the device offline? Are you running a test in that production line? A vulnerability doesn’t have the same impact if it affects a production device as a mostly offline one. Some alerts that would be critical during production are to be expected while running some tests.&lt;/p&gt;

&lt;p&gt;Finally, inventory is vital. Compared to a tight-sealed environment, it’s easier to deploy a malicious device that goes unnoticed in an industrial environment. You cannot trust manual inventories, you need automatic discovery.&lt;/p&gt;

&lt;h2&gt;
  
  
  Industry has its own regulations
&lt;/h2&gt;

&lt;p&gt;Many general purpose security applies to industry environments, like ISO 27001, the European NIS 2, or the Spanish ENS.&lt;/p&gt;

&lt;p&gt;In addition, the industry has its own security models like Purdue, or standards like TISAX.&lt;/p&gt;

&lt;p&gt;Supporting these standards and regulations is a must for OT security tools.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using the Right Tools Gives You Superpowers
&lt;/h2&gt;

&lt;p&gt;When you start using a security tool specifically crafted for OT in your industrial environment, you soon realize everything is easier.&lt;/p&gt;

&lt;p&gt;You have the information you need right away, so you perform maintenance tasks faster.&lt;/p&gt;

&lt;p&gt;You detect more relevant threats while getting less noise.&lt;/p&gt;

&lt;p&gt;You’ll be able to investigate security incidents with more detail, as you’ll be able to correlate relevant insights.&lt;/p&gt;

&lt;p&gt;It will feel like you just lifted the handbrake.&lt;/p&gt;

</description>
      <category>otspm</category>
      <category>security</category>
      <category>industrial</category>
      <category>ot</category>
    </item>
    <item>
      <title>Automating Vulnerability Detection for Your Assets</title>
      <dc:creator>Víctor Jiménez Cerrada</dc:creator>
      <pubDate>Tue, 15 Oct 2024 15:48:55 +0000</pubDate>
      <link>https://dev.to/capitangolo/automating-vulnerability-detection-for-your-assets-385n</link>
      <guid>https://dev.to/capitangolo/automating-vulnerability-detection-for-your-assets-385n</guid>
      <description>&lt;p&gt;Discover how to automate vulnerability detection of your assets, so you can shift left security and protect your infrastructure before a vulnerability becomes a security incident.&lt;/p&gt;

&lt;p&gt;In this article, we’ll cover how to query the NIST vulnerability database, create a CPE Name for a resource, and automate the fetching of vulnerabilities with a script.&lt;/p&gt;

&lt;h2&gt;
  
  
  Vulnerabilities as an Attack Vector
&lt;/h2&gt;

&lt;p&gt;Software developers aren’t perfect; sometimes their code misses an edge case that makes your infrastructure vulnerable.&lt;/p&gt;

&lt;p&gt;Let’s take the &lt;a href="https://dwheeler.com/essays/apple-goto-fail.html" rel="noopener noreferrer"&gt;Apple goto fail vulnerability&lt;/a&gt; in 2016, a &lt;a href="https://dwheeler.com/essays/apple-goto-fail.html" rel="noopener noreferrer"&gt;single duplicated line&lt;/a&gt; enabled man-in-the-middle attacks on SSL communications involving Apple devices:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;SSLHashSHA1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;hashCtx&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;signedParams&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;goto&lt;/span&gt; &lt;span class="n"&gt;fail&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;goto&lt;/span&gt; &lt;span class="n"&gt;fail&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// This executes outside the if&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These errors are common and silly, but still dangerous; moreover, as code gets more complex, and as more resources you have, the bigger your surface attack. That’s why it’s so important to install security updates.&lt;/p&gt;

&lt;p&gt;Vulnerabilities are your backdoor and can provide access in many ways. Allowing attackers to disrupt your service, obtain information about your infrastructure (so they can exploit other vulnerabilities), and in the worst cases, execute code that ends on a remote control. Once they are in, attackers can move laterally to other resources, accessing or encrypting your business data, using your resources for crypto mining, or &lt;a href="https://archive.ph/20120525053210/http://www.computerworld.com/s/article/print/9185419/Siemens_Stuxnet_worm_hit_industrial_systems?taxonomyName=Network+Security&amp;amp;taxonomyId=142" rel="noopener noreferrer"&gt;altering your production line ever so slightly&lt;/a&gt; so you don’t notice but enough so production fails.&lt;/p&gt;

&lt;p&gt;Nowadays attacks tend to start as automated processes executed by botnets that look for vulnerable services and automatically hack them.&lt;/p&gt;

&lt;p&gt;We often aren’t aware of how much information our services share, like a web server that shares its version number. It didn’t take long for me to find a public web server like that:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;curl &lt;span class="nt"&gt;-I&lt;/span&gt; https://▋▋▋.▋▋▋▋▋▋▋▋▋.net
HTTP/2 301
server: nginx/1.18.0 &lt;span class="o"&gt;(&lt;/span&gt;Ubuntu&lt;span class="o"&gt;)&lt;/span&gt; ← ⚠️
&lt;span class="nb"&gt;date&lt;/span&gt;: Fri, 04 Oct 2024 08:57:20 GMT
content-type: text/html
content-length: 178
location: https://▋▋▋.▋▋▋▋▋▋▋▋▋.net/home/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We know this server is using &lt;code&gt;server: nginx/1.18.0 (Ubuntu)&lt;/code&gt;, we can look for vulnerabilities affecting this software and launch an attack.&lt;/p&gt;

&lt;h2&gt;
  
  
  Querying for Vulnerabilities in Your Device
&lt;/h2&gt;

&lt;p&gt;Where can you search for the vulnerabilities in a given software? In a vulnerability database &lt;em&gt;(ba dum tss)&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;When a vulnerability is found, it is classified under the &lt;a href="https://en.wikipedia.org/wiki/Common_Vulnerabilities_and_Exposures" rel="noopener noreferrer"&gt;Common Vulnerabilities and Exposures (CVE)&lt;/a&gt; system. This system standardizes naming vulnerabilities (&lt;code&gt;CVE-YEAR-ID&lt;/code&gt;) and presenting relative information (description, metrics, etc.).&lt;/p&gt;

&lt;p&gt;Some organizations such as &lt;a href="https://nvd.nist.gov/vuln" rel="noopener noreferrer"&gt;NIST NVD&lt;/a&gt; maintain CVE databases, where people can learn how to mitigate them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp5wyrymf0z7p5gkx0xjl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp5wyrymf0z7p5gkx0xjl.png" alt="A search result in the NIST NVD for a 7.4 High severity CVE." width="800" height="347"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This database has a search tool that allows you to search by software and version. You only need to format it in a &lt;a href="https://en.wikipedia.org/wiki/Common_Platform_Enumeration" rel="noopener noreferrer"&gt;CPE (Common Platform Enumeration)&lt;/a&gt;, a structured naming scheme for information technology systems, software, and packages.&lt;/p&gt;

&lt;p&gt;When in doubt about what is the correct CPE for your resource, you can always ask Google:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbd2cpe7hxj3tsq3k47t4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbd2cpe7hxj3tsq3k47t4.png" alt="Google Search for cpe nginx" width="800" height="319"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the &lt;code&gt;nginx&lt;/code&gt; service from the example earlier, the CPE would be  &lt;code&gt;cpe:2.3:a:f5:nginx:1.18.0:*:*:*:*:*:*:*&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Entering this string &lt;a href="https://nvd.nist.gov/vuln/search" rel="noopener noreferrer"&gt;on the search tool&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F68jw2ax0l4c8s733r7l4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F68jw2ax0l4c8s733r7l4.png" alt="Detail of the search form in NIST NVD" width="800" height="530"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Throws &lt;a href="https://nvd.nist.gov/vuln/search/results?form_type=Advanced&amp;amp;results_type=overview&amp;amp;query=cpe%3A2.3%3Aa%3Af5%3Anginx%3A1.18.0%3A*%3A*%3A*%3A*%3A*%3A*%3A*&amp;amp;search_type=all&amp;amp;isCpeNameSearch=true" rel="noopener noreferrer"&gt;three high-severity vulnerabilities&lt;/a&gt; that could be used to impact that web server:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fee3pguslwamyalfbqdus.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fee3pguslwamyalfbqdus.png" alt="Search results in NIST NVD for nginx version 1.18" width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Getting closer to an industrial setup, we’ll take a Siemens &lt;em&gt;‘SIMATIC S7-1500’&lt;/em&gt; PLC as an example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fldvw4xoijb5btipwoxcu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fldvw4xoijb5btipwoxcu.png" alt="A SIMATIC S7 1500 PLC" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This concrete PLC has a &lt;code&gt;0.5.1&lt;/code&gt; firmware version, so its CPE would be &lt;code&gt;cpe:2.3:o:siemens:simatic_s7-1500_cpu_firmware:0.5.1:*:*:*:*:*:*:*&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Querying the NIST database, we see &lt;a href="https://nvd.nist.gov/vuln/search/results?form_type=Advanced&amp;amp;results_type=overview&amp;amp;query=cpe%3A2.3%3Ao%3Asiemens%3Asimatic_s7-1500_cpu_firmware%3A0.5.1%3A*%3A*%3A*%3A*%3A*%3A*%3A*&amp;amp;search_type=all&amp;amp;isCpeNameSearch=true" rel="noopener noreferrer"&gt;13 vulnerabilities&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn0ox581j22b57x8hvh0n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn0ox581j22b57x8hvh0n.png" alt="Search results in NIST NVD for the siemens firmware." width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Nice! Now we can go through this list and apply mitigation actions where needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Querying the NIST NVD API
&lt;/h2&gt;

&lt;p&gt;However, repeating this process for each resource at a time is time-wasting, and directly not feasible when we have hundreds of devices.&lt;/p&gt;

&lt;p&gt;Luckily, &lt;a href="https://nvd.nist.gov/developers/vulnerabilities" rel="noopener noreferrer"&gt;NIST offers an API&lt;/a&gt; to query this database and automate this vulnerability discovery process.&lt;/p&gt;

&lt;p&gt;Using the API is incredibly simple. We could perform the same queries we did before in the command line with a program like &lt;code&gt;curl&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;curl &lt;span class="s2"&gt;"https://services.nvd.nist.gov/rest/json/cves/2.0?cpeName=cpe:2.3:a:f5:nginx:1.18.0"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; nginx-1-18-0.json
&lt;span class="nv"&gt;$ &lt;/span&gt;curl &lt;span class="s2"&gt;"https://services.nvd.nist.gov/rest/json/cves/2.0?cpeName=cpe:2.3:o:siemens:simatic_s7-1500_cpu_firmware:0.5.1"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; simatic_s7-1500.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The response is a rather intuitive and comprehensive JSON payload:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="s2"&gt;"nginx-1-18-0.json"&lt;/span&gt; | jq &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="s2"&gt;"resultsPerPage"&lt;/span&gt;: 3,
  &lt;span class="s2"&gt;"startIndex"&lt;/span&gt;: 0,
  &lt;span class="s2"&gt;"totalResults"&lt;/span&gt;: 3,
  &lt;span class="s2"&gt;"format"&lt;/span&gt;: &lt;span class="s2"&gt;"NVD_CVE"&lt;/span&gt;,
  &lt;span class="s2"&gt;"version"&lt;/span&gt;: &lt;span class="s2"&gt;"2.0"&lt;/span&gt;,
  &lt;span class="s2"&gt;"timestamp"&lt;/span&gt;: &lt;span class="s2"&gt;"2024-10-07T10:47:05.540"&lt;/span&gt;,
  &lt;span class="s2"&gt;"vulnerabilities"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
    &lt;span class="o"&gt;{&lt;/span&gt;
      &lt;span class="s2"&gt;"cve"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;"id"&lt;/span&gt;: &lt;span class="s2"&gt;"CVE-2021-23017"&lt;/span&gt;,
        &lt;span class="s2"&gt;"sourceIdentifier"&lt;/span&gt;: &lt;span class="s2"&gt;"f5sirt@f5.com"&lt;/span&gt;,
        &lt;span class="s2"&gt;"published"&lt;/span&gt;: &lt;span class="s2"&gt;"2021-06-01T13:15:07.853"&lt;/span&gt;,
        &lt;span class="s2"&gt;"lastModified"&lt;/span&gt;: &lt;span class="s2"&gt;"2023-11-07T03:30:29.880"&lt;/span&gt;,
        &lt;span class="s2"&gt;"vulnStatus"&lt;/span&gt;: &lt;span class="s2"&gt;"Modified"&lt;/span&gt;,
        &lt;span class="s2"&gt;"cveTags"&lt;/span&gt;: &lt;span class="o"&gt;[]&lt;/span&gt;,
        &lt;span class="s2"&gt;"descriptions"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
          &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"lang"&lt;/span&gt;: &lt;span class="s2"&gt;"en"&lt;/span&gt;,
            &lt;span class="s2"&gt;"value"&lt;/span&gt;: &lt;span class="s2"&gt;"A security issue in nginx resolver was identified, which might allow an attacker who is able to forge UDP packets from the DNS server to cause 1-byte memory overwrite, resulting in worker process crash or potential other impact."&lt;/span&gt;
          &lt;span class="o"&gt;}&lt;/span&gt;,
…
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can code these HTTP calls and response processing with the language of your choice, and integrate them with whatever tools integrates best with your workflow. We’ll see a couple of examples in a bit.&lt;/p&gt;

&lt;p&gt;Only a final piece of the puzzle is missing, obtaining an API Key.&lt;/p&gt;

&lt;p&gt;NIST &lt;a href="https://nvd.nist.gov/general/news/API-Key-Announcement" rel="noopener noreferrer"&gt;limits the number of requests&lt;/a&gt; that unregistered users can perform. If you are going to use this API in any serious way, you should request an API Key to lift these restrictions. The process is straightforward, you only need to &lt;a href="https://nvd.nist.gov/developers/request-an-api-key" rel="noopener noreferrer"&gt;fill out and submit a simple form&lt;/a&gt;, and click a link from an email you’ll receive.&lt;/p&gt;

&lt;p&gt;Once you obtain your API Key, you can provide it via an &lt;code&gt;apiKey&lt;/code&gt; HTTP header. In curl, this is done with the &lt;code&gt;-H&lt;/code&gt; param:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;curl &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"apiKey: YOUR-API-KEY-HERE"&lt;/span&gt; &lt;span class="s2"&gt;"https://services.nvd.nist.gov/rest/json/cves/2.0?cpeName=cpe:2.3:a:f5:nginx:1.18.0"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Automating Vulnerability Detection on a Spreadsheet
&lt;/h2&gt;

&lt;p&gt;Many people keep their asset inventory on a spreadsheet. So let’s see how to integrate the NIST NVD API inside Google Sheets.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;[!NOTE]&lt;br&gt;
This approach is not recommended, we are displaying it only for educational purposes and because it is fun. Main disadvantages are: You cannot include an apiKey, it is taxing on the API backend, and it doesn’t provide a good user experience. We provide a proper option on the next section.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We start with a simple spreadsheet that contains all the basic information from our assets:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7h40vuvl0epfh7gm6rv1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7h40vuvl0epfh7gm6rv1.png" alt="Example inventory spreadsheet" width="800" height="157"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The plan will be to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Generate the CPE for each device.&lt;/li&gt;
&lt;li&gt;Call the API for each resource.&lt;/li&gt;
&lt;li&gt;Extract the CVE numbers from the payload.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let’s get started!&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Generating CPEs
&lt;/h3&gt;

&lt;p&gt;The first step is to generate the CPE for each device, which can be easily done by concatenating the already available information:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw6mhqwtbkvv4dkxee9iq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw6mhqwtbkvv4dkxee9iq.png" alt="Example inventory spreadsheet: Generating the CPE." width="800" height="132"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"cpe:2.3:"&lt;/span&gt; &amp;amp; F2 &amp;amp; &lt;span class="s2"&gt;":"&lt;/span&gt; &amp;amp; B2 &amp;amp; &lt;span class="s2"&gt;":"&lt;/span&gt; &amp;amp; C2 &amp;amp; &lt;span class="s2"&gt;":"&lt;/span&gt; &amp;amp; D2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We added the text &lt;code&gt;cpe:2.3&lt;/code&gt; and the CPE part at the beginning. The CEP part describes the type of resource: &lt;code&gt;a&lt;/code&gt; for applications, &lt;code&gt;h&lt;/code&gt; for Hardware, and &lt;code&gt;o&lt;/code&gt; for Operating Systems.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Calling the API
&lt;/h3&gt;

&lt;p&gt;Google Sheets has functions to import and process several types of data such as XML or CSV. However, it lacks support for the JSON that the NIST API returns. There are third-party solutions for that, but keeping things simple, we’ll get creative and use only the default functions.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;IMPORTDATA(url, delimiter, locale)&lt;/code&gt; function can load data from a &lt;code&gt;url&lt;/code&gt;, separating data rows by new lines, and columns by the &lt;code&gt;delimiter&lt;/code&gt; character. Would this work for us?&lt;/p&gt;

&lt;p&gt;We could use this function to load the whole payload in a single cell, and then extract the data. Keep in mind that the API returns a minified JSON, that is without extra spaces or line breaks, we used &lt;code&gt;jq&lt;/code&gt; earlier to prettify the output.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;=&lt;/span&gt;IMPORTDATA&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"[https://services.nvd.nist.gov/rest/json/cves/2.0?cpeName=](https://services.nvd.nist.gov/rest/json/cves/2.0?cpeName=)"&lt;/span&gt; &amp;amp; Inventory!E2,&lt;span class="s2"&gt;"Ç"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, &lt;code&gt;Inventory!E2&lt;/code&gt; is the CPE we calculated earlier, and we are using a strange character as a delimiter (&lt;code&gt;“Ç”&lt;/code&gt; ) so the data is not split in columns and stays in the same cell.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frhe1w1e76rwj2hfi4d1b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frhe1w1e76rwj2hfi4d1b.png" alt="Example inventory spreadsheet. Displaying: Error result too large." width="800" height="167"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The output? &lt;code&gt;Error: Result too large.&lt;/code&gt;  It looks like the payload is too big for a single cell, we’ll have to look for a way to split it into smaller chunks.&lt;/p&gt;

&lt;p&gt;Looking closer at the JSON payload from the API we can identify some useful patterns:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;…&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"vulnerabilities"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"cve"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"CVE-2021-23017"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"sourceIdentifier"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"f5sirt@f5.com"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;…&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every CVE number is preceded by the string &lt;code&gt;"cve": { "id": "CVE&lt;/code&gt; . We could:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Split the payload in columns by the &lt;code&gt;{&lt;/code&gt;  character.&lt;/li&gt;
&lt;li&gt;Keep only those that start with &lt;code&gt;"id": "CVE-&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This would be the formula:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;=&lt;/span&gt;TRANSPOSE&lt;span class="o"&gt;(&lt;/span&gt;
    QUERY&lt;span class="o"&gt;(&lt;/span&gt;
      TRANSPOSE&lt;span class="o"&gt;(&lt;/span&gt;
        IMPORTDATA&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"https://services.nvd.nist.gov/rest/json/cves/2.0?cpeName="&lt;/span&gt; &amp;amp; Inventory!E2,&lt;span class="s2"&gt;"{"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
      &lt;span class="o"&gt;)&lt;/span&gt;, &lt;span class="s1"&gt;'HELPER - Query'&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nv"&gt;$A$1&lt;/span&gt;&lt;span class="o"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;QUERY&lt;/code&gt; Allow us to run SQL queries on a dataset.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;TRANSPOSE&lt;/code&gt; Is used to turn rows into columns so we can evaluate the query for each value. After the query, it is used again to turn the result into a single row afterward.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;'HELPER - Query'!$A$1&lt;/code&gt; is a reference to the cell containing the query: &lt;code&gt;SELECT * WHERE Col1 contains ':"CVE-'&lt;/code&gt;. Google Sheets doesn’t like the &lt;code&gt;"&lt;/code&gt; inside the query, but it seems fine if we move the query to a different cell ¯\&lt;em&gt;(ツ)&lt;/em&gt;/¯.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Will this work?&lt;/p&gt;

&lt;p&gt;Let’s drop this formula on a separate sheet of our inventory spreadsheet and see:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frziwo6f5bhrmaimn6mf5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frziwo6f5bhrmaimn6mf5.png" alt="Example inventory spreadsheet: Displaying the payload json split in columns." width="800" height="63"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Indeed! It works!&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Extracting the CVE number
&lt;/h3&gt;

&lt;p&gt;We are close, we have each CVE number on a separate cell and we only need to extract it.&lt;/p&gt;

&lt;p&gt;My first thought was to tweak the &lt;code&gt;SELECT *&lt;/code&gt; on the SQL query, trying to return only a substring instead of the whole field. That way all the processing would be contained in one place. However, the SQL language in Google Sheets has a very limited function set and this approach is a no-go.&lt;/p&gt;

&lt;p&gt;We’ll keep the current results as they are on a separate sheet &lt;code&gt;HELPER - RAW_CVEs&lt;/code&gt;, acting as a helper to display the clean CVE numbers in another place.&lt;/p&gt;

&lt;p&gt;We can leverage the function &lt;code&gt;REGEXEXTRACT&lt;/code&gt; to extract only the CVE number using regular expressions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;=&lt;/span&gt;REGEXEXTRACT&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'HELPER - RAW_CVEs'&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;A1,&lt;span class="s2"&gt;"CVE-&lt;/span&gt;&lt;span class="se"&gt;\d&lt;/span&gt;&lt;span class="s2"&gt;*-&lt;/span&gt;&lt;span class="se"&gt;\d&lt;/span&gt;&lt;span class="s2"&gt;*"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We could clean up things a bit, using &lt;code&gt;HYPERLINK&lt;/code&gt; to drive the user to the NIST website for that CVE, and other functions to filter out errors.&amp;gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;=&lt;/span&gt;IF&lt;span class="o"&gt;(&lt;/span&gt;
  NOT&lt;span class="o"&gt;(&lt;/span&gt;ISBLANK&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'HELPER - RAW_CVEs'&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;A1&lt;span class="o"&gt;))&lt;/span&gt;,
  HYPERLINK&lt;span class="o"&gt;(&lt;/span&gt;
    &lt;span class="s2"&gt;"https://nvd.nist.gov/vuln/detail/"&lt;/span&gt; &amp;amp; REGEXEXTRACT&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'HELPER - RAW_CVEs'&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;A1,&lt;span class="s2"&gt;"CVE-&lt;/span&gt;&lt;span class="se"&gt;\d&lt;/span&gt;&lt;span class="s2"&gt;*-&lt;/span&gt;&lt;span class="se"&gt;\d&lt;/span&gt;&lt;span class="s2"&gt;*"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;,
    REGEXEXTRACT&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'HELPER - RAW_CVEs'&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;A1,&lt;span class="s2"&gt;"CVE-&lt;/span&gt;&lt;span class="se"&gt;\d&lt;/span&gt;&lt;span class="s2"&gt;*-&lt;/span&gt;&lt;span class="se"&gt;\d&lt;/span&gt;&lt;span class="s2"&gt;*"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
  &lt;span class="o"&gt;)&lt;/span&gt;,
  &lt;span class="s2"&gt;""&lt;/span&gt;
&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The result is gorgeous!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsyn4wqpr1uu80lmgl7lb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsyn4wqpr1uu80lmgl7lb.png" alt="Example inventory spreadsheet: Displaying the CVE numbers for each asset with links to the CVE page." width="800" height="107"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Our example spreadsheet &lt;a href="https://docs.google.com/spreadsheets/d/18SCeZjntzxgEvA1PTtzLtUIwQn1C0TA-wsfWJS6gKtk/edit?usp=sharing" rel="noopener noreferrer"&gt;is available if you want to see it in action&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;[!NOTE]&lt;br&gt;
This approach is not recommended, we are displaying it only for educational purposes and because it is fun. Main disadvantages are: You cannot include an apiKey, it is taxing on the API backend, and it doesn’t provide a good user experience. Check out a proper option on the next section.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Automating Vulnerability Detection With Python {#python}
&lt;/h2&gt;

&lt;p&gt;Let’s see how to do something similar with a proper programming language like Python.&lt;/p&gt;

&lt;p&gt;Although our example is gonna be radically simple, this solution has huge potential for improvement. For example, you could expand it to integrate with your tools, program it to run periodically or send notifications via email.&lt;/p&gt;

&lt;p&gt;Our example will cover:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Receive a &lt;code&gt;.cvs&lt;/code&gt;list of resources. (i.e. Exported from a spreadsheet).&lt;/li&gt;
&lt;li&gt;Call the API to fetch vulnerabilities.&lt;/li&gt;
&lt;li&gt;Output a list of vulnerabilities in JSON format.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let’s take a look at the code in our &lt;code&gt;vuln_finder.py&lt;/code&gt;script. You can also find the whole code and example data files in &lt;a href="https://github.com/safetybitsio/blog-snippets/tree/main/nis2-affect-european-industries" rel="noopener noreferrer"&gt;our GitHub repository&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Reading the resource list
&lt;/h3&gt;

&lt;p&gt;We’ll use a few modules on our script:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;argparse&lt;/code&gt;to read command line options.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;requests&lt;/code&gt;to perform the API calls.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;csv&lt;/code&gt;to read the resource list.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;json&lt;/code&gt;to write our output.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first step will be to read the user options:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;argparse&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;csv&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;

&lt;span class="c1"&gt;#
# Parsing arguments
&lt;/span&gt;&lt;span class="n"&gt;parser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;argparse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ArgumentParser&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;parser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_argument&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;-d&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;--devices&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;default&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;inventory.csv&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;help&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Devices file in csv format. Default: inventory.csv.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;parser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_argument&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;-o&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;--output&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="n"&gt;default&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;output.json&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;help&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Output file where to store the json response. Default: output.json.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;parser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_argument&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;-k&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;--apikey&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;required&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;help&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;NIST NVD API Key.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;args&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;parser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse_args&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="c1"&gt;#
&lt;/span&gt;&lt;span class="n"&gt;devices_csv&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;devices&lt;/span&gt;
&lt;span class="n"&gt;output_file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;output&lt;/span&gt;
&lt;span class="n"&gt;apikey&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;apikey&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And then, we’ll read the device list csv, and generate the CPE name from there:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;#
# Reading devices file
&lt;/span&gt;&lt;span class="n"&gt;inventory&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;devices_csv&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;newline&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;''&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;csvfile&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;inventoryreader&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;csv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;csvfile&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;delimiter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;,&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;quotechar&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'"'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;inventoryreader&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;device&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
        &lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;vendor&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;software&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;version&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;part&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;cpe&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cpe:2.3:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;part&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;vendor&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;software&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;version&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cves&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
        &lt;span class="n"&gt;inventory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Calling the API
&lt;/h3&gt;

&lt;p&gt;Now, for every device in our inventory, we call the API. The &lt;code&gt;response&lt;/code&gt; module makes it really simple to send this request with the &lt;code&gt;apiKey&lt;/code&gt; header.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;We use &lt;code&gt;request.get(url, headers)&lt;/code&gt; to make the API call.&lt;/li&gt;
&lt;li&gt;We use &lt;code&gt;response.json()&lt;/code&gt; to get a dictionary with the JSON Payload.&lt;/li&gt;
&lt;li&gt;We fetch the data we want from that dictionary.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;#
# Calling JSON API for each device
&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;device&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;inventory&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# The API endpoint
&lt;/span&gt;    &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://services.nvd.nist.gov/rest/json/cves/2.0?cpeName=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;cpe&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

    &lt;span class="c1"&gt;# Send a GET request to the API
&lt;/span&gt;    &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;apiKey&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;apikey&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="c1"&gt;# Process the response
&lt;/span&gt;    &lt;span class="n"&gt;vulnerabilities&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;vulnerabilities&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;vulnerability&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;vulnerabilities&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;cve&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
        &lt;span class="n"&gt;cve&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;vulnerability&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cve&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="n"&gt;cve&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;url&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;url: https://nvd.nist.gov/vuln/detail/&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;cve&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="c1"&gt;# Try to grab CVSS Score v3.1
&lt;/span&gt;        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;metrics&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;vulnerability&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cve&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cvssMetricV31&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;vulnerability&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cve&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;metrics&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
            &lt;span class="n"&gt;cve&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;baseScore&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;vulnerability&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cve&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;metrics&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cvssMetricV31&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cvssData&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;baseScore&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
            &lt;span class="n"&gt;cve&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;baseSeverity&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;vulnerability&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cve&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;metrics&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cvssMetricV31&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cvssData&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;baseSeverity&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cves&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cve&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;#
&lt;/span&gt;    &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We have to dig into several dictionaries to reach the data we want:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;vulnerability["cve"]["id"]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;vulnerability["cve"]["metrics"]["cvssMetricV31"][0]["cvssData"]["baseScore"]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;vulnerability["cve"]["metrics"]["cvssMetricV31"][0]["cvssData"]["baseSeverity"]&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We kept things simple for this example, but keep in mind that the NIST NVD payload is quite comprehensive, so there’s lots of insightful information you could fetch here.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Outputting the data
&lt;/h3&gt;

&lt;p&gt;Finally, we write the data into a JSON file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;#
# Output the result
&lt;/span&gt;&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;output_file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;w&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dump&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here is where we could cache the data, send notifications, and in general, do some kind of intelligence with the data we fetched.&lt;/p&gt;

&lt;h3&gt;
  
  
  Testing the script
&lt;/h3&gt;

&lt;p&gt;Let’s take our script for a ride.&lt;/p&gt;

&lt;p&gt;Here is the &lt;code&gt;inventory.cvs&lt;/code&gt; we’ll provide:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Nginx Web Server,f5,nginx,1.18.0,a
SIMATIC S7-1500,siemens,simatic_s7-1500_cpu_firmware,0.5.1,o
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We’ll run the script like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;python vuln_finder.py &lt;span class="nt"&gt;-d&lt;/span&gt; inventory.csv &lt;span class="nt"&gt;-o&lt;/span&gt; output.json &lt;span class="nt"&gt;-k&lt;/span&gt; THE-API-KEY
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And we obtain an output file like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;output.json | jq &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;span class="o"&gt;[&lt;/span&gt;
  &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"name"&lt;/span&gt;: &lt;span class="s2"&gt;"Nginx Web Server"&lt;/span&gt;,
    &lt;span class="s2"&gt;"vendor"&lt;/span&gt;: &lt;span class="s2"&gt;"f5"&lt;/span&gt;,
    &lt;span class="s2"&gt;"software"&lt;/span&gt;: &lt;span class="s2"&gt;"nginx"&lt;/span&gt;,
    &lt;span class="s2"&gt;"version"&lt;/span&gt;: &lt;span class="s2"&gt;"1.18.0"&lt;/span&gt;,
    &lt;span class="s2"&gt;"part"&lt;/span&gt;: &lt;span class="s2"&gt;"a"&lt;/span&gt;,
    &lt;span class="s2"&gt;"cpe"&lt;/span&gt;: &lt;span class="s2"&gt;"cpe:2.3:a:f5:nginx:1.18.0"&lt;/span&gt;,
    &lt;span class="s2"&gt;"cves"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
      &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;"id"&lt;/span&gt;: &lt;span class="s2"&gt;"CVE-2021-23017"&lt;/span&gt;,
        &lt;span class="s2"&gt;"url"&lt;/span&gt;: &lt;span class="s2"&gt;"url: https://nvd.nist.gov/vuln/detail/CVE-2021-23017"&lt;/span&gt;,
        &lt;span class="s2"&gt;"baseScore"&lt;/span&gt;: 7.7,
        &lt;span class="s2"&gt;"baseSeverity"&lt;/span&gt;: &lt;span class="s2"&gt;"HIGH"&lt;/span&gt;
      &lt;span class="o"&gt;}&lt;/span&gt;,
      &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;"id"&lt;/span&gt;: &lt;span class="s2"&gt;"CVE-2021-3618"&lt;/span&gt;,
        &lt;span class="s2"&gt;"url"&lt;/span&gt;: &lt;span class="s2"&gt;"url: https://nvd.nist.gov/vuln/detail/CVE-2021-3618"&lt;/span&gt;,
        &lt;span class="s2"&gt;"baseScore"&lt;/span&gt;: 7.4,
        &lt;span class="s2"&gt;"baseSeverity"&lt;/span&gt;: &lt;span class="s2"&gt;"HIGH"&lt;/span&gt;
      &lt;span class="o"&gt;}&lt;/span&gt;,
      &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;"id"&lt;/span&gt;: &lt;span class="s2"&gt;"CVE-2023-44487"&lt;/span&gt;,
        &lt;span class="s2"&gt;"url"&lt;/span&gt;: &lt;span class="s2"&gt;"url: https://nvd.nist.gov/vuln/detail/CVE-2023-44487"&lt;/span&gt;,
        &lt;span class="s2"&gt;"baseScore"&lt;/span&gt;: 7.5,
        &lt;span class="s2"&gt;"baseSeverity"&lt;/span&gt;: &lt;span class="s2"&gt;"HIGH"&lt;/span&gt;
      &lt;span class="o"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;]&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;,
  &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"name"&lt;/span&gt;: &lt;span class="s2"&gt;"SIMATIC S7-1500"&lt;/span&gt;,
    &lt;span class="s2"&gt;"vendor"&lt;/span&gt;: &lt;span class="s2"&gt;"siemens"&lt;/span&gt;,
    &lt;span class="s2"&gt;"software"&lt;/span&gt;: &lt;span class="s2"&gt;"simatic_s7-1500_cpu_firmware"&lt;/span&gt;,
    &lt;span class="s2"&gt;"version"&lt;/span&gt;: &lt;span class="s2"&gt;"0.5.1"&lt;/span&gt;,
    &lt;span class="s2"&gt;"part"&lt;/span&gt;: &lt;span class="s2"&gt;"o"&lt;/span&gt;,
    &lt;span class="s2"&gt;"cpe"&lt;/span&gt;: &lt;span class="s2"&gt;"cpe:2.3:o:siemens:simatic_s7-1500_cpu_firmware:0.5.1"&lt;/span&gt;,
    &lt;span class="s2"&gt;"cves"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
      &lt;span class="o"&gt;{&lt;/span&gt;
…
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Great! It Works!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;[!NOTE]&lt;br&gt;
If you want to learn more, or try this yourself, check the whole code in &lt;a href="https://www.notion.so/2024-10-10-Automating-Vulnerability-Listing-113940a14af6805c9809de2885ac60ae?pvs=21" rel="noopener noreferrer"&gt;our GitHub repository&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Next Steps: Automation and Correlation, the base for OTSPM
&lt;/h2&gt;

&lt;p&gt;We’ve seen how easy it is to automate vulnerability discovery by querying vulnerability databases’ APIs. Where to go next from here?&lt;/p&gt;

&lt;p&gt;The trends in cybersecurity are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Automation&lt;/strong&gt; of all manual tasks to avoid human errors, and provide always up-to-date information.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Correlation&lt;/strong&gt; of data gathered from several sources to detect more threats.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s take &lt;strong&gt;automating inventory&lt;/strong&gt; as an example.&lt;/p&gt;

&lt;p&gt;Keeping an inventory in a spreadsheet seems easy. However, what happens if a malicious device or service is added? How long it will take you to detect it?&lt;/p&gt;

&lt;p&gt;If you &lt;strong&gt;continuously scan&lt;/strong&gt; your infrastructure to keep an updated picture of your infrastructure, you can perform some nice correlations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;New resources over real-time security alerts: “Someone accessed a suspicious URL at the same time this new device was added.”&lt;/li&gt;
&lt;li&gt;State of the resources over vulnerability discovery: “This device has a critical vulnerability, but it’s a test machine that is off. We can prioritize other alerts over this one.”&lt;/li&gt;
&lt;li&gt;State of the resources over compliance: “A recent configuration change in this server has made it fall out of compliance.”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Keep this in mind whether you build your own security solutions or use a vendor product, security has proved to be more effective when treated as a single solution, where any information may be useful at any given stage.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Vulnerability databases help you discover where are you vulnerable and take mitigation actions.&lt;/p&gt;

&lt;p&gt;You can automate this discovery process by integrating your inventory with their APIs, which is easily done in any popular programming language. You can even do this querying from a spreadsheet (although it is not recommended).&lt;/p&gt;

&lt;p&gt;Finally, advancing on this automation journey will open you up to the possibility of correlating data from multiple sources, making your security solution more effective.&lt;/p&gt;

</description>
      <category>security</category>
      <category>cve</category>
      <category>vulnerabilities</category>
      <category>spreadsheet</category>
    </item>
    <item>
      <title>How will NIS2 affect European Industries</title>
      <dc:creator>Víctor Jiménez Cerrada</dc:creator>
      <pubDate>Tue, 08 Oct 2024 13:13:23 +0000</pubDate>
      <link>https://dev.to/capitangolo/how-will-nis2-affect-european-industries-4i87</link>
      <guid>https://dev.to/capitangolo/how-will-nis2-affect-european-industries-4i87</guid>
      <description>&lt;p&gt;The European NIS2 directive is coming to Europe to set a new high bar on the union's cybersecurity.&lt;/p&gt;

&lt;p&gt;So far, the directive defines only a set of guidelines. State Members are expected to transpose it into local laws by October 17, then we’ll have more concrete details.&lt;/p&gt;

&lt;p&gt;In this article, we’ll cover how it affects industrial environments with what we know so far.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why is NIS2 Needed?
&lt;/h2&gt;

&lt;p&gt;In recent years, we’ve seen an increasing adoption of technologies in every aspect of our lives. What used to be isolated is now connected, and we complement our personal computers with smartphones, smartwatches, smart TVs, and other smart devices.&lt;/p&gt;

&lt;p&gt;Attackers have adapted to this new landscape. Cyberattacks &lt;a href="https://www.digitalsme.eu/57-surge-of-cyberattacks-in-europe-flagged-by-digital-sme-report/" rel="noopener noreferrer"&gt;rose by 57% in 2023&lt;/a&gt; and &lt;a href="https://www.enisa.europa.eu/publications/enisa-threat-landscape-2024" rel="noopener noreferrer"&gt;the trend continues in 2024&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And more importantly, we’ve seen examples of attacks targeting essential infrastructure in the last years:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.reuters.com/technology/cybersecurity/russian-hackers-claim-cyberattack-website-spain-firm-preparing-tanks-ukraine-2024-06-05/" rel="noopener noreferrer"&gt;Santa Barbara Systems&lt;/a&gt; (2024).&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.linkedin.com/pulse/orange-spain-hit-cyberattack-disrupting-f9zqc/" rel="noopener noreferrer"&gt;Orange Spain&lt;/a&gt; (2024).&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.bbc.com/news/articles/c6ppv06e3n8o" rel="noopener noreferrer"&gt;Santander Bank&lt;/a&gt; (2024).&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://euroweeklynews.com/2023/04/07/barcelonas-hospital-clinic-hit-by-ransomware-cyberattack-from-outside-spain/" rel="noopener noreferrer"&gt;Barcelona’s Hospital Clinic&lt;/a&gt; (2023).&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.cm-alliance.com/cybersecurity-blog/royal-mail-ransomware-attack-timeline" rel="noopener noreferrer"&gt;Royal Mail&lt;/a&gt; (2023).&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://new.abb.com/news/detail/103405/abb-provides-details-about-it-security-incident" rel="noopener noreferrer"&gt;ABB&lt;/a&gt; (2023).&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://attack.mitre.org/campaigns/C0034/" rel="noopener noreferrer"&gt;Ukraine Electric Power Attack&lt;/a&gt; (2022).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And also, the relationship between cyberattacks and warfare is clearer than ever with the current geopolitical situation in Europe.&lt;/p&gt;

&lt;p&gt;With this in mind, the NIS2 directive aims to increase the cyber resilience of Europe and protect its essential services.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Does the NIS2 Directive Look Like?
&lt;/h2&gt;

&lt;p&gt;It won’t come as a surprise, but it’s a rather boring document expanding 60 pages and divided into 46 articles.&lt;/p&gt;

&lt;p&gt;Most articles describe the new European security network and the framework the Member States need to implement. The requirements affecting businesses are mainly described in articles 21 and 23.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;Section&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Topic&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Chapter 1&lt;/strong&gt; &lt;br&gt; Articles 1-6&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;General provisions:&lt;/strong&gt;  &lt;br&gt; Covers the scope of the directive and defines common terms.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Chapter 2&lt;/strong&gt; &lt;br&gt; Articles 7-13&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Coordinated cybersecurity frameworks:&lt;/strong&gt; &lt;br&gt; Lists the new entities each Member State needs to define.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Chapter 3&lt;/strong&gt; &lt;br&gt; Articles 14-19&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Coordination at union and international level:&lt;/strong&gt; Defines the new entities that will be needed at a European level.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Chapter 4&lt;/strong&gt; &lt;br&gt; Articles 20-25&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Cybersecurity risk-management measures and reporting obligations:&lt;/strong&gt; &lt;br&gt;⚠️ Provides a framework on what measures organizations will need to implement. &lt;br&gt; Also covers how reporting of incidents will take place, and the communication flow between all entities.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Chapter 5&lt;/strong&gt; &lt;br&gt; Articles 26-28&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Jurisdiction and registration:&lt;/strong&gt; &lt;br&gt; Defines who is the authority each entity will respond to. Also adds some requirements for DNS providers, TLD registries and other hosting companies.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Chapter 6&lt;/strong&gt; &lt;br&gt; Articles 29-30&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Information sharing:&lt;/strong&gt; &lt;br&gt; Covers how Member States will communicate and coordinate to flag threats and raise security awareness.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Chapter 7&lt;/strong&gt; &lt;br&gt; Articles 31-37&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Supervision and enforcement:&lt;/strong&gt; &lt;br&gt; ⚠️ Lists how Member States will be able to audit the measures taken by entities and enforce proper implementation. Here, on article 34 is where the fines are defined.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Chapters 8 &amp;amp; 9&lt;/strong&gt; &lt;br&gt; Articles 38-46&lt;/td&gt;
&lt;td&gt;Delegated and implementing acts, and Final provisions.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;As you may have noticed, the security requirements are just a small portion of the directive. A big chunk of it is dedicated to creating a dense network of entities that work together to monitor security incidents, supervise the implementation of security measures, and coordinate efforts to adapt to new threats.&lt;/p&gt;

&lt;p&gt;This network can be split into three blocks. Here is a summarized description, please refer to the full directive to obtain the full context.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc08nq6eska82u4wxneha.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc08nq6eska82u4wxneha.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Every &lt;strong&gt;Member State&lt;/strong&gt; must:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Transpose the directive into &lt;strong&gt;local laws by October 17th (2024)&lt;/strong&gt;, defining the specific requirements entities must comply with.&lt;/li&gt;
&lt;li&gt;Define the &lt;strong&gt;competent authorities&lt;/strong&gt; that will supervise and enforce the directive.&lt;/li&gt;
&lt;li&gt;Define the &lt;strong&gt;CSIRTs&lt;/strong&gt; (Computer Security Incident Response Teams) coordinating the vulnerability disclosures. They can be formed by competent authorities.&lt;/li&gt;
&lt;li&gt;Name a &lt;strong&gt;single point of contact&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;strong&gt;Cooperation Group&lt;/strong&gt; is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Formed by representatives of Member States, the commission, and the European Union Agency for Cybersecurity (ENISA).&lt;/li&gt;
&lt;li&gt;With the intervention of the European Supervisory Authorities (ESAs), the competent authorities, the European Parliament, and representatives of relevant stakeholders.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A &lt;strong&gt;CSIRTs Network&lt;/strong&gt; will also be created:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To promote cooperation among Member States by exchanging information, ensuring interoperability, implementing coordinated responses…&lt;/li&gt;
&lt;li&gt;It’s composed of representatives of the CSIRTs, the Commission as an observer, and assisted by ENISA.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Who is Affected by NIS2?
&lt;/h2&gt;

&lt;p&gt;The following entities are affected by the NIS2 directive and will need to implement security requirements.&lt;/p&gt;

&lt;p&gt;Medium and Big companies the following segments.&lt;/p&gt;

&lt;p&gt;High criticality segments:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;⚡️ Energy: Electricity, district heating and cooling, oil, gas, hydrogen.&lt;/li&gt;
&lt;li&gt;🚅 Transport: Air, rail, water, road.&lt;/li&gt;
&lt;li&gt;🏦 Banking.&lt;/li&gt;
&lt;li&gt;📈 Financial market infrastructures.&lt;/li&gt;
&lt;li&gt;🏥 Health.&lt;/li&gt;
&lt;li&gt;💧 Drinking water.&lt;/li&gt;
&lt;li&gt;🚱 Waste water.&lt;/li&gt;
&lt;li&gt;💻 Digital infrastructure.&lt;/li&gt;
&lt;li&gt;💁🏼 ICT service management (b2b).&lt;/li&gt;
&lt;li&gt;🏢 Public administration.&lt;/li&gt;
&lt;li&gt;🚀 Space.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Other critical sectors:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📨 Postal and courier services.&lt;/li&gt;
&lt;li&gt;🚮 Waste management.&lt;/li&gt;
&lt;li&gt;🧪 Manufacture production and distribution of chemicals.&lt;/li&gt;
&lt;li&gt;🥘 Production, processing and distribution of food.&lt;/li&gt;
&lt;li&gt;🏭 Manufacturing: Medical and in &lt;em&gt;vitro diagnostic&lt;/em&gt; devices, computer electronic and optical products, electrical equipment, machinery and equipment, motor vehicles trailers and semi-trailers, and other transport equipment.&lt;/li&gt;
&lt;li&gt;💻 Digital providers.&lt;/li&gt;
&lt;li&gt;👩🏽‍🔬 Research.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Companies on given segments independent of size:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Providers of electronic communications networks and services.&lt;/li&gt;
&lt;li&gt;Trust service providers and domain name registries.&lt;/li&gt;
&lt;li&gt;Any company that is essential in any way:

&lt;ul&gt;
&lt;li&gt;If they are the sole provider in a Member State of an essential service.&lt;/li&gt;
&lt;li&gt;If a disruption of the service could induce a significant systemic risk.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;The entity is a public administration entity.&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;These entities are also classified by their importance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Essential entities&lt;/strong&gt; are those in the “high criticality segments” and the “companies independent of size”.&lt;/p&gt;

&lt;p&gt;The rest are classified as &lt;strong&gt;Important entities&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This is a summarized description, please refer to the full directive to obtain the full context.&lt;/p&gt;

&lt;h2&gt;
  
  
  NIS2 Fines
&lt;/h2&gt;

&lt;p&gt;The NIS2 doesn’t provide much detail into what fines can be expected. It just defines two maximums and leaves the Member States to provide more detail.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Essential entities:&lt;/strong&gt; administrative fines of a maximum of 10.000.000 €, or 2 % of the total worldwide annual turnover, whichever is higher.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important entities:&lt;/strong&gt; administrative fines of a maximum of 7.000.00 €,  or 1,4 % of the total worldwide annual turnover, whichever is higher.&lt;/p&gt;

&lt;p&gt;This doesn't mean you’ll get fined that much on top of suffering a cyberattack. The directive positions itself as an understanding companion, taking into account your circumstances.&lt;/p&gt;

&lt;p&gt;As long as you demonstrate good faith, by implementing the security requirements, and notifying any incident as soon as you are aware of it; you should be ok.&lt;/p&gt;

&lt;h2&gt;
  
  
  Direct Impact on the Affected Industries
&lt;/h2&gt;

&lt;p&gt;Now that we understand the whole scope of the NIS2 directive, let’s jump into the meat. What does this mean for your business?&lt;/p&gt;

&lt;h3&gt;
  
  
  At the top executive level
&lt;/h3&gt;

&lt;p&gt;One of the biggest changes of NIS2 is that now the management level of a company must be involved in the cybersecurity measures taken.&lt;/p&gt;

&lt;p&gt;This symbolizes the change in paradigm that the directive is pushing for: Cybersecurity must be at the core of any entity from now on, and the top must lead the change.&lt;/p&gt;

&lt;h3&gt;
  
  
  IT / OT departments
&lt;/h3&gt;

&lt;p&gt;For any IT / OT department that already implemented cybersecurity, there aren’t big changes. The requirements from NIS2 are basic or medium cybersecurity best practices.&lt;/p&gt;

&lt;p&gt;However, those industries at the beginning of their cybersecurity journey will need to put in some effort.&lt;/p&gt;

&lt;p&gt;The requirements to implement are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Policies on risk analysis and IT security.&lt;/li&gt;
&lt;li&gt;Incident handling.&lt;/li&gt;
&lt;li&gt;Business continuity (backup and disaster recovery, crisis management).&lt;/li&gt;
&lt;li&gt;Security in network and IT system acquisition, development, and maintenance. Including vulnerability handling and disclosure.&lt;/li&gt;
&lt;li&gt;Policies and procedures to assess the effectiveness of cybersecurity risk-management measures.&lt;/li&gt;
&lt;li&gt;Basic cyber hygiene practices and cybersecurity training.&lt;/li&gt;
&lt;li&gt;Policies and procedures regarding the use of cryptography and, where appropriate, encryption.&lt;/li&gt;
&lt;li&gt;Human resources security, access control policies, and asset management.&lt;/li&gt;
&lt;li&gt;The use of multi-factor authentication or continuous authentication solutions, secured voice, video and text communications, and secured emergency communication systems within the entity, where appropriate.&lt;/li&gt;
&lt;li&gt;Application of coordinated security risk assessment.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The main concern right now is how the Member States will adapt these guidelines into concrete requirements. Will they opt for an easy-to-comply regulation or stand up to the challenge and build comprehensive regulation? We’ll hopefully know on October 17th.&lt;/p&gt;

&lt;h3&gt;
  
  
  Supply Chain
&lt;/h3&gt;

&lt;p&gt;One of the new aspects of NIS2 is securing the supply chain, regarding technology providers.&lt;/p&gt;

&lt;p&gt;This is, securing the relationship between yourself, and anyone that provides you with services like hardware, cloud services, internet domains, email services…&lt;/p&gt;

&lt;p&gt;The supply chain has been a major target for attackers. Regarding industry, one of the main attack vectors is identity theft via email. For example, an attacker may gain access to an email account, gather information for a while, then impersonate one of your providers and send invoices to be paid (to their bank account).&lt;/p&gt;

&lt;p&gt;Another growing attack vector is vulnerabilities in hardware devices. More and more devices in a production plant need a network connection. However, not all providers implement security best practices.&lt;/p&gt;

&lt;p&gt;The directive’s heart is in a good place, but this part has quite a broad description. Let’s hope local laws scope properly this aspect of NIS2.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reporting
&lt;/h3&gt;

&lt;p&gt;The star of NIS2 is reporting security incidents. We mentioned earlier that one of the motivators for fines will be not reporting a security incident on time.&lt;/p&gt;

&lt;p&gt;The directive puts the focus on coordinating several local entities to see the big picture and being proactive in assisting by detecting threats. But to reach that goal, you need an “&lt;strong&gt;early warning system&lt;/strong&gt;" driven by organizations reporting every security incident as it’s discovered.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Entities will be required to report significant incidents to the competent authority&lt;/strong&gt;, who will forward them to the CSIRT. An incident is considered as significant if it caused or is capable of causing either severe operational disruption or financial loss; or if it affects natural or legal persons by causing material or non-material damage.&lt;/p&gt;

&lt;p&gt;The timing will also be important:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Incidents must be reported &lt;strong&gt;within 24 hours of becoming aware&lt;/strong&gt;. On this initial report, you should include suspicions of the incident being unlawful, or malicious, or having a cross-border impact.&lt;/li&gt;
&lt;li&gt;You must update within 72 hours with an initial assessment including the severity of the incident, the impact, and indicators of compromise.&lt;/li&gt;
&lt;li&gt;You may also need to report if requested by the CSIRT or competent authority with relevant status updates.&lt;/li&gt;
&lt;li&gt;A final report will be needed within 1 month with a detailed description of the incident, the type of threat or root cause, the mitigation measures taken, and the cross-border impact.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Reporting is rather concrete in the NIS2 directive, we are only waiting for local authorities to define the actual format and communication method of the reports.&lt;/p&gt;

&lt;h3&gt;
  
  
  Inspections
&lt;/h3&gt;

&lt;p&gt;And finally, the directive takes into account inspections and audits, as no norm is worth it unless it’s properly enforced.&lt;/p&gt;

&lt;p&gt;Competent authorities can perform on-site inspections and targeted security audits, and may request any information and evidence of implementation of cybersecurity policies.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The European NIS2 directive is a needed regulation to ensure the safety of essential resources in Europe.&lt;/p&gt;

&lt;p&gt;Its scope is ambitious, expanding from just security requirements by building a whole network of entities that will safeguard strategic organizations.&lt;/p&gt;

&lt;p&gt;However, the federated nature of the European Union makes implementation one bit more challenging. The Member States now need to adapt the directive to local laws, and we won’t know the concrete details of the regulation until they do.&lt;/p&gt;

&lt;p&gt;This uncertainty is far from desirable, moreover when such high fines are on the table, but keep in mind the understanding companion nature of the directive. If you are worried about it, start implementing cybersecurity best practices, you’ll both demonstrate good faith and be protected.&lt;/p&gt;

</description>
      <category>security</category>
      <category>industrial</category>
      <category>compliance</category>
      <category>nis2</category>
    </item>
    <item>
      <title>Good Security Boosts Your Flow</title>
      <dc:creator>Víctor Jiménez Cerrada</dc:creator>
      <pubDate>Wed, 02 Oct 2024 10:17:37 +0000</pubDate>
      <link>https://dev.to/capitangolo/good-security-boosts-your-flow-fl5</link>
      <guid>https://dev.to/capitangolo/good-security-boosts-your-flow-fl5</guid>
      <description>&lt;p&gt;Everyone agrees that implementing security is necessary. However, it’s often seen as throwing a spanner in the works, slowing down your momentum.&lt;/p&gt;

&lt;p&gt;Delaying security gives a false sense of speed. Yes, you go faster and have less to worry about, but it will always come back to bite you. The moment a critical security incident shows up, it will stop you completely, you may receive substantial fines, and you will definitely suffer an impact on your reputation.&lt;/p&gt;

&lt;p&gt;This argument is widely known, and still companies assume the risks, so let’s try a new approach in this article:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When security is implemented correctly, it boosts your operations speed.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A good approach to security motivates you to follow best practices in many areas. As a result, you end up streamlining many processes, improving your efficiency.&lt;/p&gt;

&lt;p&gt;Such a paradigm change requires some time to adapt. But done right, you should only slow down for a short period and then proceed to be faster than ever.&lt;/p&gt;

&lt;p&gt;So, where does this &lt;em&gt;“momentum killer”&lt;/em&gt; reputation that security has come from?&lt;/p&gt;

&lt;p&gt;Most of the time, it comes down to flaws when adapting. For example, overlooking some processes that don’t fit the new paradigm or not providing enough training to workers. You suddenly find yourself with a workforce that is no longer confident; thus, things don’t work as they should.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why is a Radical Change Needed?
&lt;/h2&gt;

&lt;p&gt;Well, the world has changed. When compared to a couple of decades ago, everything is connected now, and we have a huge attack surface.&lt;/p&gt;

&lt;p&gt;At a personal level, we went from a laptop to also owning a mobile phone, a tablet, a watch, a TV, and other home appliances that all connect to the internet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwll7tf1sb1v5qsawvwc2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwll7tf1sb1v5qsawvwc2.png" alt="Two mobile phones, one old one, one iphone 3gs. A big technological change has occurred in the last decades." width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Companies are hosting their servers in fewer instances, increasingly leveraging cloud services. Plus, remote working is a thing now. You not only have to keep in mind your office’s security but also the one at your employees’ homes.&lt;/p&gt;

&lt;p&gt;And the industry is more connected than ever. Production lines are now filled with PLCs and sensors that can be monitored from a control room. Machine manufacturers now request remote access to machines so technicians can perform maintenance without driving to the factory.&lt;/p&gt;

&lt;p&gt;This interconnected world has plenty of advantages, and we love it. However, we sometimes forget how radical this change has been.&lt;/p&gt;

&lt;p&gt;The more connected we are, the more important cybersecurity is. And &lt;strong&gt;we placed connectivity at the core of our lives and businesses, so cybersecurity should be as well&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;But… I’m just a medium-small company. Who is gonna target me?&lt;/p&gt;

&lt;p&gt;Well, attackers have changed too. Attacks are now mostly indiscriminate and automated, driven by botnets that restlessly scrape the internet. It doesn’t matter who you are.&lt;/p&gt;

&lt;p&gt;You can easily test this. Leave unprotected remote access to a machine connected to the internet and monitor the access logs. How long do you think it will take for attackers to start pinging the door? The last time I tried it, it took only seconds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It is no longer a matter of “if” you are going to be attacked but a matter of “when.”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The world has made a fundamental change comparable to the industrial revolution without us realizing it. Now, we need to adapt to radical changes if we want to survive.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adapting to Change is key to Success
&lt;/h2&gt;

&lt;p&gt;If you implemented security from the start, you are lucky. You probably are following best practices, and you had time to slowly tweak and improve processes.&lt;/p&gt;

&lt;p&gt;However, if you are like most, you find yourself at a point where a big step up in security is required. Maybe you need to conform to a new security compliance standard in a short time frame, you thought your security was enough, and now you realize the journey ahead of you is more than you expected.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd8w5buzibu1o2lzmnwrr.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd8w5buzibu1o2lzmnwrr.jpg" alt="A construction building in Tokyo. Japanese cities are constantly adapting to a new world." width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Don’t worry, you are not alone.&lt;/p&gt;

&lt;p&gt;This happens to every company sooner or later; there is a lot of expertise on the topic, and the road is already paved.&lt;/p&gt;

&lt;p&gt;The key to success will be your ability to adapt quickly.&lt;/p&gt;

&lt;p&gt;Don’t fight it, you’ll end up implementing security halfway, many things won’t work, your employees will feel uncertainty, and overall, you’ll feel like you are slowing down.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Embrace security as a centerpiece of your strategy&lt;/strong&gt; and take the time to do things right:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Place cybersecurity as a core pillar of your company.&lt;/li&gt;
&lt;li&gt;Drive the changes from the top level.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s not enough to have a cybersecurity team pushing for the changes. You need the support of the top level, leading by example. It’s the only way the whole company will take this seriously, and people will get invested in doing things properly. After all, why will someone take care of cybersecurity if that’s the responsibility of another team? The message must be &lt;strong&gt;“We are all on the same boat.”&lt;/strong&gt; A cybersecurity team can lead the way, but everyone must do their part.&lt;/p&gt;

&lt;p&gt;Once the company culture is on the right path, it’s time to get to work.&lt;/p&gt;

&lt;p&gt;Take your time to analyze the areas and processes that will need to change, and dedicate enough effort to empower your workers so they can work confidently under the new paradigm.&lt;/p&gt;

&lt;p&gt;Some tips for this phase:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Re-evaluate processes and make them easier to follow.&lt;/li&gt;
&lt;li&gt;Identify manual tasks and automate them as much as possible. Reduce the chance of errors that may compromise your security.&lt;/li&gt;
&lt;li&gt;Work closely with each area to understand how they work. Don’t impose on them; it will feel like you are telling them how to do their work. If a security policy slows them down, look for solutions as a team.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The moment your workers have the right tools and processes are clear and ironed out; they will feel more confident and more effective than ever at their work.&lt;/p&gt;

&lt;h2&gt;
  
  
  You’ll Need Good Security Tools
&lt;/h2&gt;

&lt;p&gt;One of the perks of implementing security nowadays is that you have access to a plethora of security tools that already solve most of the challenges you face. You’ll just need to identify those that are best for you.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F78icmazmbt6lrk4cdtvw.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F78icmazmbt6lrk4cdtvw.jpg" alt="A spoon holding a market stall in Galway, Ireland. The spoon is failing. You need the right tool for the job." width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A quick tip: &lt;strong&gt;Security tools must understand your workflow and work with you instead of against you&lt;/strong&gt;. Look for things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Integrating security with your systems should be straightforward.&lt;/li&gt;
&lt;li&gt;Security tools must provide you with the insights and reports you need right away.&lt;/li&gt;
&lt;li&gt;Out-of-the-box detection rules and compliance controls must cover most of the threats, reducing onboarding and customization to a minimum.&lt;/li&gt;
&lt;li&gt;Alerts must be precise. A false positive in an industrial facility may translate into stopping production.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A good security tool saves you time by guiding you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It works ahead of you, assisting you prevent issues before they are incidents and proposing remediation and mitigation actions.&lt;/li&gt;
&lt;li&gt;It cuts through the noise, highlighting the areas in need of immediate attention.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And finally, a &lt;strong&gt;good security tool treats security as a whole&lt;/strong&gt; instead of focusing on a single problem. Attacks nowadays are complex, and you’ll need to correlate insights from several sources to detect them. The bigger the scope of your security tool, the more threats it will be able to detect.&lt;/p&gt;

&lt;p&gt;If security is integrated every step of the way, you can stop thinking about security and focus on your work. This will work towards our goal of being faster than without security tools.&lt;/p&gt;

&lt;p&gt;Let’s see a few concrete examples of features on security tools that can boost your flow.&lt;/p&gt;

&lt;h3&gt;
  
  
  Asset Auto-Discovery
&lt;/h3&gt;

&lt;p&gt;Think of a cloud environment where you can have dozens of services. Or an industrial facility with hundreds of devices connected to a production line.&lt;/p&gt;

&lt;p&gt;Keeping a manual inventory is a time-wasting endeavor. And it’s also error-prone, as some changes may be overlooked.&lt;/p&gt;

&lt;p&gt;By contrast, a security tool can auto-discover all the network devices in a facility and automatically check compliance against them.&lt;/p&gt;

&lt;p&gt;Then, you can focus on installing new devices. If a worker commits a mistake while setting a device, it will be easily recoverable; your security tool will find it, and it will be fixed soon enough.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tracking Compliance Progress
&lt;/h3&gt;

&lt;p&gt;When you are implementing compliance, the traditional way of reporting on progress is to manually check each of the requirements. Although you can automatize some of these checks, it’s another time-wasting process.&lt;/p&gt;

&lt;p&gt;Moreover, what happens if a configuration change makes some assets fall out of compliance? When will you notice?&lt;/p&gt;

&lt;p&gt;A good security tool will provide automation out-of-the-box for you. It will go even further, running checks periodically so you always have an up-to-date view of your compliance score, and suggesting remediation steps to assist you in meeting the requirements.&lt;/p&gt;

&lt;p&gt;Your teams will spend less time doing checks and more time progressing toward compliance.&lt;/p&gt;

&lt;h3&gt;
  
  
  Continuous Vulnerability Management
&lt;/h3&gt;

&lt;p&gt;A final example is vulnerability management.&lt;/p&gt;

&lt;p&gt;It’s just too much work to constantly check for new vulnerabilities and manually check which of your resources is vulnerable.&lt;/p&gt;

&lt;p&gt;However, a good security tool can do this automatically and continuously for you. It can even gather context from your environment to prioritize which vulnerabilities pose a higher risk for you and provide mitigation steps for your team.&lt;/p&gt;

&lt;p&gt;Instead of performing painful manual checks, your team will be acting directly on the areas that will make a bigger impact. That’s vastly more rewarding.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Times have changed, and now cybersecurity must be at the very core of every business.&lt;/p&gt;

&lt;p&gt;Resisting this change turns into half-assed implementations that slow down companies.&lt;/p&gt;

&lt;p&gt;However, when security is integrated properly, you end up streamlining processes and growing your toolset. Good security tools also provide great insights that anticipate your needs and make you go faster.&lt;/p&gt;

</description>
      <category>security</category>
      <category>otspm</category>
      <category>industrial</category>
    </item>
  </channel>
</rss>
