PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : execve


linuxhanz
26.03.03, 18:43
A
good addition to the native process accouting facilities is the 'exec'
kernel module, available as exec.c from linux software repositories. Once
compiled, exec can be loaded with 'insmod exec.o', whereupon it will log
exec() calls as kernel.info messages. When using this module, the syslog
daemon should be configured to log these messages to a specific terminal
or logfile; the syslog.conf line would look as follows:
kernel.info /usr/adm/execlog

Restart the syslog daemon by doing a kill -HUP on syslogd, then tail -f
/usr/adm/execlog:
Nov 22 09:06:01 gaap kernel: EXECVE(65534)[459]: /usr/sbin/in.identd
Nov 22 09:06:01 gaap kernel: EXECVE(0)[464]: /usr/sbin/tcpd
Nov 22 09:06:01 gaap kernel: EXECVE(0)[465]: /usr/sbin/tcpd
Nov 22 09:06:01 gaap kernel: EXECVE(0)[465]: /usr/sbin/wu.ftpd
Nov 22 09:06:27 gaap kernel: EXECVE(0)[470]: /usr/local/bin/nmap
Nov 22 09:07:41 gaap kernel: EXECVE(0)[471]: /bin/ping
Nov 22 09:08:18 gaap kernel: EXECVE(0)[472]: /bin/ls
To avoid filling up the filesystem, either truncate this file regularly, or
configure syslogd to output to a terminal.


Schon blöd. Wenn ichs übersetzen will, bekomme ich nur Fehler. Ist das exec Modul
vielleicht ersetzt worden? Gibts was besseres?
Wurde hier schonmal erläutert wie man ein einzelnes Modul übersetzt?
Irgendwie kommt das log einem von LIDS her bekannt vor. Aber LIDS auf dem Client?
Wie läßt sich dieses Modul fehlerfrei übersetzen?

linuxhanz
28.03.03, 20:16
*grummel*

MUSS ich den einen neuen Kernel kompilieren?

REICHT es denn nicht evtl das Modul einzeln zu übersetzen?

Sagt mir wenigstens, wenn es nicht geht.

HackThor
28.03.03, 20:56
Hi!

gcc -c <modul.c> -o <modul.o> -I/usr/src/<kernel-version>/include
Damit kompiliere ich meine externen Module (ptrace z.B. :) ) - und das geht. Ohne das den Include-Pfad vom Kernel bekommst du nur viele Fehlermeldungen.

ciao

Michael

linuxhanz
31.03.03, 10:16
Hm so kenne ich das auch. Klappt daß denn noch?
Was verwendest Du für ein System?

EDIT: genau das scheint/ist das Problem. Die Links stimmen nicht.


btw. Der Spruch ist geil.

linuxhanz
14.04.03, 19:40
Nutze jetzt einfach Secumod.
Das überwacht auch Sockets.

brummel# cat >> /sbin/init.d/boot.local
insmod -f secumod hardlink=1 symlink=1 socket=1 pipe=1 trace=1 systable=1 logging=1
^D

Obwohl das nicht mehr ganz so neu zu sein scheint?