節省工具箱公開簡報

系統安全稽核即刻上手

2019/08/24Monospace45 張投影片

/ 45

簡報說明

系統要檢視的項目太多,要怎麼檢測系統的安全設定與檔案權限等項目呢?本次社群活動將介紹一款非常容易上手使用的工具,協助我們快速解決問題。

TFC 八月份活動第一個議程。

逐頁文字

  1. 2019-08-24 KALI 讀書會 x TFC x CDX @ Monospace

    系統安全稽核即刻上手
    {LYNIS}
    Jason Cheng
    耀達電腦

  2. 錢能解決的問題都不是問題
    😭 問題是沒有錢 😭

  3. (本頁無文字)

  4. 從何 看起?

  5. 1 具介紹

  6. Lynis
    開源系統安全稽核工具

  7. phpIPAM
    開源 IP 管理平台

  8. 法遵測試
    自動稽核
    漏洞檢測
    滲透測試
    改善建議

  9. phpIPAM
    開源 IP 管理平台

  10. 2 具安裝

  11. 動手安裝

  12. 安裝 Lynis

    git clone https://github.com/CISOfy/lynis

  13. 不用這麼麻煩,
    KALI Linux 準備好了。

  14. 09 - Sniffing & Spoofing
    10- Post Exploitation
    12 - Reporting Tools
    13- Social Engineering Tools

  15. (本頁無文字)

  16. 查看目前版本

    lynis update info

  17. 查看 前版本

  18. 系統稽核

  19. 執行安全稽核

    lynis audit system

  20. 安全稽核分數

    Lynis security scan details:

    Hardening index : 64 [############ ]
    Tests performed : 126
    Plugins enabled : 0

  21. 快速查看重點

    cat /var/log/lynis.log | grep Warning

    cat /var/log/lynis.log | grep Suggestion

  22. 編號查看特定項

    lynis show details PKGS-7392
    lynis show details FILE-7524

  23. 跳過指定測試

    nano custom.prf
    skip-test=PKGS-7392

  24. 別搞那麼辛苦,換個工具看吧

  25. Visual Studio Code

  26. Text Power Tools

  27. = 180-lynis.log X
    編輯器字體放大
    = 180-lynis.log•
    Suggestion
    suggestion: If not required, consider explicit disabling of core dump in /etc/security/Lim1
    10:27:41
    Suggestion: Install a PAM module for password strength testing like pam_cracklib or pam_pas
    Suggestion: Configure minimum password age in /etc/login.defs [test:AUTH-9286] [details:-]
    Suggestion: Default umask in /etc/Login.defs could be more strict Like 027 [test:AUTH-9328]
    Suggestion: Default umask in /etc/init.d/rc could be more strict Like 027 [test: AUTH-9328]
    Suggestion: To decrease the impact of a full /tmp file system, place /tmp on a separate pari
    Suggestion: To decrease the impact of a full /var file system, place /var on a separate pari
    Suggestion: Check 16 files in /tmp which are older than 90 days [test: FILE-6354] [details:-
    Suggestion:
    Suggestion: Purge old/removed packages (102 found) with aptitude purge or dpkg --purge comme
    Suggestion: Install a package audit tool to determine vulnerable packages [test: PKGS-7398]

  28. (本頁無文字)

  29. 遠端稽核

  30. 執行遠端安全稽核

    lynis audit system remote <ip>

  31. 執行
    遠端安全稽核

  32. 報告轉換

  33. 想讓報告更容易檢視

  34. 搭配套件
    lynis-report-converter

  35. HTML
    PDF
    XLSX
    JSON
    XML

  36. 下載轉換器套件

    wget <github>/lynis-report-converter.pl
    chmod +x lynis-report-converter.pl

  37. 安裝必要函式庫

    apt install htmldoc
    cpan install HTML::HTMLDoc

    apt install libxml-writer-perl
    apt install libarchive-zip-perl
    cpan install Excel::Writer::XLSX

  38. ./lynis-report-converter.pl -o out.html
    ./lynis-report-converter.pl -p -o out.pdf
    ./lynis-report-converter.pl -E -o out.xlsx

    (xlsx 是呼叫 LibreOffice 進行轉換)

    使用方式

  39. HTML

  40. PDF

  41. XLSX

  42. 參考資料

  43. Lynis
    https://github.com/CISOfy/lynis

    Lynis-report-converter
    https://github.com/d4t4king/lynis-report-converter

    Lynis - CISOfy
    https://cisofy.com/lynis/

    Lynis Documentation
    https://cisofy.com/documentation/lynis/

  44. 1 2
    節省工具箱 簡報集中處
    blog.jason.tools slide.jason.tools

    節省工具箱 Jason Tools

  45. END