Hey recently I have been receiving attack alerts. And I would like to root out the source of the problem. I'll give you the messages. If you could help me prevent this hacker from even being able to attempt these things please any advice is helpful.
There have been memory stack attempts, failed sys_admin conversion attempts, password file write attempts etc.....
Sys_admin attempt
Code:
Summary:
SELinux is preventing gdm-session-wor (xdm_t) "sys_admin" to <Unknown> (xdm_t).
Detailed Description:
SELinux denied access requested by gdm-session-wor. The current boolean settings
do not allow this access. If you have not setup gdm-session-wor to require this
access this may signal an intrusion attempt. If you do intend this access you
need to change the booleans on this system to allow the access.
Allowing Access:
Confined processes can be configured to to run requiring different access,
SELinux provides booleans to allow you to turn on/off access as needed. The
boolean allow_polyinstantiation is set incorrectly.
Boolean Description:
Enable polyinstantiated directory support.
Fix Command:
# setsebool -P allow_polyinstantiation 1
Additional Information:
Source Context system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Objects None [ capability ]
Source gdm-session-wor
Source Path <Unknown>
Port <Unknown>
Host 10lO1l01O0l101l0O10l1O01.10lO1l01O0l101l0Ol0l1O01.
com
Source RPM Packages
Target RPM Packages
Policy RPM selinux-policy-3.6.12-83.fc11
Selinux Enabled True
Policy Type targeted
MLS Enabled True
Enforcing Mode Enforcing
Plugin Name catchall_boolean
Host Name 10lO1l01O0l101l0O10l1O01.10lO1l01O0l101l0Ol0l1O01.
com
Platform Linux 10lO1l01O0l101l0O10l1O01.10lO1l01O0l101l0Ol0
l1O01.com 2.6.30.8-64.fc11.i686.PAE #1 SMP Fri Sep
25 04:56:58 EDT 2009 i686 i686
Alert Count 3
First Seen Wed 14 Oct 2009 11:39:40 PM NZDT
Last Seen Wed 14 Oct 2009 11:54:17 PM NZDT
Local ID a85dc046-960c-47ef-a430-a1b18b55c60f
Line Numbers
Raw Audit Messages
node=10lO1l01O0l101l0O10l1O01.10lO1l01O0l101l0Ol0l1O01.com type=AVC msg=audit(1255517657.112:22): avc: denied { sys_admin } for pid=1799 comm="gdm-session-wor" capability=21 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tclass=capability
Attempt at writing to shadow:
Code:
Summary:
SELinux is preventing gdm-session-wor (xdm_t) "write" shadow_t.
Detailed Description:
SELinux denied access requested by gdm-session-wor. It is not expected that this
access is required by gdm-session-wor and this access may signal an intrusion
attempt. It is also possible that the specific version or configuration of the
application is causing it to require additional access.
Allowing Access:
You can generate a local policy module to allow this access - see FAQ
(http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Or you can disable
SELinux protection altogether. Disabling SELinux protection is not recommended.
Please file a bug report (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi)
against this package.
Additional Information:
Source Context system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context system_u:object_r:shadow_t:s0
Target Objects /etc/.pwd.lock [ file ]
Source gdm-session-wor
Source Path <Unknown>
Port <Unknown>
Host 10lO1l01O0l101l0O10l1O01.10lO1l01O0l101l0Ol0l1O01.
com
Source RPM Packages
Target RPM Packages
Policy RPM selinux-policy-3.6.12-83.fc11
Selinux Enabled True
Policy Type targeted
MLS Enabled True
Enforcing Mode Enforcing
Plugin Name catchall
Host Name 10lO1l01O0l101l0O10l1O01.10lO1l01O0l101l0Ol0l1O01.
com
Platform Linux 10lO1l01O0l101l0O10l1O01.10lO1l01O0l101l0Ol0
l1O01.com 2.6.30.8-64.fc11.i686.PAE #1 SMP Fri Sep
25 04:56:58 EDT 2009 i686 i686
Alert Count 261
First Seen Sat 17 Oct 2009 01:58:41 PM NZDT
Last Seen Sat 17 Oct 2009 02:04:48 PM NZDT
Local ID f52c3b7d-23bd-4b97-96bb-2eeaeff18f82
Line Numbers
Raw Audit Messages
node=10lO1l01O0l101l0O10l1O01.10lO1l01O0l101l0Ol0l1O01.com type=AVC msg=audit(1255741488.23:81): avc: denied { write } for pid=1784 comm="gdm-session-wor" name=".pwd.lock" dev=sdb7 ino=11598 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:shadow_t:s0 tclass=file
Memory stack attempt:
Code:
Summary:
SELinux is preventing works from making the program stack executable.
Detailed Description:
The works application attempted to make its stack executable. This is a
potential security problem. This should never ever be necessary. Stack memory is
not executable on most OSes these days and this will not change. Executable
stack memory is one of the biggest security problems. An execstack error might
in fact be most likely raised by malicious code. Applications are sometimes
coded incorrectly and request this permission. The SELinux Memory Protection
Tests (http://people.redhat.com/drepper/selinux-mem.html) web page explains how
to remove this requirement. If works does not work and you need it to work, you
can configure SELinux temporarily to allow this access until the application is
fixed. Please file a bug report
(http://bugzilla.redhat.com/bugzilla/enter_bug.cgi) against this package.
Allowing Access:
Sometimes a library is accidentally marked with the execstack flag, if you find
a library with this flag you can clear it with the execstack -c LIBRARY_PATH.
Then retry your application. If the app continues to not work, you can turn the
flag back on with execstack -s LIBRARY_PATH. Otherwise, if you trust works to
run correctly, you can change the context of the executable to execmem_exec_t.
"chcon -t execmem_exec_t '<Unknown>'" You must also change the default file
context files on the system in order to preserve them even on a full relabel.
"semanage fcontext -a -t execmem_exec_t '<Unknown>'"
Fix Command:
chcon -t execmem_exec_t '<Unknown>'
Additional Information:
Source Context unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
023
Target Context unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
023
Target Objects None [ process ]
Source works
Source Path <Unknown>
Port <Unknown>
Host 10lO1l01O0l101l0O10l1O01.10lO1l01O0l101l0Ol0l1O01.
com
Source RPM Packages
Target RPM Packages
Policy RPM selinux-policy-3.6.12-85.fc11
Selinux Enabled True
Policy Type targeted
MLS Enabled True
Enforcing Mode Enforcing
Plugin Name allow_execstack
Host Name 10lO1l01O0l101l0O10l1O01.10lO1l01O0l101l0Ol0l1O01.
com
Platform Linux 10lO1l01O0l101l0O10l1O01.10lO1l01O0l101l0Ol0
l1O01.com 2.6.30.8-64.fc11.i686.PAE #1 SMP Fri Sep
25 04:56:58 EDT 2009 i686 i686
Alert Count 28
First Seen Sat 17 Oct 2009 10:53:44 AM NZDT
Last Seen Wed 21 Oct 2009 09:53:30 AM NZDT
Local ID 3c76e2ac-2b15-42ad-a290-58c4bdbad31c
Line Numbers
Raw Audit Messages
node=10lO1l01O0l101l0O10l1O01.10lO1l01O0l101l0Ol0l1O01.com type=AVC msg=audit(1256072010.336:26): avc: denied { execstack } for pid=3065 comm="works" scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=process