This is an old revision of the document!
Auditing an Ubuntu System for DISA-STIG compliance -
link Detail sudo apt-get install libopenscap8
oscap -v
oscap -V
sudo apt install ubuntu-advantage-tools
sudo ua attach sdfsdf
sudo ua enable usg
sudo apt install usg -y
sudo oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_cis_level1_server --results-arf arf.xml --report $1 /usr/share/ubuntu-scap-security-guides/1/benchmarks/ssg-ubuntu2004-ds.xml
mkdir report
sudo usg generate-tailoring disa_stig tailor.xml
# Audit using the new tailoring file
sudo usg audit --tailoring-file tailor.xml
# Fix using the new tailoring file
# USG fix: Proceed with extreme caution. Document all steps.
# CAUTION! usg fix --tailoring-file tailor.xml
# generate fix.file for cis_level1_server
sudo usg generate-fix cis_level1_server --output fix.sh
sudo oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_cis_level1_server --results-arf arf.xml --report ./rep /usr/share/ubuntu-scap-security-guides/1/benchmarks/ssg-ubuntu2204-ds.xml > oscap_result_$(date +"%y%m%d").txt