注意

本ページで書いている覚書はローカルネットワーク内での実施を前提に書いています。
外部(他人)のサーバへこれを行うと、最悪訴えられる場合もあります。

さて、いきなり物騒な話ですが、脆弱性診断ツールなので
実際の攻撃と同等のものをおこなうんです。
設定によっては本当にサーバがおかしくなることもあるそうで、
設定には十分注意して使用しましょう

Nessusは2.x系と3.x系がありますが、2.x系はオープンソースで
3.x系はフリーですがオープンソースではありません。

ダウンロードはウェブからじゃないとできないっぽいので
以下のサイトからダウンロードしましょう。
http://www.nessus.org/download/

Nessus 2.2.10 Source Code選択
ライセンスに同意したら以下の5種類のファイルをダウンロード

  • libnasl-2.2.10.tar.gz
  • nessus-core-2.2.10.tar.gz
  • nessus-libraries-2.2.10.tar.gz
  • nessus-plugins-2.2.10.tar.gz
  • nessus-plugins-GPL-2.2.10.tar.gz(不要?)

インストール

cd /usr/local/src
tar zxvf nessus-libraries-2.2.10.tar.gz
cd nessus-libraries
./configure
make
make install

cd ../
tar zxvf libnasl-2.2.10.tar.gz
cd libnasl-2.2.10
./configure
make
make install

cd ../
tar zxvf nessus-core-2.2.10.tar.gz
cd nessus-core-2.2.10
./configure --enable-syslog --enable-gtk --enable-tcpwrappers
make
make install

とりあえずこれでインストール完了です。
次にプラグインのインストールです。

cd /usr/local/src
tar zxvf nessus-plugins-GPL-2.2.10.tar.gz
tar zxvf nessus-plugins-2.2.10.tar.gz
cd nessus-plugins
./configure
make
make install

設定

まずは認証局の設定です。

nessus-mkcert
以下適当に入力
-------------------------------------------------------------------------------
Creation of the Nessus SSL Certificate
-------------------------------------------------------------------------------

This script will now ask you the relevant information to create the SSL
certificate of Nessus. Note that this information will *NOT* be sent to
anybody (everything stays local), but anyone with the ability to connect to your
Nessus daemon will be able to retrieve this information.


CA certificate life time in days [1460]:
Server certificate life time in days [365]:
Your country (two letter code) [FR]: JP
Your state or province name [none]: momo-i
Your location (e.g. town) [Paris]: Japan
Your organization [Nessus Users United]: momo-i
-------------------------------------------------------------------------------
Creation of the Nessus SSL Certificate
-------------------------------------------------------------------------------

Congratulations. Your server certificate was properly created.

/usr/local/etc/nessus/nessusd.conf updated

The following files were created :

. Certification authority :
Certificate = /usr/local/com/nessus/CA/cacert.pem
Private key = /usr/local/var/nessus/CA/cakey.pem

. Nessus Server :
Certificate = /usr/local/com/nessus/CA/servercert.pem
Private key = /usr/local/var/nessus/CA/serverkey.pem

Press [ENTER] to exit

Nessus用のユーザ作成(OSのユーザとは別)

nessus-adduser
以下適当に入力
Using /var/tmp as a temporary file holder

Add a new nessusd user
----------------------


Login : momo-i
Authentication (pass/cert) [pass] :#そのままエンター
Login password :#そのままエンター
Login password (again) :#そのままエンター

User rules
----------
nessusd has a rules system which allows you to restrict the hosts
that momo-i has the right to test. For instance, you may want
him to be able to scan his own host only.

Please see the nessus-adduser(8) man page for the rules syntax

Enter the rules for this user, and hit ctrl-D once you are done :
(the user can have an empty rules set)
#Ctrl+Dを押す

Login : momo-i
Password : ***********
DN :
Rules :


Is that ok ? (y/n) [y] y
user added.

プラグインの更新

nessus-update-plugins

サーバデーモンのスタート

nessusd -D
Loading the plugins... xxx (out of 17682)#xxxは勝手にふえていきます。

All plugins loadedになったらデーモンが正常にうごきました。

tcp_wrapperを有効にしている場合は適宜hosts.allowに
nessusd: IPADDRESSを追加してください。

クライアント起動

クライアントはマルチOS対応です。
FedoraのGUIが有効ならターミナルを立ち上げてnessus
と打ち込むとGUI画面が起動するかもしれません
今回はWindows用のGUIをつかいます。
上のダウンロードページのアイテムのNessusClient 3.0.0~~を選択して
ダウンロードしましょう。
インストールはセットアップファイルを実行してNextを連打です。

デスクトップにNessus Clientというアイコンができるので起動します。
タブにScan・Reportがありその下に以下のものがあります。

Network(s) to scan :
Select a scan policy :

Network(s) to scanには何も無く、Select a scan policyには
「Default scan policy」と「Microsoft Patches」というものがありますので
その下にConnectというボタンがあるのでまずはそれをクリックします。

新しいWindow(Connection Manager)が立ち上がるので「+」アイコンをクリックして
Nessusdのサーバのアドレスと作ったユーザ・パスワードを入力します。
Connection nameは適当にいれてください。
できたらConnectで接続します。

次にNetwork(s)~の下にある「+」をクリックします。
Edit TargetというWindowが開くのでHost name:にlocalhostと入れます。
今回は自分自身のみチェックするのでlocalhostにしています。
複数のIPアドレスやサブネット、ファイルに記述したホストとかいろいろできます。

そうすると「Scan Now」のボタンが押せるようになるのでおします。
Scanが始まるとタブがReportに自動的に移動して画面右下に進捗状況が表示されます。

最初にポートスキャンをして、あいてるポートに対して攻撃をしかけます。
general/tcpやftp (21/tcp)といった物がずらーっと表示されるとおもいます。

黒は特に問題の見つからなかったアプリケーションで
黄色は注意が必要なアプリケーションです。
赤はセキュリティホールがあるかもしれないアプリケーションです。

コメントを追加

制限付き HTML

  • 使用できるHTMLタグ: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • 行と段落は自動的に折り返されます。
  • ウェブページのアドレスとメールアドレスは自動的にリンクに変換されます。
CAPTCHA
半角で
この質問はあなたが人間の訪問者であるかどうかをテストし、自動化されたスパム送信を防ぐためのものです。
ももーい に投稿