10/18/2017

[SYSTEM HACKING] lynis를 이용한 시스템 취약점 스캔(System vulnerability Scanning with lynis)

Install 

설치는 다른 툴과 동일하게 아주 심플합니다.
CISOfy의 github를 이용해도 되고 패키지 매니저를 이용해도 됩니다.

#> apt-get install lynis

or

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

Usage

크게 2가지 옵션이 존재합니다. audit, update이고 이름 그래도 audit은 분석 update는 업데이트입니다.

    audit
        audit system                  : Perform security scan
        audit dockerfile <file>       : Analyze Dockerfile

    update
        update info                   : Show update details
        update release                : Update Lynis release

하나 봐야할건, audit 하위 옵션으로 system과 dockerfile 이 있는데 systemd으로 인자값을 넘겨줄 시 lynis가 깔린 해당 시스템에 대한 진단을 수행하고 dockerfile을 넘겨줄 시 Docker 내부에서 진단을 수행하게 됩니다.

Scan options

audit으로 진단 시 추가적인 옵션을 줄 수 있습니다.

  Scan options:
    --auditor "<name>"            : Auditor name
    --dump-options                : See all available options
    --no-log                      : Don't create a log file
    --pentest                     : Non-privileged scan (useful for pentest)
    --profile <profile>           : Scan the system with the given profile file
    --quick (-Q)                  : Quick mode, don't wait for user input
    --tests "<tests>"             : Run only tests defined by <tests>
    --tests-category "<category>" : Run only tests defined by <category>

  Layout options:
    --no-colors                   : Don't use colors in output
    --quiet (-q)                  : No output, except warnings
    --reverse-colors              : Optimize color display for light backgrounds

  Misc options:
    --debug                       : Debug logging to screen
    --view-manpage (--man)        : View man page
    --version (-V)                : Display version number and quit

  Enterprise options:
    --plugin-dir "<path>"         : Define path of available plugins
    --upload                      : Upload data to central node

요정도이고.. 실제 테스트 시 이런식으로 명령을 전달해주면 됩니다.

Quick scan
#> lynis audit system -Q

Non-privileged scan
#> lynis audit system --pentest

Debug scan
#> lynis audit system --debug





HAHWUL

Security engineer, Gopher and H4cker!

Share: | Coffee Me:

0 개의 댓글:

Post a Comment