WEBVTT

00:00:02.050 --> 00:00:06.420
In our first demo, we'll run Dependency‑Check on an installed Java application,

00:00:06.430 --> 00:00:08.700
Apache Solr, to see how it works.

00:00:09.710 --> 00:00:13.020
We'll focus on the output report and discuss how to read it in its

00:00:13.020 --> 00:00:16.190
default HTML form before seeing how we can configure

00:00:16.190 --> 00:00:18.810
Dependency‑Check to output a different file format.

00:00:20.480 --> 00:00:24.280
The background here is that the Globomantics search team are not quite

00:00:24.280 --> 00:00:27.490
sure which version of Solr they have installed on their search server, but

00:00:27.490 --> 00:00:29.340
they have a feeling it might be out of date.

00:00:29.980 --> 00:00:32.210
They know there are nasty vulnerabilities out there

00:00:32.220 --> 00:00:33.940
in some older versions of Solr,

00:00:34.140 --> 00:00:36.910
including the Log4Shell vulnerability that we mentioned earlier.

00:00:37.280 --> 00:00:41.050
So they've asked if we can use OWASP Dependency‑Check to take an inventory

00:00:41.050 --> 00:00:45.140
of what's installed and figure out whether they need to update Solr, and if

00:00:45.140 --> 00:00:51.040
so, how urgently. Now that it's installed and made available in our path,

00:00:51.050 --> 00:00:53.160
running Dependency‑Check is simple.

00:00:53.970 --> 00:00:58.070
We just need to call cependency‑check and then pass the directory that we

00:00:58.070 --> 00:01:03.080
want to scan using the ‑‑scan option. In our demo, we want to scan the

00:01:03.080 --> 00:01:06.740
Apache Solr installation directory, and on this server that's found at

00:01:06.740 --> 00:01:10.520
C:/solr, so the command will look like this.

00:01:12.340 --> 00:01:14.880
We've opened a terminal inside the search server, and

00:01:14.880 --> 00:01:16.420
we'll go ahead and run that command.

00:01:17.000 --> 00:01:19.350
You'll see some informational messages appearing in the

00:01:19.350 --> 00:01:23.490
output as Dependency‑Check starts working. If you're

00:01:23.490 --> 00:01:24.760
running this for the first time,

00:01:24.860 --> 00:01:28.260
it is going to begin by downloading a local copy of those vulnerability

00:01:28.260 --> 00:01:32.620
databases that I mentioned earlier, and this may take several minutes, so I'm

00:01:32.620 --> 00:01:38.170
going to speed this clip up quite a bit. Once that's done,

00:01:38.180 --> 00:01:41.770
you'll see a flurry of additional messages about analyzers finishing or

00:01:41.770 --> 00:01:46.950
not being found followed by Analysis Complete and a note about where the

00:01:46.950 --> 00:01:51.640
report file was written. By default, it's written as an HTML file into

00:01:51.640 --> 00:01:52.990
our current working directory.

00:01:54.840 --> 00:01:59.820
Open that report in the browser of your choice, and here's how it looks. At

00:01:59.820 --> 00:02:02.240
the top, there's some high‑level stats about the scan,

00:02:02.360 --> 00:02:04.440
including the number of dependencies that were scanned,

00:02:04.450 --> 00:02:07.650
how many vulnerabilities were found, and we then have a summary table, which

00:02:07.650 --> 00:02:10.370
lists all of the dependencies that were found to be vulnerable.

00:02:11.480 --> 00:02:14.850
The first three columns identify the dependency by name

00:02:14.850 --> 00:02:16.640
and version in a few different formats.

00:02:17.230 --> 00:02:17.930
For example,

00:02:17.930 --> 00:02:22.410
you can see that the file angular.min.js was found and that it was

00:02:22.420 --> 00:02:28.940
identified to be version 1.8.0 of the JavaScript package AngularJS.

00:02:28.940 --> 00:02:33.900
The Highest Severity column gives you a description of how severe

00:02:33.900 --> 00:02:37.540
the most serious vulnerability known to exist in that version of the

00:02:37.540 --> 00:02:41.110
package is, low, medium, high or critical.

00:02:42.400 --> 00:02:45.150
The CVE Count column tells you how many

00:02:45.150 --> 00:02:47.480
vulnerabilities were found in that dependency.

00:02:50.450 --> 00:02:56.890
If we scroll down this list, we can see log4j‑core‑2.14.1 Critical

00:02:56.890 --> 00:03:00.620
severity, confirming our suspicions that the version of Solr deployed

00:03:00.620 --> 00:03:03.640
here is susceptible to the Log4Shell vulnerability.

00:03:04.450 --> 00:03:07.430
We'll have to tell the Globomantics team to update their Apache Solr

00:03:07.430 --> 00:03:12.950
installation urgently. If we click on the dependency name,

00:03:12.960 --> 00:03:16.130
we get taken to a more detailed report about that dependency and

00:03:16.130 --> 00:03:17.810
the vulnerabilities that were found in it.

00:03:18.360 --> 00:03:20.170
There's a description of the dependency,

00:03:20.310 --> 00:03:23.440
a license if one could be identified, and more information

00:03:23.440 --> 00:03:27.370
about the specific file found. The really important bit here

00:03:27.370 --> 00:03:29.050
is Published Vulnerabilities.

00:03:29.200 --> 00:03:31.690
This section lists details on all known

00:03:31.690 --> 00:03:34.510
vulnerabilities associated with this package.

00:03:35.080 --> 00:03:37.970
Vulnerabilities are listed by their unique identifier,

00:03:38.020 --> 00:03:42.640
which is usually a CVE, or Common Vulnerability Enumeration.

00:03:43.290 --> 00:03:46.910
The first four digits indicate the year the vulnerability was disclosed.

00:03:48.520 --> 00:03:51.070
We then have a description of the vulnerability and some

00:03:51.070 --> 00:03:55.060
information about the severity in the form of CVSS scores.

00:03:55.060 --> 00:03:56.930
We'll explore those a bit more later.

00:03:58.670 --> 00:04:01.560
If you want additional information about the vulnerability,

00:04:01.730 --> 00:04:06.380
the References section contains some useful links. Clicking on the CVE

00:04:06.380 --> 00:04:09.680
itself will take you to the vulnerability database that it came from,

00:04:09.800 --> 00:04:12.340
which may have other helpful information or links.

00:04:14.630 --> 00:04:18.880
The HTML report is a helpful way for a human to review the output, but there

00:04:18.880 --> 00:04:25.710
are other output options too, XML, CSV, JSON, JUnit, and SARIF, and you can

00:04:25.710 --> 00:04:28.140
have a scan right to multiple formats if you like.

00:04:28.870 --> 00:04:35.620
Let's write out a JSON file. We can do that with ‑‑format JSON, in

00:04:35.620 --> 00:04:41.540
uppercase. As well as the format, we can also control the output file

00:04:41.540 --> 00:04:50.220
name with the ‑‑out command. Let's call this solr‑report.json. This

00:04:50.220 --> 00:04:52.940
command will finish much quicker now that the database is already

00:04:52.940 --> 00:04:54.770
downloaded, and once it does,

00:04:54.770 --> 00:05:00.750
you can see that solr‑report.json has been created. Opening

00:05:00.750 --> 00:05:03.310
it up, the JSON report contains all of the same information

00:05:03.310 --> 00:05:04.850
that we saw in the HTML report,

00:05:04.990 --> 00:05:10.260
but in a more machine readable format. In this demo,

00:05:10.260 --> 00:05:13.260
we've been using Dependency‑Check as a security assessment tool

00:05:13.260 --> 00:05:15.810
to scope out an off‑the‑shelf application.

00:05:16.030 --> 00:05:19.550
It's definitely given us some helpful insight, so there's not too much we can

00:05:19.550 --> 00:05:22.650
do about the results other than to upgrade our installation.

00:05:23.580 --> 00:05:24.860
In the next clip, though,

00:05:24.870 --> 00:05:27.550
we'll apply a Dependency‑Check to a code base that we have

00:05:27.550 --> 00:05:30.910
ownership over and we'll start to get a picture of how valuable

00:05:30.910 --> 00:05:33.630
this tool can be for continuous security.
