74
73

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ウェブサイトの脆弱性を確認する-Nikto

Posted at

#ウェブサイトの脆弱性を確認する
オープンソースのセキュリティスキャナ(Nikto: 公式サイト)のインストールと基本的な利用方法

インストール

Nikto の公式ホームページからプログラム本体をダウンロード

# cd /usr/local/src
# wget https://cirt.net/nikto/nikto-2.1.5.tar.gz

プログラム本体を展開

# tar xvfz nikto-2.1.5.tar.gz
# mv nikto-2.1.5 /usr/local

プラグインとデータベースの更新

# cd /usr/local/nikto-2.1.5
# perl ./nikto.pl -update

ウェブサイトの脆弱性診断

基本的なコマンドフォーマットは以下の通り

  • perl ./nikto.pl -h 診断対象ホスト

自分自身のApache を診断

# perl ./nikto.pl -h 127.0.0.1

結果

- Nikto v2.1.5
---------------------------------------------------------------------------
+ Target IP:          127.0.0.1
+ Target Hostname:    localhost.localdomain
+ Target Port:        80
+ Start Time:         2015-05-13 19:45:13 (GMT9)
---------------------------------------------------------------------------
+ Server: Apache/2.2.15 (CentOS)
+ The anti-clickjacking X-Frame-Options header is not present.
+ Apache/2.2.15 appears to be outdated (current is at least Apache/2.2.22). Apache 1.3.42 (final release) and 2.0.64 are also current.
+ Allowed HTTP Methods: GET, HEAD, POST, OPTIONS, TRACE
+ OSVDB-877: HTTP TRACE method is active, suggesting the host is vulnerable to XST
+ Retrieved x-powered-by header: PHP/5.3.3
+ OSVDB-3233: /info.php: PHP is installed, and a test script which runs phpinfo() was found. This gives a lot of system information.
+ OSVDB-3268: /icons/: Directory indexing found.
++ Server leaks inodes via ETags, header found with file /icons/README, inode: 170756349, size: 5108, mtime: 0x438c0358aae80
+ OSVDB-3233: /icons/README: Apache default file found.
+ 6545 items checked: 0 error(s) and 10 item(s) reported on remote host
+ End Time:           2015-05-13 19:46:02 (GMT9) (49 seconds)
---------------------------------------------------------------------------
+ 1 host(s) tested

問題が発見された。対応については次回に記載

SSL サイトの診断方法

SSLのサイトを診断するには、以下のパッケージが必要になる(CentOS6)

# yum install openssl-devel perl perl-Net-SSLeay perl-Crypt-SSLeay

診断するコマンドは同様

# perl ./nikto.pl -h https://127.0.0.1
74
73
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
74
73

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?