Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firewall not enabled wrong sratus #6

Open
Quorum75 opened this issue Apr 28, 2023 · 1 comment
Open

Firewall not enabled wrong sratus #6

Quorum75 opened this issue Apr 28, 2023 · 1 comment

Comments

@Quorum75
Copy link

Scan result says that the firewall isn't enabled although it is wrong.

@sametsazak
Copy link
Owner

The firewall check module is using "➜ ~ defaults read /Library/Preferences/com.apple.alf globalstate" command with globalstate parameter.

Can you share your output and which OS version that you are using? @Quorum75

Here is how it's defined in CIS benchmark:

$ /usr/bin/sudo /usr/bin/osascript -l JavaScript << EOS
function run() {
let pref1 =
ObjC.unwrap($.NSUserDefaults.alloc.initWithSuiteName('com.apple.alf')
.objectForKey('globalstate'))

let pref2 =
ObjC.unwrap($.NSUserDefaults.alloc.initWithSuiteName('com.apple.security.fire
wall')
.objectForKey('EnableFirewall'))
if ( ( pref1 == 1 ) || ( pref1 == 2 ) || ( pref2 == "true" ) ) {
return("true")
} else {
return("false")
}
}
EOS
true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants