Score:0

OSCAP doesn't work for remediation on Ubuntu 18.04 install

dz flag

my oscap for ubuntu 18.04 doesn't remediate with the commands or through the gui through the scap workbench

oscap xccdf eval --remediate -profile profilename xmlfilename

this checks and shows the results for each STIG configuration, but then at the end of the output from the command it shows

---starting remediation---

but never performs the remediation

do I need the ubuntu advantage subscription for oscap to work?

Becker avatar
us flag
Can you post exactly the command you are running? What is the output for a command like: `oscap xccdf generate fix --profile xccdf_org.ssgproject.content_profile_stig xmlfile`
cn flag
I am root when I run the command, here is the full command: root@hostname:/opt# oscap xccdf eval --remediate --profile xccdf_mil.disa.stig_profile_MAC-3_Classified --results scan-xccdf-results.xml U_CAN_Ubuntu_18-04_V2R3_STIG_SCAP_1-2_Benchmark.xml It checks all the settings in the STIG successfully, but then outputs "---Starting Remediation---" but never actually does the remediation. When I do oscap xccdf generate fix --profile xccdf_org.ssgproject.content_profile_stig xmlfile it says FIX FOR THIS RULE IS MISSING. Not sure what that would mean
Score:1
us flag

Have you executed the command with elevated rights?

OSCAP as a product makes various changes to protected files, which means you need to execute the command as sudo.

Edit: Since you replied with the whole command and the whole error message, the most probable cause is that there is no fix yet supplied for that specific rule, you can try ignoring that rule from running and that would help you generate the remediation.

Score:0
us flag

The SCAP file you are using U_CAN_Ubuntu_18-04_V2R3_STIG_SCAP_1-2_Benchmark.xml doesn't contain any remediations. It contains only OVAL checks, so it can only check the configuration but not fix them in case it's incorrect.

For SCAP content that includes also remediation/fixes you can use contents provided by https://github.com/ComplianceAsCode/content/

in the releases page (latest release available: https://github.com/ComplianceAsCode/content/releases/download/v0.1.57/scap-security-guide-0.1.57.zip) you should be able to download the datastream for Ubuntu. But the STIG profile is only available to Ubuntu20.04

Then you can run:

oscap xccdf eval --remediate --profile xccdf_org.ssgproject.content_profile_stig ssg-ubuntu2004-ds.xml

But please be aware that this is a community driven project and may not be aligned 100% with content provided by DISA.

Becker avatar
us flag
DISA also provides ansible content for Ubuntu1804. You may want to have a look: https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_CAN_Ubuntu_18-04_LTS_V2R2_STIG_Ansible.zip
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.