hit counter
   
 

Random ramblings of a paranoid git
"The question is not if you are paranoid, it is if you are paranoid enough."


All | Security | Work | Wine & Dine | Leisure

   
   
20040826 Thursday August 26, 2004
A new Solaris auditing feature
Permalink | Comments [2] | 2004-08-26 03:22

I thought I'd mention a new audit feature which is available in Solaris Express, and I haven't seen anyone else mention it, but it could be that most people aren't paranoid enough to be thrilled about this new feature.

Audit plugins

One of the issues with the audit trail, is that it is written to (locally accessible) disk, so if you get a root compromise you are toast! The intruder can just stop auditing and delete the audit trail, and you'll never figure out what happened.

My fellow paranoiacs can now rest a bit easier, you can use the new audit_syslog(5) plugin, which does realtime conversion of Solaris audit data to syslog messages. This means that you can send the audit trail to a remote system where the attacker can't get at them, at least not at once.

By adding the following line to your audit_control file, you will send all login/logout events and all failed file modifications:

plugin: name=audit_syslog.so;p_flags=lo,-fm

You have to configure your local syslogd to forward those log entries, with the facility code of LOG_AUDIT and severity of LOG_NOTICE, to your secure syslog server.

Note that since syslog messages have a max length of 1024 bytes, the log entries may be truncated. The audit_syslog plugin tries to retain as much information as possible, by truncating paths from left and other text from right.

   
 
Comments:

This is certainly useful as the problem you mentioned in the blog is real and serious. Although I don't think syslog is the best solution since it uses UDP for transport so delivery is not guaranteed . Also messages can be easily spoofed and the truncation problem is nasty. Plus you would probably need something different from auditreduce and the rest of standard audit commands to parse these audit trails embedded in syslog. So although functional this method doesn't look polished/integrated enough I think of two other variants that are a little more complicated to setup but seem clean 1) For Solaris 10: don't do anything in the global zone. Put anything into a nonglobal zone and do the logging from the global zone. If one becomes root in the nonglobal zone s/he can't access the log or stop the audit daemon. If we assume the barrier between zones cannot be crossed no matter what this is a good method. The possible downside for some people is that you need to put everything in a nonglobal zone for every log client. 2) Other Solaris versions: Have a log server on which create a special RBAC user which can only execute a script. No other rights (uncomment the "AUTHS_GRANTED and PROFS_GRANTED in /etc/security/policy.ocnf). The script can only append to an existing audit log file. From log clients create a script that does something like "tail bsm_log | ssh rbacusr@logsrv append". Setup ssh key authentication from clients to the server for the RBAC user. This way someone that becomes root on one client can only append data to the log file on the log server. It cannot modify existing data. And since the user it get access to on the log server is a RBAC user that can only execute a wrapper script, the attacker cannot use a local-user escalation exploit to become root on the server. Of course for this method you need to setup key authentication and carefully create the scripts but if done the format of the files is the same as in a standard logging system. What do you think of these ? Vlad.

Posted by Vlad Grama on August 26, 2004 at 03:55 AM PDT #

Hi Vlad!

Both your suggestions are good solutions to the problem, but as I run IPsec between my systems, I don't have to worry about the spoofing. The lost and truncated records is a bigger problem.

As you point out, what we need is a secure syslog demon.

cheers,
/Martin

Posted by Martin Englund on August 26, 2004 at 04:11 AM PDT #

Post a Comment:

Comments are closed for this entry.
   
XML
« November 2009
SunMonTueWedThuFriSat
1
2
3
4
5
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
     
       
Today


Old entries


Bloggtoppen.se
OpenSolaris: Love at First Boot