免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4655 | 回复: 1
打印 上一主题 下一主题

[其他] 求助,CentOS7的SELinux有几个Alert [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2016-01-01 15:27 |只看该作者 |倒序浏览
大家好,
我刚刚重装的centos7(CentOS-7.0-1406-x86_64-DVD.iso)

用yum update之后的版本是:
Linux localhost.localdomain 3.10.0-327.3.1.el7.x86_64 #1 SMP Wed Dec 9 14:09:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

在yum update过程中,SELinux有几个Alert,然后光驱就弹出了. 不知道是不是被攻击?该怎么办?谢谢

我系统的/var/log/audit/audit.log贴在这里了
pastebin.ca/3305655

Alert 1--------------------------------------------------------------------------------
  1. SELinux is preventing /usr/libexec/abrt-handle-event from open access on the file .

  2. *****  Plugin catchall (100. confidence) suggests   **************************

  3. If you believe that abrt-handle-event should be allowed open access on the  file by default.
  4. Then you should report this as a bug.
  5. You can generate a local policy module to allow this access.
  6. Do
  7. allow this access for now by executing:
  8. # grep abrt-handle-eve /var/log/audit/audit.log | audit2allow -M mypol
  9. # semodule -i mypol.pp

  10. Additional Information:
  11. Source Context                system_u:system_r:abrt_t:s0-s0:c0.c1023
  12. Target Context                system_u:object_r:var_spool_t:s0
  13. Target Objects                 [ file ]
  14. Source                        abrt-handle-eve
  15. Source Path                   /usr/libexec/abrt-handle-event
  16. Port                          <Unknown>
  17. Host                          localhost.localdomain
  18. Source RPM Packages           abrt-2.1.11-12.el7.centos.x86_64
  19. Target RPM Packages           
  20. Policy RPM                    selinux-policy-3.12.1-153.el7.noarch
  21. Selinux Enabled               True
  22. Policy Type                   targeted
  23. Enforcing Mode                Enforcing
  24. Host Name                     localhost.localdomain
  25. Platform                      Linux localhost.localdomain 3.10.0-123.el7.x86_64
  26.                               #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64
  27. Alert Count                   2
  28. First Seen                    2015-12-27 09:21:35 EST
  29. Last Seen                     2015-12-27 09:21:35 EST
  30. Local ID                      5f7559d5-313a-4f09-96c3-bea0c3fd67c5

  31. Raw Audit Messages
  32. type=AVC msg=audit(1451226095.531:608): avc:  denied  { open } for  pid=17177 comm="abrt-handle-eve" path="/var/spool/abrt/ccpp-2015-12-27-09:21:35-883/time" dev="dm-1" ino=202708314 scontext=system_u:system_r:abrt_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_spool_t:s0 tclass=file


  33. type=SYSCALL msg=audit(1451226095.531:608): arch=x86_64 syscall=open success=no exit=EACCES a0=7fec1af67c10 a1=0 a2=7fec1af67c1f a3=0 items=0 ppid=17167 pid=17177 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=abrt-handle-eve exe=/usr/libexec/abrt-handle-event subj=system_u:system_r:abrt_t:s0-s0:c0.c1023 key=(null)

  34. Hash: abrt-handle-eve,abrt_t,var_spool_t,file,open
复制代码
Alert 2--------------------------------------------------------------------------------
  1. SELinux is preventing /usr/libexec/abrt-handle-event from create access on the lnk_file .

  2. *****  Plugin catchall (100. confidence) suggests   **************************

  3. If you believe that abrt-handle-event should be allowed create access on the  lnk_file by default.
  4. Then you should report this as a bug.
  5. You can generate a local policy module to allow this access.
  6. Do
  7. allow this access for now by executing:
  8. # grep abrt-handle-eve /var/log/audit/audit.log | audit2allow -M mypol
  9. # semodule -i mypol.pp

  10. Additional Information:
  11. Source Context                system_u:system_r:abrt_t:s0-s0:c0.c1023
  12. Target Context                system_u:object_r:var_spool_t:s0
  13. Target Objects                 [ lnk_file ]
  14. Source                        abrt-handle-eve
  15. Source Path                   /usr/libexec/abrt-handle-event
  16. Port                          <Unknown>
  17. Host                          localhost.localdomain
  18. Source RPM Packages           abrt-2.1.11-12.el7.centos.x86_64
  19. Target RPM Packages           
  20. Policy RPM                    selinux-policy-3.12.1-153.el7.noarch
  21. Selinux Enabled               True
  22. Policy Type                   targeted
  23. Enforcing Mode                Enforcing
  24. Host Name                     localhost.localdomain
  25. Platform                      Linux localhost.localdomain 3.10.0-123.el7.x86_64
  26.                               #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64
  27. Alert Count                   4
  28. First Seen                    2015-12-27 09:21:35 EST
  29. Last Seen                     2015-12-27 09:21:35 EST
  30. Local ID                      8caf01b0-e3c6-4695-bf85-887026cb13af

  31. Raw Audit Messages
  32. type=AVC msg=audit(1451226095.534:610): avc:  denied  { create } for  pid=17167 comm="abrt-server" name=".lock" scontext=system_u:system_r:abrt_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_spool_t:s0 tclass=lnk_file


  33. type=SYSCALL msg=audit(1451226095.534:610): arch=x86_64 syscall=symlinkat success=no exit=EACCES a0=7fffad941200 a1=5 a2=7faa8ee00b32 a3=7fffad940ed0 items=0 ppid=866 pid=17167 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=abrt-server exe=/usr/sbin/abrt-server subj=system_u:system_r:abrt_t:s0-s0:c0.c1023 key=(null)

  34. Hash: abrt-handle-eve,abrt_t,var_spool_t,lnk_file,create
复制代码
alert3--------------------------------------------------------------------------------
  1. SELinux is preventing /usr/lib/systemd/systemd-logind from read access on the directory .

  2. *****  Plugin catchall (100. confidence) suggests   **************************

  3. If you believe that systemd-logind should be allowed read access on the  directory by default.
  4. Then you should report this as a bug.
  5. You can generate a local policy module to allow this access.
  6. Do
  7. allow this access for now by executing:
  8. # grep systemd-logind /var/log/audit/audit.log | audit2allow -M mypol
  9. # semodule -i mypol.pp

  10. Additional Information:
  11. Source Context                system_u:system_r:systemd_logind_t:s0
  12. Target Context                system_u:object_r:tmpfs_t:s0
  13. Target Objects                 [ dir ]
  14. Source                        systemd-logind
  15. Source Path                   /usr/lib/systemd/systemd-logind
  16. Port                          <Unknown>
  17. Host                          localhost.localdomain
  18. Source RPM Packages           systemd-208-11.el7.x86_64
  19.                               systemd-219-19.el7.x86_64
  20. Target RPM Packages           
  21. Policy RPM                    selinux-policy-3.12.1-153.el7.noarch
  22. Selinux Enabled               True
  23. Policy Type                   targeted
  24. Enforcing Mode                Enforcing
  25. Host Name                     localhost.localdomain
  26. Platform                      Linux localhost.localdomain 3.10.0-123.el7.x86_64
  27.                               #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64
  28. Alert Count                   1
  29. First Seen                    2015-12-27 09:21:54 EST
  30. Last Seen                     2015-12-27 09:21:54 EST
  31. Local ID                      e9da0e86-de1d-4784-93fa-f2cf68b23979

  32. Raw Audit Messages
  33. type=AVC msg=audit(1451226114.223:620): avc:  denied  { read } for  pid=17173 comm="systemd-logind" name="/" dev="mqueue" ino=7612 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:object_r:tmpfs_t:s0 tclass=dir


  34. type=SYSCALL msg=audit(1451226114.223:620): arch=x86_64 syscall=openat success=no exit=EACCES a0=ffffffffffffff9c a1=7f6fedaa71ee a2=90800 a3=0 items=0 ppid=1 pid=17173 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=systemd-logind exe=/usr/lib/systemd/systemd-logind subj=system_u:system_r:systemd_logind_t:s0 key=(null)

  35. Hash: systemd-logind,systemd_logind_t,tmpfs_t,dir,read
复制代码
alert4--------------------------------------------------------------------------------
  1. SELinux is preventing /usr/lib/systemd/systemd-logind from mounton access on the directory .

  2. *****  Plugin catchall (100. confidence) suggests   **************************

  3. If you believe that systemd-logind should be allowed mounton access on the  directory by default.
  4. Then you should report this as a bug.
  5. You can generate a local policy module to allow this access.
  6. Do
  7. allow this access for now by executing:
  8. # grep systemd-logind /var/log/audit/audit.log | audit2allow -M mypol
  9. # semodule -i mypol.pp

  10. Additional Information:
  11. Source Context                system_u:system_r:systemd_logind_t:s0
  12. Target Context                system_u:object_r:user_tmp_t:s0
  13. Target Objects                 [ dir ]
  14. Source                        systemd-logind
  15. Source Path                   /usr/lib/systemd/systemd-logind
  16. Port                          <Unknown>
  17. Host                          localhost.localdomain
  18. Source RPM Packages           systemd-208-11.el7.x86_64
  19.                               systemd-219-19.el7.x86_64
  20. Target RPM Packages           
  21. Policy RPM                    selinux-policy-3.12.1-153.el7.noarch selinux-
  22.                               policy-3.13.1-60.el7.noarch
  23. Selinux Enabled               True
  24. Policy Type                   targeted
  25. Enforcing Mode                Enforcing
  26. Host Name                     localhost.localdomain
  27. Platform                      Linux localhost.localdomain 3.10.0-123.el7.x86_64
  28.                               #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64
  29. Alert Count                   2
  30. First Seen                    2015-12-27 09:21:35 EST
  31. Last Seen                     2015-12-27 09:30:01 EST
  32. Local ID                      24895b84-2738-405b-91a6-e462387b530c

  33. Raw Audit Messages
  34. type=AVC msg=audit(1451226601.411:685): avc:  denied  { mounton } for  pid=17173 comm="systemd-logind" path="/run/user/0" dev="tmpfs" ino=3042889 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:object_r:user_tmp_t:s0 tclass=dir


  35. type=SYSCALL msg=audit(1451226601.411:685): arch=x86_64 syscall=mount success=no exit=EACCES a0=7f6fedaa6250 a1=7f6fedfa7400 a2=7f6fedaa6250 a3=6 items=0 ppid=1 pid=17173 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=systemd-logind exe=/usr/lib/systemd/systemd-logind subj=system_u:system_r:systemd_logind_t:s0 key=(null)

  36. Hash: systemd-logind,systemd_logind_t,user_tmp_t,dir,mounton
复制代码

论坛徽章:
10
金牛座
日期:2014-09-16 19:02:48技术图书徽章
日期:2015-11-24 01:37:29操作系统版块每日发帖之星
日期:2015-11-18 06:20:002015年亚洲杯之沙特阿拉伯
日期:2015-04-13 17:33:462015年迎新春徽章
日期:2015-03-04 09:51:162015年辞旧岁徽章
日期:2015-03-03 16:54:15午马
日期:2014-12-04 19:33:55白羊座
日期:2014-09-17 19:34:42巨蟹座
日期:2014-09-16 21:09:4815-16赛季CBA联赛之同曦
日期:2016-06-27 23:23:07
2 [报告]
发表于 2016-01-14 23:05 |只看该作者
回复 1# yaoyansi


    注意看每个alert 的这几行.比如
allow this access for now by executing:
# grep abrt-handle-eve /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp



然后复制红字部分到终端,以root身份运行就可以了.


评分

参与人数 1可用积分 +5 收起 理由
ccjsj1 + 5 很给力!

查看全部评分

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP