Skip to content

Instantly share code, notes, and snippets.

@kotakanbe
Last active October 29, 2020 07:28
Show Gist options
  • Select an option

  • Save kotakanbe/5e7ff3ca54bb8232d6cf1a75af18262d to your computer and use it in GitHub Desktop.

Select an option

Save kotakanbe/5e7ff3ca54bb8232d6cf1a75af18262d to your computer and use it in GitHub Desktop.

Revisions

  1. kotakanbe revised this gist Sep 1, 2020. No changes.
  2. kotakanbe revised this gist Sep 1, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Vulsctl-tutorial-docker-ja.md
    Original file line number Diff line number Diff line change
    @@ -184,7 +184,7 @@ host centos7.6.1810 359 installed, 63 updatable
    今回はCentOSをスキャンしたので`--redhat`をつけて実行します。Ubuntuなどほかのディストリビューションの場合は対応するオプションを付けてフェッチしてください。オプションの詳細は下記ページを参考にして下さい。
    - [vulsctl/oval.sh](https://github.com/vulsio/vulsctl/blob/master/docker/oval.sh)
    - [vulsctl/docker/oval.sh](https://github.com/vulsio/vulsctl/blob/master/docker/oval.sh)
    - [kotakanbe/goval-dictionary](https://github.com/kotakanbe/goval-dictionary)
    ```bash
  3. kotakanbe revised this gist Sep 1, 2020. No changes.
  4. kotakanbe revised this gist Sep 1, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Vulsctl-tutorial-docker-ja.md
    Original file line number Diff line number Diff line change
    @@ -333,7 +333,7 @@ $ ./tui.sh
    もし他のLinuxディストリビューションをスキャンする場合は、同じように対応するOVALを事前に準備して下さい。詳細はドキュメントを参考にして下さい。
    - [vulsctl/oval.sh](https://github.com/vulsio/vulsctl/blob/master/doccker/oal.sh)
    - [vulsctl/oval.sh](https://github.com/vulsio/vulsctl/blob/master/docker/oal.sh)
    - [kotakanbe/goval-dictionary](https://github.com/kotakanbe/goval-dictionary)
    ---
  5. kotakanbe revised this gist Sep 1, 2020. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Vulsctl-tutorial-docker-ja.md
    Original file line number Diff line number Diff line change
    @@ -333,7 +333,7 @@ $ ./tui.sh
    もし他のLinuxディストリビューションをスキャンする場合は、同じように対応するOVALを事前に準備して下さい。詳細はドキュメントを参考にして下さい。
    - [vulsctl/oval.sh](https://github.com/vulsio/vulsctl/blob/master/docker/oval.sh)
    - [vulsctl/oval.sh](https://github.com/vulsio/vulsctl/blob/master/doccker/oal.sh)
    - [kotakanbe/goval-dictionary](https://github.com/kotakanbe/goval-dictionary)
    ---
    @@ -602,7 +602,7 @@ Gemやpipなどのプログラミング言語のパッケージマネージャ
    - yarn.lock
    - Cargo.lock
    では試しにGitHubにあった[古いRedmineのGemfile.lock](https://github.com/41studio/redmine/blob/master/docker/Gemfile.lock)をスキャンしてみましょう。
    では試しにGitHubにあった[古いRedmineのGemfile.lock](https://github.com/41studio/redmine/blob/master/Gemfile.lock)をスキャンしてみましょう。
    まずスキャン対象サーバ上でwgetで古いGemfile.lockを取得します。
  6. kotakanbe revised this gist Sep 1, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Vulsctl-tutorial-docker-ja.md
    Original file line number Diff line number Diff line change
    @@ -602,7 +602,7 @@ Gemやpipなどのプログラミング言語のパッケージマネージャ
    - yarn.lock
    - Cargo.lock
    では試しにGitHubにあった[古いRedmineのGemfile.lock](https://github.com/41studio/redmine/blob/master/Gemfile.lock)をスキャンしてみましょう。
    では試しにGitHubにあった[古いRedmineのGemfile.lock](https://github.com/41studio/redmine/blob/master/docker/Gemfile.lock)をスキャンしてみましょう。
    まずスキャン対象サーバ上でwgetで古いGemfile.lockを取得します。
  7. kotakanbe revised this gist Sep 1, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Vulsctl-tutorial-docker-ja.md
    Original file line number Diff line number Diff line change
    @@ -333,7 +333,7 @@ $ ./tui.sh
    もし他のLinuxディストリビューションをスキャンする場合は、同じように対応するOVALを事前に準備して下さい。詳細はドキュメントを参考にして下さい。
    - [vulsctl/oval.sh](https://github.com/vulsio/vulsctl/blob/master/oval.sh)
    - [vulsctl/oval.sh](https://github.com/vulsio/vulsctl/blob/master/docker/oval.sh)
    - [kotakanbe/goval-dictionary](https://github.com/kotakanbe/goval-dictionary)
    ---
  8. kotakanbe revised this gist Sep 1, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Vulsctl-tutorial-docker-ja.md
    Original file line number Diff line number Diff line change
    @@ -272,7 +272,7 @@ Total: 111 (High:57 Medium:39 Low:15 ?:0), 35/111 Fixed, 359 installed, 63 updat
    Vulsにはターミナル上で結果を確認可能なTerminalベースのビューアが付属しています。こちらで結果を確認してみましょう。
    [vulsctl/tui.sh](https://github.com/vulsio/vulsctl/blob/master/tui.sh)を使ってコンソール上で結果を確認します。
    [vulsctl/tui.sh](https://github.com/vulsio/vulsctl/blob/master/docker/tui.sh)を使ってコンソール上で結果を確認します。
    Tabでペインを移動し、矢印やjkで移動します。Ctrl-Cで終了します。
    詳細は[ドキュメント](https://vuls.io/docs/en/usage-tui.html)を参照ください。
  9. kotakanbe revised this gist Sep 1, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Vulsctl-tutorial-docker-ja.md
    Original file line number Diff line number Diff line change
    @@ -216,7 +216,7 @@ $ ls -alh oval.sqlite3
    さて脆弱性DBの準備が整いましたので、レポートを実行します。
    [vulsctl/report.sh](https://github.com/vulsio/vulsctl/blob/master/report.sh)を使って結果を表示します。
    [vulsctl/report.sh](https://github.com/vulsio/vulsctl/blob/master/docker/report.sh)を使って結果を表示します。
    scan.shで作成されたJSONの情報と、先程取得したRed Hatが提供するOVALを用いてスキャン対象サーバに潜在するCVE-IDを特定します。
    詳細は[ドキュメント](https://vuls.io/docs/en/usage-report.html)を参照ください。
  10. kotakanbe revised this gist Sep 1, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Vulsctl-tutorial-docker-ja.md
    Original file line number Diff line number Diff line change
    @@ -184,7 +184,7 @@ host centos7.6.1810 359 installed, 63 updatable
    今回はCentOSをスキャンしたので`--redhat`をつけて実行します。Ubuntuなどほかのディストリビューションの場合は対応するオプションを付けてフェッチしてください。オプションの詳細は下記ページを参考にして下さい。
    - [vulsctl/oval.sh](https://github.com/vulsio/vulsctl/blob/master/oval.sh)
    - [vulsctl/oval.sh](https://github.com/vulsio/vulsctl/blob/master/docker/oval.sh)
    - [kotakanbe/goval-dictionary](https://github.com/kotakanbe/goval-dictionary)
    ```bash
  11. kotakanbe revised this gist Sep 1, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Vulsctl-tutorial-docker-ja.md
    Original file line number Diff line number Diff line change
    @@ -131,7 +131,7 @@ keyPathはHostOS内のパスではなく、Dockerコンテナ内のパスを指

    それでは、先程用意した設定ファイルを用いて実際にスキャンしてみましょう。

    [vulsctl/scan.sh](https://github.com/vulsio/vulsctl/blob/master/scan.sh)はconfig.tomlで設定された情報を元に実際にスキャンするスクリプトです。 スキャン結果はJSON形式で`$PWD/results`以下に保存され、report時に利用されます。 スキャン対象サーバはコマンドライン引数で指定可能です。今回は`host`を指定しているため、config.tomlに定義された[servers.host]をスキャンします。
    [vulsctl/scan.sh](https://github.com/vulsio/vulsctl/blob/master/docker/scan.sh)はconfig.tomlで設定された情報を元に実際にスキャンするスクリプトです。 スキャン結果はJSON形式で`$PWD/results`以下に保存され、report時に利用されます。 スキャン対象サーバはコマンドライン引数で指定可能です。今回は`host`を指定しているため、config.tomlに定義された[servers.host]をスキャンします。
    Vulsはconfig.tomlに定義されたSSH接続情報を用いて、スキャン対象サーバに実際にSSHで接続し、スキャン対象サーバ上でコマンドを発行します。
    スキャンのモードはいくつかありますが、今回はconfig.tomlで何も指定していないためデフォルトの[fastスキャンモード](https://vuls.io/docs/en/architecture-fast-scan.html)でスキャンされます。

  12. kotakanbe revised this gist Sep 1, 2020. No changes.
  13. kotakanbe revised this gist Aug 31, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Vulsctl-tutorial-docker-ja.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@

    # Vulsチュートリアル

    [Vuls](https://github.com/future-architect/vuls)は、Linux / FreeBSD, Container, WordPress, アプリケーション依存ライブラリ、Network機器、ミドルウェアの既知の脆弱性を検知するツールである
    [Vuls](https://github.com/future-architect/vuls)は、Linux / FreeBSD, Container, WordPress, アプリケーション依存ライブラリ、Network機器、ミドルウェアの既知の脆弱性を検知するツールです

    このチュートリアルは、Vulsの簡単セットアップツールである、[Vulsctl](https://github.com/vulsio/vulsctl)を用いて

  14. kotakanbe revised this gist Aug 31, 2020. 1 changed file with 4 additions and 16 deletions.
    20 changes: 4 additions & 16 deletions Vulsctl-tutorial-docker-ja.md
    Original file line number Diff line number Diff line change
    @@ -693,22 +693,10 @@ $ ./update-all.sh
    ---
    ## その他
    https://vuls.io/docs/ja/usage-scan-non-os-packages.html#options
    ## Misc
    各種DBは日々更新されるので定期的にupdateする必要がある
    - [WordPress](https://vuls.io/docs/ja/usage-scan-wordpress.html#scan-wordpress-core-plugin-theme)
    wordpressの脆弱性検知
    https://vuls.io/docs/ja/usage-scan-wordpress.html#scan-wordpress-core-plugin-theme
    - [Slack Notification](https://vuls.io/docs/ja/usage-settings.html#slack-section)
    Slack通知
    https://vuls.io/docs/ja/usage-settings.html#slack-section
    アプリケーションのライブラリ脆弱性検知はGitHub連携がおすすめ
    https://vuls.io/docs/en/usage-scan-non-os-packages.html#usage-integrate-with-github-security-alerts
    Dockerレジストリ上のDockerImageのスキャン
    https://vuls.io/docs/ja/tutorial-scan-docker-image.html#container-image-scanning
    実行中のDockerコンテナのスキャン
    https://vuls.io/docs/ja/usage-scan.html#example-scan-running-containers-docker-lxd-lxc
    - [Scan running containers](https://vuls.io/docs/ja/usage-scan.html#example-scan-running-containers-docker-lxd-lxc)
  15. kotakanbe revised this gist Aug 31, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Vulsctl-tutorial-docker-ja.md
    Original file line number Diff line number Diff line change
    @@ -672,7 +672,7 @@ $ ./tui.sh
    [vuls.io/usage-report](https://vuls.io/docs/en/usage-report.html)
    |オプション|説明|
    |-|:-|
    |:-|:-|
    | -debug | デバッグ用フラグ。発行しているコマンドがわかる |
    | -cvss-over | CVSSスコアでフィルタ|
    | -ignore-unfixed | パッチがまだない脆弱性は非表示 |
  16. kotakanbe revised this gist Aug 31, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Vulsctl-tutorial-docker-ja.md
    Original file line number Diff line number Diff line change
    @@ -672,7 +672,7 @@ $ ./tui.sh
    [vuls.io/usage-report](https://vuls.io/docs/en/usage-report.html)
    |オプション|説明|
    |-|-|
    |-|:-|
    | -debug | デバッグ用フラグ。発行しているコマンドがわかる |
    | -cvss-over | CVSSスコアでフィルタ|
    | -ignore-unfixed | パッチがまだない脆弱性は非表示 |
  17. kotakanbe revised this gist Aug 31, 2020. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Vulsctl-tutorial-docker-ja.md
    Original file line number Diff line number Diff line change
    @@ -671,8 +671,8 @@ $ ./tui.sh
    [vuls.io/usage-report](https://vuls.io/docs/en/usage-report.html)
    |オプション|説明||
    |-|-|-|
    |オプション|説明|
    |-|-|
    | -debug | デバッグ用フラグ。発行しているコマンドがわかる |
    | -cvss-over | CVSSスコアでフィルタ|
    | -ignore-unfixed | パッチがまだない脆弱性は非表示 |
  18. kotakanbe revised this gist Aug 31, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Vulsctl-tutorial-docker-ja.md
    Original file line number Diff line number Diff line change
    @@ -588,7 +588,7 @@ Vulsはアプリケーションの依存ライブラリのスキャンに対応
    ## アプリケーションのライブラリ脆弱性の検知(lock file指定)
    Gemやpipなどのプログラミング言語のパッケージマネージャのバージョン固定用ロックファイルを解析し、そこに定義されている依存ライブラリに潜在する脆弱性を検知可能です。(内部で[knqyf263/trivy](https://github.com/aquasecurity/trivy)を呼んでいます)
    Gemやpipなどのプログラミング言語のパッケージマネージャのバージョン固定用ロックファイルを解析し、そこに定義されている依存ライブラリに潜在する脆弱性を検知可能です。(内部で[aquasecurity/trivy](https://github.com/aquasecurity/trivy)を呼んでいます)
    [ドキュメント](https://vuls.io/docs/en/usage-scan-non-os-packages.html#library-vulns-scan)はこちらです。
  19. kotakanbe revised this gist Aug 31, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Vulsctl-tutorial-docker-ja.md
    Original file line number Diff line number Diff line change
    @@ -588,7 +588,7 @@ Vulsはアプリケーションの依存ライブラリのスキャンに対応
    ## アプリケーションのライブラリ脆弱性の検知(lock file指定)
    Gemやpipなどのプログラミング言語のパッケージマネージャのバージョン固定用ロックファイルを解析し、そこに定義されている依存ライブラリに潜在する脆弱性を検知可能です。(内部で[knqyf263/trivy](https://github.com/knqyf263/trivy)を呼んでいます)
    Gemやpipなどのプログラミング言語のパッケージマネージャのバージョン固定用ロックファイルを解析し、そこに定義されている依存ライブラリに潜在する脆弱性を検知可能です。(内部で[knqyf263/trivy](https://github.com/aquasecurity/trivy)を呼んでいます)
    [ドキュメント](https://vuls.io/docs/en/usage-scan-non-os-packages.html#library-vulns-scan)はこちらです。
  20. kotakanbe revised this gist Aug 31, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Vulsctl-tutorial-docker-ja.md
    Original file line number Diff line number Diff line change
    @@ -578,7 +578,7 @@ Vulsはアプリケーションの依存ライブラリのスキャンに対応
    - [LockFile Scan](https://vuls.io/docs/en/usage-scan-non-os-packages.html#library-vulns-scan)
    - [GitHub Integration](https://vuls.io/docs/en/usage-scan-non-os-packages.html#usage-integrate-with-github-security-alerts)
    - OWASP Dependency check
    - [OWASP Dependency check](https://vuls.io/docs/en/usage-scan-non-os-packages.html#usage-integrate-with-owasp-dependency-check-to-automatic-update-when-the-libraries-are-updated-experimental)
    詳細は[Document](https://vuls.io/docs/en/usage-scan-non-os-packages.html)を参照してください。
  21. kotakanbe revised this gist Aug 31, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Vulsctl-tutorial-docker-ja.md
    Original file line number Diff line number Diff line change
    @@ -577,7 +577,7 @@ Vulsはアプリケーションの依存ライブラリのスキャンに対応
    複数の方法があり、それぞれ向き不向きがあるので実際に試してみるのがよいでしょう。
    - [LockFile Scan](https://vuls.io/docs/en/usage-scan-non-os-packages.html#library-vulns-scan)
    - [GitHub Integration
    - [GitHub Integration](https://vuls.io/docs/en/usage-scan-non-os-packages.html#usage-integrate-with-github-security-alerts)
    - OWASP Dependency check
    詳細は[Document](https://vuls.io/docs/en/usage-scan-non-os-packages.html)を参照してください。
  22. kotakanbe revised this gist Aug 31, 2020. No changes.
  23. kotakanbe revised this gist Aug 31, 2020. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Vulsctl-tutorial-docker-ja.md
    Original file line number Diff line number Diff line change
    @@ -576,8 +576,8 @@ Vulsはアプリケーションの依存ライブラリのスキャンに対応
    複数の方法があり、それぞれ向き不向きがあるので実際に試してみるのがよいでしょう。
    - [Lockファイルスキャン](https://vuls.io/docs/en/usage-scan-non-os-packages.html#library-vulns-scan)
    - GitHub Integration
    - [LockFile Scan](https://vuls.io/docs/en/usage-scan-non-os-packages.html#library-vulns-scan)
    - [GitHub Integration
    - OWASP Dependency check
    詳細は[Document](https://vuls.io/docs/en/usage-scan-non-os-packages.html)を参照してください。
  24. kotakanbe revised this gist Aug 31, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Vulsctl-tutorial-docker-ja.md
    Original file line number Diff line number Diff line change
    @@ -576,7 +576,7 @@ Vulsはアプリケーションの依存ライブラリのスキャンに対応
    複数の方法があり、それぞれ向き不向きがあるので実際に試してみるのがよいでしょう。
    - Specify lock files
    - [Lockファイルスキャン](https://vuls.io/docs/en/usage-scan-non-os-packages.html#library-vulns-scan)
    - GitHub Integration
    - OWASP Dependency check
  25. kotakanbe revised this gist Aug 31, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Vulsctl-tutorial-docker-ja.md
    Original file line number Diff line number Diff line change
    @@ -61,7 +61,7 @@ $ cd vulsctl
    $ git pull
    ```

    これ以降の操作は**dockerディレクトリ内で作業します**
    これ以降の操作は**vulsctl/dockerディレクトリ内で作業します**

    ```bash
    $ cd docker
  26. kotakanbe revised this gist Aug 31, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Vulsctl-tutorial-docker-ja.md
    Original file line number Diff line number Diff line change
    @@ -54,7 +54,7 @@ remote: Total 14 (delta 4), reused 12 (delta 2), pack-reused 0
    Unpacking objects: 100% (14/14), done.
    ```

    - 以前vulsctlをセットアップ済みの環境の場合は最新化して下さい。
    以前vulsctlをセットアップ済みの環境の場合は最新化して下さい。

    ```bash
    $ cd vulsctl
  27. kotakanbe revised this gist Aug 31, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Vulsctl-tutorial-docker-ja.md
    Original file line number Diff line number Diff line change
    @@ -31,7 +31,7 @@ Vulsセットアップ用のLinuxマシンを一台準備して下さい。

    今回はCentOS 7を例に説明します。

    SSHなどで接続してgitをインストールします
    SSHで接続してgitをインストールします

    ```bash
    $ sudo yum install git
  28. kotakanbe revised this gist Aug 31, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Vulsctl-tutorial-docker-ja.md
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@
    - アプリケーション依存ライブラリ脆弱性スキャン
    - ネットワーク機器OSのCPEスキャン

    のチュートリアルです
    を解説します

    VulsはDockerHub上にDockerイメージを提供しており、その公式イメージを使ったチュートリアルとなります。Docker Hub公式レポジトリは[こちら](https://hub.docker.com/orgs/vuls/repositories)

  29. kotakanbe revised this gist Aug 31, 2020. No changes.
  30. kotakanbe revised this gist Aug 31, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Vulsctl-tutorial-docker-ja.md
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@

    [Vuls](https://github.com/future-architect/vuls)は、Linux / FreeBSD, Container, WordPress, アプリケーション依存ライブラリ、Network機器、ミドルウェアの既知の脆弱性を検知するツールである。

    このチュートリアルは、Vulsの簡単セットアップツールである、[Vuslctl](https://github.com/vulsio/vulsctl)を用いて
    このチュートリアルは、Vulsの簡単セットアップツールである、[Vulsctl](https://github.com/vulsio/vulsctl)を用いて

    - HostOS(CentOS)の脆弱性をリモートスキャン
    - SSHでUbuntuをリモートスキャン