簡報說明
系統要檢視的項目太多,要怎麼檢測系統的安全設定與檔案權限等項目呢?本次社群活動將介紹一款非常容易上手使用的工具,協助我們快速解決問題。
TFC 八月份活動第一個議程。
逐頁文字
2019-08-24 KALI 讀書會 x TFC x CDX @ Monospace
系統安全稽核即刻上手
{LYNIS}
Jason Cheng
耀達電腦錢能解決的問題都不是問題
😭 問題是沒有錢 😭(本頁無文字)
從何 看起?
1 具介紹
Lynis
開源系統安全稽核工具phpIPAM
開源 IP 管理平台法遵測試
自動稽核
漏洞檢測
滲透測試
改善建議phpIPAM
開源 IP 管理平台2 具安裝
動手安裝
安裝 Lynis
git clone https://github.com/CISOfy/lynis
不用這麼麻煩,
KALI Linux 準備好了。09 - Sniffing & Spoofing
10- Post Exploitation
12 - Reporting Tools
13- Social Engineering Tools(本頁無文字)
查看目前版本
lynis update info
查看 前版本
系統稽核
執行安全稽核
lynis audit system
安全稽核分數
Lynis security scan details:
Hardening index : 64 [############ ]
Tests performed : 126
Plugins enabled : 0快速查看重點
cat /var/log/lynis.log | grep Warning
cat /var/log/lynis.log | grep Suggestion
編號查看特定項
lynis show details PKGS-7392
lynis show details FILE-7524跳過指定測試
nano custom.prf
skip-test=PKGS-7392別搞那麼辛苦,換個工具看吧
Visual Studio Code
Text Power Tools
= 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](本頁無文字)
遠端稽核
執行遠端安全稽核
lynis audit system remote <ip>
執行
遠端安全稽核報告轉換
想讓報告更容易檢視
搭配套件
lynis-report-converterHTML
PDF
XLSX
JSON
XML下載轉換器套件
wget <github>/lynis-report-converter.pl
chmod +x lynis-report-converter.pl安裝必要函式庫
apt install htmldoc
cpan install HTML::HTMLDocapt install libxml-writer-perl
apt install libarchive-zip-perl
cpan install Excel::Writer::XLSX./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 進行轉換)
使用方式
HTML
PDF
XLSX
參考資料
Lynis
https://github.com/CISOfy/lynisLynis-report-converter
https://github.com/d4t4king/lynis-report-converterLynis - CISOfy
https://cisofy.com/lynis/Lynis Documentation
https://cisofy.com/documentation/lynis/1 2
節省工具箱 簡報集中處
blog.jason.tools slide.jason.tools節省工具箱 Jason Tools
END