Browse Source

Show any world writable files

Bob Mottram 8 years ago
parent
commit
c7d31702b4
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      tests/output.sh

+ 2
- 1
tests/output.sh View File

1591
                   printf '\n######################\n\nSTIG-ID:RHEL-06-000281\n\nVulnerability Discussion: The hash on important files like audit system executables should match the information given by the packages. Audit executables with erroneous hashes could be a sign of nefarious activity on the system.\n\nFix text: In Debian there is directly way to get the package\047s hash and change it.\n\nThere\047s one way to use :\n\n#aptitude download auditd\n\nTo dowanload the package\047s file and use dpkg -c <package.deb> to extract it and use sha512sum to get the origin hash and compare with the current hash and change it manually\n\n' >> $LOG
1591
                   printf '\n######################\n\nSTIG-ID:RHEL-06-000281\n\nVulnerability Discussion: The hash on important files like audit system executables should match the information given by the packages. Audit executables with erroneous hashes could be a sign of nefarious activity on the system.\n\nFix text: In Debian there is directly way to get the package\047s hash and change it.\n\nThere\047s one way to use :\n\n#aptitude download auditd\n\nTo dowanload the package\047s file and use dpkg -c <package.deb> to extract it and use sha512sum to get the origin hash and compare with the current hash and change it manually\n\n' >> $LOG
1592
               fi
1592
               fi
1593
               ;;
1593
               ;;
1594
-    V-38643)  if [ "$3" = "en" ]; then
1594
+    V-38643)  find / -xdev -type f -perm -002
1595
+              if [ "$3" = "en" ]; then
1595
                   log_msg $2 'There must be no world-writable files on the system.'
1596
                   log_msg $2 'There must be no world-writable files on the system.'
1596
               else
1597
               else
1597
                   log_msg $2 '系统上必须没有允许任意用户都可以进行修改的文件。'
1598
                   log_msg $2 '系统上必须没有允许任意用户都可以进行修改的文件。'