Más contenido relacionado
La actualidad más candente (20)
Similar a SELinux_Status_PoC_20170516 (20)
SELinux_Status_PoC_20170516
- 2. 2
Who am I ?
- Security Researcher/Engineer (19 years)
- SELinux/MAC Evangelist (14 years)
- Antivirus Engineer (3 years)
- SIEM Engineer (3 years)
- Linux Engineer (17 years)
- 5. 5
1. 最近の SELinux のトピック
1. CIL
2. SELinux + Container
3. FileSystem
4. Labeled Network
5. SELinux+SCAP
6. SELinux+Android
- 6. 6
1. CIL
(type sendconfig_t)
(roletype system_r sendconfig_t)
(typeattributeset entry_type sendconfig_exec_t)
(allow init_t sendconfig_exec_t (file (read execute execute_no_trans open)))
よりポリシを簡単に記載する。この CIL を使うことにより、
ポリシの開発が 50-70% 早くなると言われている。
- 8. 8
2. SELinux + Container
●
SELinux での rkt/runC のサポート
●
OverlayFS のサポート
●
Capability チェックの分離
- 10. 10
4. Network File System
●
CALIPSO / RFC 5570 のサポート
●
Linux v4.8 からサポート
●
IPv6 でのネットワークラベリングサポート
●
Solaris TX との相互運用
- 14. 14
6. SELinux+Android
Android(KitKat: v4.4) で SELinux Enforcing が有効に
・ 1 年で 60% の Android デバイスが KitKat+ で動作
・現在 80% の Android デバイスが KitKat+ で動作中
Android(Lolipop: v5.0) では全て SELinux のポリシが Enforcing
・ 1 年で 18% の Android デバイスが Lolipop+ で動作
・現在 50% の Android デバイスが Lolipop+ で動作中
- 18. 18
覚えていますか?
SHELL SHOCK!!!
2014 年 9 月 24 日 GNU bash の脆弱性情報が公開
幅広い bash のバージョンが対象
環境変数を利用してプログラムを実行できる。リモートからも。
●
JVNVU#97219505 GNU Bash に OS コマンドインジェクションの脆弱性
●
JPCERT/CC GNU bash の脆弱性に関する注意喚起
●
JPCERT/CC TCP 10000 番ポートへのスキャンの増加に関する注意喚起
●
IPA bash の脆弱性対策について (CVE-2014-6271 等 )
- 19. 19
2-1. ShellShock の脆弱性
デモを見ましょう
ls -l
total 8
-rwxr-xr-x 1 root root 94 Jan 22 06:36 test.cgi
cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
リモートから何でも
- 22. 22
2-2. bind9 の脆弱性 (CVE-2016-2776)
デモを見ましょう
msf auxiliary(namedown) > exploit
[*] Sending bombita (Specially crafted udp packet) to: 172.16.148.130
[+] Exploit Success (Maybe, nameserver did not replied)
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf auxiliary(namedown) > exploit
リモートから落とせます!!
- 24. 24
2-3. linux kernel 特権昇格脆弱性 ( CVE-2017-6074 )
●
報告日: 02/22/201
●
広範囲なバージョン (11 年前の 2.6.18(Sep 2006) 以降 )
- 25. 25
2-3. linux kernel 特権昇格脆弱性 ( CVE-2017-6074 )
デモを見ましょう
Ubuntu の Kernel 用の PoC が公開されているため
・ Ubuntu で PoC を試す
・ Ubuntu + SELinux で緩和できるか見てみる
- 27. 27
2-4. Struts2 の脆弱性 ( CVE-2017-5638 )
●
日本郵便株式会社
●
都税クレジットカード支払サイト
●
沖縄電力
●
住宅金融支援機構
●
メガネ販売店 JINS
03/06/2017 公開
あちこちがヤラれました
- 28. 28
2-4. Struts2 の脆弱性 ( CVE-2017-5638 )
デモを見ましょう
CentOS + Tomcat + Struts2( 脆弱性あるバージョン ) で
・ SELinux が Permissive の時の動作
・ SELinux が Enforcing の時の動作
を見る。
- 29. 29
2-4. Struts2 の脆弱性 ( CVE-2017-5638 )
SELinux が Enforcing の時に
・自分の ID を確認
・ /etc/shadow などにアクセス「出来る」事を確認
・理由を考察
seinfo -ttomcat_t -x の出力結果を見る
- 30. 30
2-4 Struts2 の脆弱性
seinfo -ttomcat_t -x の出力結果
[root@cent7enc ~]# seinfo -ttomcat_t -x
tomcat_t
can_change_object_identity
-- 省略 --
can_load_kernmodule
corenet_unconfined_type
corenet_unlabeled_type
devices_unconfined_type
domain
files_unconfined_type
filesystem_unconfined_type
kern_unconfined
selinux_unconfined_type
storage_unconfined_type
unconfined_domain_type
dbusd_unconfined
sepgsql_unconfined_type
tomcat_domain
userdom_filetrans_type
xserver_unconfined_type
unconfined!!
- 31. 31
2-4. Struts2 の脆弱性 ( CVE-2017-5638 )
Bugzilla に報告しました (Bug 登録 -> 修正 )
・ SecureOSS Sig の Blog に載せてなかった理由
- 34. 34
2-5. ntfs-3g の脆弱性 (CVE-2017-0358)
デモを見ましょう
Ubuntu 用の PoC が公開されているため
・ Ubuntu で PoC を試す
・ Ubuntu + SELinux で緩和できるか見てみる