Testing this out under Kali using Zen script, correct me if I am wrong but Ubuntu would be the one to use not debian if using Kali? Either way nessus works, script works.. chattr for immutable seems to be the same for both. BUT! If I restart nessus between this it's showing "unregistered" even though plugin_feed_info has not changed. Anyone can reproduce this? I think the plugin folder is not immutable and something is happening there during a restart of nessus.
EDIT: now while doing a scan on a /24 Nessus died part way in the scan, which means this will take place again... running the last few steps of the script where the plugins are re-downloaded recompiled, and the attributes are re-set ofc fixes it but, you imagine the changes would persist through a reboot... maybe after plugins are compiled that directory should also be immutable?