What is SCAP Workbench?
The old workbench scanning a local machine |
Why the rewrite? The workbench is perfect!
Working prototype
Requirements
- cmake
- Qt4
- QtWebKit
- openscap from git
Notable changes
Using the oscap tool for all scanning
Previously, we used the openscap library’s API to perform the scan. That is done using the oscap scanner in the new version. There are several reasons why this is a good idea. For one we can have just one heavily tested code that does evaluation and rely on it for both tools. Also if the oscap scanner gets certified the workbench ends up using a certified scanner which may be valuable for users. [5]
High level API from openscap
This is done for the workbench to be less likely to break with openscap API changes. The old workbench used to suffer very frequently from this.
Remote scanning
Old workbench can only scan the machine it was running on. The new workbench allows users to scan any remote machine with accessible ssh. It will ssh into a remote machine and run oscap there. oscap scanner must be installed on that machine in order to do that.
Results are fetched back to the machine with workbench for analysis.
Datastream support
SCAP Workbench used to only support XCCDF. The prototype allows you to open a source datastream and select any checklist inside. Going forward, datastreams are the preferred way of exchanging SCAP content so it is essential that workbench supports them.
Remediation
Workbench did not enable users to fix a system so that a rule passes. Since support for remediation has been added to openscap recently, we can simply use the oscap tool to perform it.
So far only online remediation is implemented for both local and remote scans.
The new workflow
When opened, the application immediately pops a file open window and will close itself if user cancels. A file has to be opened at all times in the new workbench. Majority of the work is done in the main window of the application.
Datastream opened in the new workbench |
New workbench scanning |
Results are shown in a separate modal dialog, as is the option to save them in one of the 3 formats.
SCAP Workbench and its result viewer (uses WebKit) |
Future plans
Proper tailoring
Currently, SCAP Workbench doesn’t follow the specification when it comes to XCCDF profile tailoring. It changes profiles directly instead of tailoring them even though the feature is called Tailoring in the tool. The new workbench will work with tailoring files and will correctly inherit the profile to tailor it.
This has been enabled by improvements in openscap that allows profile inheritance and name shadowing.
Thanks for the post. I followed it, but I am having trouble compiling your sources. I use Fedora 17, 64 bit. After installing openscap (tried both from packages, and from the git source), and the mentioned dependencies here is what I get.
Could you please have a look and tell me any idea on how to fix it? Thanks a lot.
[user@fedora17 scap-workbench]$ cmake CMakeLists.txt
— The CXX compiler identification is GNU 4.7.2
— Check for working CXX compiler: /usr/bin/c++
— Check for working CXX compiler: /usr/bin/c++ — works
— Detecting CXX compiler ABI info
— Detecting CXX compiler ABI info – done
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:97 (MESSAGE):
Could NOT find OpenSCAP (missing: LIBOPENSCAP_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:288 (_FPHSA_FAILURE_MESSAGE)
cmake/FindOpenSCAP.cmake:21 (find_package_handle_standard_args)
CMakeLists.txt:7 (find_package)
— Configuring incomplete, errors occurred!
[user@fedora17 ~]$ oscap -V
OSCAP util (oscap) 0.9.7
Copyright 2009–2013 Red Hat Inc., Durham, North Carolina.
==== Supported specifications ====
XCCDF Version: 1.2
OVAL Version: 5.10.1
CPE Version: 2.3
CVSS Version: 2.0
CVE Version: 2.0
Asset Identification Version: 1.1
Asset Reporting Format Version: 1.1
==== Paths ====
Schema files: /usr/local/share/openscap/schemas
Schematron files: /usr/local/share/openscap/xsl
Default CPE files: /usr/local/share/openscap/cpe
Probes: /usr/local/libexec/openscap
Hi, first of all, I discourage doing in-source builds with cmake (or any tool, really). Out of source is just way cleaner and more manageable.
$ cd scap-workbech
$ mkdir build; cd build
$ cmake ../
$ make -j 4
The reason why it doesn’t work could be that your openscap install prefix is /usr/local instead of /usr. You can tell cmake to look for openscap there by setting the LIBOPENSCAP_INCLUDE_DIR and related variables. A convenient way to do this is via the cmake-gui tool.
(in scap-workbench/build)
$ cmake-gui ../
You have to check the “Advanced” checkbox in the GUI to see LIBOPENSCAP related cmake variables.
Hi, I have likely fixed the problem you were having in https://github.com/mpreisler/scap-workbench/commit/b367881226791d6035ffbe389708c5d4088a88fa
Could you please try to pull these changes and confirm that it configures correctly?
Martin.. I’m in the same boat — but do not have cmake-gui available — is there a way to specify the paths for the openscap libraries and include files directly on the command line? I’m stumped — never used cmake before.. ugg!!
I forgot to mention that I’m using the latest version with your above mentioned update in-place.
Hi,
try:
cmake -D LIBOPENSCAP_INCLUDE_DIR=/usr/include/openscap -D LIBOPENSCAP_LIBRARY=/usr/lib64/libopenscap.so
Replace the directory and the library path with your respective paths of course.
Thanks Martin.. I was able to get it working with a slight tweak from your suggestion.. I had to move the “../” to the end of the cmake line so it came out as shown below when building in a new build tree as indicated in the README :
% cmake -D LIBOPENSCAP_INCLUDE_DIR=/usr/include/openscap -D LIBOPENSCAP_LIBRARY=/usr/lib64/libopenscap.so ../
Hi,
I am having a lot of trouble trying to get the results of my scans to use CVE’s rather than CPE’s. I am currently using SCAP Workbench. Can you please provide some guidance as to how this can be achieved?
Thank you,
I recommend using the public OpenSCAP mailing list. Check out http://www.open-scap.org/resources/support/ – I am sure we can help you out!
Hi,
I want to install SCAP Workbench in debian 8 jessie but no found.
Where can find ?
Hi, check out https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=750138