Sponsored Content
Top Forums UNIX for Advanced & Expert Users File Auditing in Sun Solaris environment Post 302370464 by jim mcnamara on Wednesday 11th of November 2009 01:02:17 PM
Old 11-11-2009
Can you not prevent writing the binaries? chmod 711 the files, then change the owner of the file to root or some other similar userid.

Otherwise, how can you know absolutely that the binaries you have out there are the right ones? As soon as you create the file, another user, in 5 seconds, could overwrite it.

Assuming you can know, which I don't believe, use cksum to create a file:
Code:
cd /binary/directory
cksum * > ~/mycksum

Next, put simple script into your crontab that runs every few minutes:
Code:
cd /binary/directory
cksum * > ~/testcksum
diff ~/testcksum ~/mycksum > badfiles
if [[ $? -eq 1 ]] ; then 
   /usr/bin/uuencode badfile badfile | /usr/bin/mailx -s 'binary file change' me@comp.com
fi

You will get a continuing stream of emails until you revert the offending file(s).
This User Gave Thanks to jim mcnamara For This Post:
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

speeding up the compilation on SUN Solaris environment

Dear friends, Please let me know how do I increase the speed of my compilation in SUN Solaris environment. actually I have many subfolders which contains .cc files. when I compile makefile at the root it will take much time to compile all the subfolders and generates object(.o) files. Can... (2 Replies)
Discussion started by: swamymns
2 Replies

2. UNIX for Dummies Questions & Answers

solaris BSM and Auditing

Hi Guys, I am new to this forum so I am sorry if i posted this thread in the wrong place. I am currently trying to get BSM to work on solaris 10 by Logging few things for me. I need your help to complete this task please. this is the config of the audit files: audit_conto # Copyright... (18 Replies)
Discussion started by: skywalker850i
18 Replies

3. Solaris

Solaris 9 Auditing

How do I setup audit to alert on write conditions for individual files? Thanks. (3 Replies)
Discussion started by: dxs
3 Replies

4. Programming

Uncompress a gzip and bzip file using java on unix solaris environment

Hi, I need to uncompress a gzip and bzip file using java on unix solaris environment. I also need to retreive the header information of the file inorder to differentiate between gzip and bzip file. Please help Pooja (0 Replies)
Discussion started by: wadhwa.pooja
0 Replies

5. UNIX for Advanced & Expert Users

Solaris auditing (file access logging) for specific directory only.

Hello, We need to log the operations that specific user on Solaris 10 (SPARC) is performing on one directory and it's contents. I was able to configure solaris auditing service (auditd) and it works fine. The only problem is that auditd logs huge amount of unneeded information. We need to log... (0 Replies)
Discussion started by: +Yan
0 Replies

6. Solaris

Solaris user auditing

Hello, I was wondering when Solaris auditing is enabled, If it is possible to keep track of users that are allowed to sudo to root. In other words, I would like to know which user did what on my Solaris box. (assumig that user can "sudo su -" ) Thanks. (2 Replies)
Discussion started by: niyazi
2 Replies

7. Cybersecurity

Solaris Auditing: Newly specified events not being logged

Hi all I'm busy testing auditing on Solaris 10. I am using the syslog plugin to get real time view of what's happening on the system. Initially I am only monitoring lo events. The audit_control file looked like this: dir:/var/audit flags:lo minfree:20 naflags:lo... (1 Reply)
Discussion started by: notreallyhere
1 Replies

8. Solaris

Auditing Sun Servers

Hi All, I am new joinee to this forum and recently promoted as sun administrator from dba. I still dont know whether i can handle it fully . My first task is to audit set of sun servers and findout what it is doing and whether it can be upgraded or decommissioned and if upgraded whether it can... (5 Replies)
Discussion started by: sundba
5 Replies

9. Solaris

Exclude an specific directory for auditing in Solaris 10

Hello, Im glad to become a member of this forums, Im new on solaris and recentrly im introducing to use auditing service in that system. The need is, that I need how to exclude a directory to the audit service not audit it. And, a plus, I need of how to disable auditing the root user in... (0 Replies)
Discussion started by: sysh4ck
0 Replies
au_open(3BSM)					      Security and Auditing Library Functions					     au_open(3BSM)

NAME
au_open, au_close, au_write - construct and write audit records SYNOPSIS
cc [ flag... ] file... -lbsm -lsocket -lnsl [ library... ] #include <bsm/libbsm.h> int au_close(int d, int keep, short event); int au_open(void); int au_write(int d, token_t *m); DESCRIPTION
The au_open() function returns an audit record descriptor to which audit tokens can be written using au_write(). The audit record descrip- tor is an integer value that identifies a storage area where audit records are accumulated. The au_close() function terminates the life of an audit record d of type event started by au_open(). If the keep parameter is AU_TO_NO_WRITE, the data contained therein is discarded. If the keep parameter is AU_TO_WRITE, the additional parameters are used to create a header token. Depending on the audit policy information obtained by auditon(2), additional tokens such as sequence and trailer tokens can be added to the record. The au_close() function then writes the record to the audit trail by calling audit(2). Any memory used is freed by calling free(3C). The au_write() function adds the audit token pointed to by m to the audit record identified by the descriptor d. After this call is made the audit token is no longer available to the caller. RETURN VALUES
Upon successful completion, au_open() returns an audit record descriptor. If a descriptor could not be allocated, au_open() returns -1 and sets errno to indicate the error. Upon successful completion, au_close() returns 0. If d is an invalid or corrupted descriptor or if audit() fails, au_close() returns -1 without setting errno. If audit() fails, errno is set to one of the error values described on the audit(2) manual page. Upon successful completion, au_write() returns 0. If d is an invalid descriptor or m is an invalid token, or if audit() fails, au_write() returns -1 without setting errno. If audit() fails, errno is set to one of the error values described on the audit(2) manual page. ERRORS
The au_open() function will fail if: ENOMEM The physical limits of the system have been exceeded such that sufficient memory cannot be allocated. EAGAIN There is currently insufficient memory available. The application can try again later. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Stable | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
bsmconv(1M), audit(2), auditon(2), au_preselect(3BSM), au_to(3BSM), free(3C), attributes(5) NOTES
The functionality described on this manual page is available only if the Solaris Auditing has been enabled. See bsmconv(1M) for more information. SunOS 5.11 31 Mar 2005 au_open(3BSM)
All times are GMT -4. The time now is 02:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy