Slide 1

Slide 1 text

2018/8/27 VulsࡇΓ #4 ϥϯαʔζגࣜձࣾ 43&ʗ҆ୡྋ ͋ͩͪ Μ 3෼ؒͰ vuls scanͱreportͰ͖Δͷ͔ νϟϨϯδ!!!

Slide 2

Slide 2 text

2018/8/27 VulsࡇΓ #4 ࣗݾ঺հ

Slide 3

Slide 3 text

2018/8/27 VulsࡇΓ #4 ࣗݾ঺հ ɾ҆ୡ ྋ(͋ͩͪΜ) 29sai ɾϥϯαʔζ/SREνʔϜ Πϯϑϥ(AWS)/෼ੳج൫/PHPόʔδϣϯΞοϓ ɾBlog:https://blog.adachin.me ɾTwitterɿ@adachin0817 ɾϥδΦ:https://soundcloud.com/ryo-adachi-3 ɾࣗশΤόϯδΣϦετ/޿ใ/ίϯτϦϏϡʔλʔ ɾVuls৽ػೳ/όάͳͲͷBlog up(20هࣄ)!! ɾVulsRepo initϑΝΠϧରԠ(2017/10) ɾVuls ChatWork௨஌ରԠ(2018/4)

Slide 4

Slide 4 text

2018/8/27 VulsࡇΓ #4 ݱࡏVulsؔ࿈Ͱௐ͍ࠪͯ͠Δ͜ͱ

Slide 5

Slide 5 text

7VMTࡇΓ Install with Ansible(security-automation-with-ansible-2) https://github.com/RVIRUS0817/ansible_vuls security-automation-with-ansible-2 ߏங͸Ͱ͖͕ͨɺvuls scan͕Ͱ͖ͳ͍ͬ

Slide 6

Slide 6 text

2018/8/27 VulsࡇΓ #4 ϥϯαʔζͰͷVulsӡ༻

Slide 7

Slide 7 text

7VMTࡇΓ ϥϯαʔζͰ੬ऑੑεΩϟφVulsΛಋೖ͠·ͨ͠!!!! https://engineer.blog.lancers.jp/2018/06/lancers-vuls/ ϥϯαʔζͰͷVulsӡ༻ʹ͍ͭͯ͸ಡΜͰ͍ͩ͘͞ʂʂ

Slide 8

Slide 8 text

2018/8/27 VulsࡇΓ #4 ͱ͍͏Θ͚Ͱ

Slide 9

Slide 9 text

2018/8/27 VulsࡇΓ #4 ࠓճ͸ॳ৺ऀ޲͚ VulsϋϯζΦϯΛ΍Γ·͢

Slide 10

Slide 10 text

2018/8/27 VulsࡇΓ #4 ͔͠΋3෼Ͱʂʂʂʂ (खಈͰίϐϖ˕/γΣϧ൓ଇ☓)

Slide 11

Slide 11 text

2018/8/27 VulsࡇΓ #4 ͜Ε͸·͞ʹʂʂʂʂ

Slide 12

Slide 12 text

2018/8/27 VulsࡇΓ #4 ʮ3෼ؒ଴ͬͯ΍Δʯ

Slide 13

Slide 13 text

2018/8/27 VulsࡇΓ #4 ■ࠓճ΍Δ͜ͱ 1.Vuls docker run(ىಈ) 2.ϩʔΧϧϗετΛεΩϟϯ (vuls scan) 3.Slack/ChatWorkʹϨϙʔτ (vuls report) ׻੠!!

Slide 14

Slide 14 text

2018/8/27 VulsࡇΓ #4 ͷલʹʂʂʂ

Slide 15

Slide 15 text

2018/8/27 VulsࡇΓ #4 Vuls։ൃ؀ڥ(Docker)ͷ આ໌ͤͯ͞ʂʂ

Slide 16

Slide 16 text

2018/8/27 VulsࡇΓ #4 Vuls։ൃ؀ڥ(Docker)ͷઆ໌ https://blog.adachin.me/archives/8042 ʮ[docker][dev]Vulsͷ։ൃ؀ڥ࡞Γ·͍͍͍͍͍͍ͨͥ͌͠!!ʯ

Slide 17

Slide 17 text

2018/8/27 VulsࡇΓ #4 Vuls։ൃ؀ڥ(Docker)ͷઆ໌(؀ڥͱdocker run) https://hub.docker.com/r/tvirus17/vuls_centos7/ ■Environment ɾCentOS7 ɾgo version go1.10.1 linux/amd64 ɾvuls v0.4.2 d785fc2 ɾgo-cve-dictionary v0.1.1 c2bcc41 ⇛ ੬ऑੑ৘ใͷσʔλΛDBʹऔΓࠐΈ؅ཧ͢ΔͨΊͷπʔϧ ɾgoval-dictionary 0b28496 (Alpine,redhat/centos,ubuntu) ⇛ OVAL(Open Vulnerability and Assessment Language)XMLͰͰ͖ͯΔ ϩʔΧϧʹίϐʔͯ͠Ϗϧυ͢Δπʔϧ

Slide 18

Slide 18 text

2018/8/27 VulsࡇΓ #4 Vuls։ൃ؀ڥ(Docker)ͷઆ໌(docker run) ■docker pull/docker run $ docker pull tvirus17/vuls_centos7 $ docker run -h "vuls_centos7" -e TZ=Asia/ Tokyo --privileged -d --name vuls_centos7 tvirus17/vuls_centos7 /sbin/init

Slide 19

Slide 19 text

2018/8/27 VulsࡇΓ #4 Vuls։ൃ؀ڥ(Docker)ͷઆ໌(ઃఆϑΝΠϧ) ■Vuls files $ docker exec -it vuls_centos7 bash [root@vuls_centos7 /]# sudo su vuls [vuls@vuls_centos7]# cd [vuls@fc4413dce445 vuls]$ ll vuls total 990580 -rw-rw-r-- 1 vuls vuls 148 Apr 2 19:42 config.toml -rw-r--r-- 1 vuls vuls 918818816 Apr 2 17:57 cve.sqlite3 -rw-r--r-- 1 vuls vuls 32768 Apr 2 19:42 cve.sqlite3-shm -rw-r--r-- 1 vuls vuls 0 Apr 2 18:21 cve.sqlite3-wal -rw-r--r-- 1 vuls vuls 95490048 Apr 2 19:41 oval.sqlite3 drwx------ 1 vuls vuls 4096 Apr 2 19:42 results

Slide 20

Slide 20 text

2018/8/27 VulsࡇΓ #4 Vuls։ൃ؀ڥ(Docker)ͷઆ໌(config.tomlʹ͍ͭͯ) ■config.toml [slack] legacyToken = " "#slack api channel = " "#slackͷνϟϯωϧΛࢦఆ iconEmoji = " "#ֆจࣈ(ͳΜͰ΋) authUser = " "#vuls-user(ͳΜͰ΋) [chatwork] room = " " #URL൪߸ apiToken = " " #Apiࢦఆ [servers] #ࠓճ͸ϩʔΧϧϗετΛࢦఆ [servers.localhost] host = "localhost" port = "local"

Slide 21

Slide 21 text

2018/8/27 VulsࡇΓ #4 Vuls։ൃ؀ڥ(Docker)ͷઆ໌(ࣗಈόʔδϣϯΞοϓ) ■Vuls Update https://blog.adachin.me/archives/8861

Slide 22

Slide 22 text

2018/8/27 VulsࡇΓ #4 Vuls։ൃ؀ڥ(Docker)ͷઆ໌(vuls scan,report) ■update goval-dictionary $ goval-dictionary fetch-redhat 5 6 7 ■vuls scan,vuls report $ vuls scan $ vuls report -format-short-text -format-json -to-slack -to- chatwork -lang=ja -ignore-unfixed -cvss-over=7 Ҏ্!!!!!!

Slide 23

Slide 23 text

2018/8/27 VulsࡇΓ #4 ΍Γ·ͬͤ!!!!!!! ४උ͠·͢(ͪΐΜ·͛͞ΜλΠϜਤͬͯ)

Slide 24

Slide 24 text

2018/8/27 VulsࡇΓ #4

Slide 25

Slide 25 text

2018/8/27 VulsࡇΓ #4 ·ͱΊ ɾҙ֎ͱͰ͖ͨ ɾॳ৺ऀ͞Μʹ΋Πϝʔδ͕༙͍ͨ͸ͣ ɾखಈͰscanͱreportΛ͍͕ͯͨ͠γΣϧܳʹ͢Δͷ͕⭕ https://github.com/RVIRUS0817/shellscripts/blob/master/vuls_script/vuls_autoscan.sh ɾ·ͩ·ͩ։ൃ͠ʹ͍͘ίϯςφ(Ϛ΢ϯτͰ͖ͳ͍) ɾdocker-composeͰߏங͢Δʂ ɾΈͳ͞Μ΋OSS׆ಈ͠Α͏ʂ ɾVulsίϯτϦϏϡʔλʔʹͳΖ͏!!!

Slide 26

Slide 26 text

2018/8/27 VulsࡇΓ #4 ΤϯδχΞٻΉ!!!!!!!!!!!!!!!!!!!!!!! ɾΤϯδχΞٻΉ!!!!!!!!!!!!!!!!!!! https://www.wantedly.com/companies/lancers/projects

Slide 27

Slide 27 text

2018/8/27 VulsࡇΓ #4 ͝ਗ਼ௌ ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂʂ