snortのインストール方法

みんな,snortのインストール方法はどうやっているのかなぁ。おいらは野コンパイルしてるけど,Debianだと,apt-getでMySQLとかSnortとかACIDとかも入りそうだなぁ。試してないけど。
できる限り楽をするには,どういう方法があるかなぁ。。。

あと,Oinkmasterを入れたほうが良いのか?BASEも入れなきゃなぁ・・・

便利な端末

どこから接続してもnmapとpingとtracerouteがぶっ放せる端末があるってすばらしい。
あとは。。。nessusも入れとこうかな。あ、nessusもルール登録にsubscribeが必要なんだっけ?なんか面倒くさくなったなぁ。どっかにまとめサイトはないものか。(他力本願

# wget http://www.cirt.net/nikto/nikto-current.tar.gz
# tar zxvf nikto-current.tar.gz
# cd nikto-1.35/
# ./nikto.pl -update

準備完了。(なんの?
後は何を入れとこうかなぁ。ハッカージャパン見ながら考えるか。

Nessuインストール

何度かエラーになったが、必要なパッケージをそのつどインストールして、無事に終了。
となりにNessusエキスパートがいると便利だ。

# apt-get install flex
# apt-get install opessl-devel
# apt-get install bison

                                                                                                                                                              • -
NESSUS INSTALLATION SCRIPT
                                                                                                                                                              • -
                                                                                                                                                              • -
Nessus installation : Ready to install
                                                                                                                                                              • -
Nessus is now ready to be installed on this host. The installation process will first compile it then install it Press ENTER to continue x - Compiling the libraries x -- Configuring the sources for your system x -- Uninstalling any previous version of Nessus
  1. rm -f /usr/local/bin/nasl
  2. rm -f /usr/local/bin/nasl-config
  3. rm -f /usr/local/bin/nessus
  4. rm -f /usr/local/bin/nessus-config
  5. rm -f /usr/local/bin/nessus-build
  6. rm -f /usr/local/bin/nessus-mkrand
  7. rm -f /usr/local/bin/nessus-mkcert-client
  8. rm -f /usr/local/sbin/nessus-adduser
  9. rm -f /usr/local/sbin/nessus-rmuser
  10. rm -f /usr/local/sbin/nessusd
  11. rm -f /usr/local/sbin/nessus-update-plugins
  12. rm -f /usr/local/sbin/nessus-mkcert
  13. rm -f /usr/local/sbin/nessus-check-signature
  14. rm -rf /usr/local/include/nessus
  15. rm -f '/usr/local/lib/libhosts_gatherer.*'
  16. rm -f '/usr/local/lib/libnasl.*'
  17. rm -f '/usr/local/lib/libnessus.*'
  18. rm -f '/usr/local/lib/libpcap-nessus.*'
  19. rm -rf /usr/local/lib/nessus
  20. rm -f /usr/local/man/man1/nasl-config.1
  21. rm -f /usr/local/man/man1/nasl.1
  22. rm -f /usr/local/man/man1/nessus-build.1
  23. rm -f /usr/local/man/man1/nessus-config.1
  24. rm -f /usr/local/man/man1/nessus.1
  25. rm -f /usr/local/man/man1/nessus-mkrand.1
  26. rm -f /usr/local/man/man1/nessus-mkcert-client.1
  27. rm -f /usr/local/man/man8/nessus-mkcert.8
  28. rm -f /usr/local/man/man8/nessus-adduser.8
  29. rm -f /usr/local/man/man8/nessus-rmuser.8
  30. rm -f /usr/local/man/man8/nessus-update-plugins.8
  31. rm -f /usr/local/man/man8/nessusd.8
  32. test -n ''
  33. set +x
x -- Compiling x -- Installing x - Compiling the NASL interpretor x -- Configuring the sources for your system x -- Compiling nasl_func.c: In function `insert_nasl_func': nasl_func.c:100: warning: passing arg 4 of `qsort' from incompatible pointer type nasl_init.c: In function `init_nasl_library': nasl_init.c:425: warning: assignment discards qualifiers from pointer target type x -- Installing x - Compiling the core x -- Configuring the sources for your system ./configure: line 1: --version: command not found configure: warning: **** gtk not found x -- Compiling

しまった。この期に及んで、gtkがないとか言われてる。リコンパイルだな。

# apt-get install gtk+-devel
してnessusをリコンパイル

家に帰った

さて、続き、続き。えーっと、コンパイルは成功。脳内隣の人が、エラー吐くのを期待して待っているので、お約束でいきなりアップデート。

# /usr/local/sbin/nessus-update-plugins

あれ?さくっと終わった?エラーはかんやん。とりあえず、Nessus.orgから届いたメールをみる。レジストコードが書いてあった。

nessus-fetch --register xxxx-xxxx-xxxx-xxxx-xxxx

これを以下のURLにぶち込むと、ダウンロードURLをもらえた。

http://plugins.nessus.org/manual-register.php

ん?それだけの情報しかくれないの?不便利メモの人のサイトが見えなくなったのが痛い。googleキャッシュを参考にスクリプト書き換えようかと思ったけど、読むと書き換えるなとか書いてあるなぁ。ダウンロードURLはどう使うのだ?とかおもってみると、

/usr/local/lib/nessus/plugins

にすでにruleがあるな。。。なんでだ?updateしたから?よくわからん。

SSL証明書を生成。

# nessus-mkcert

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]:
Your location (e.g. town) [Paris]: Hiroshima
Your organization [Nessus Users United]: HoneyPotter

Nessusクライアント用ユーザの作成

# nessus-adduser
Using /var/tmp as a temporary file holder

Add a new nessusd user
                                          • -
Login : test Authentication (pass/cert) [pass] : Login password : Login password (again) : User rules
                  • -
nessusd has a rules system which allows you to restrict the hosts that hamamoto 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) Login : test Password : *********** DN : Rules :

ctrl-Dして終わった。

よし、nessusdの起動。

# nessusd & 

動いていなかったっぽい。脳内隣の人が、高笑いしていそうでくやしい。
nessus-fetch --register xxxx-xxxx-xxxx-xxxx-xxxx
これってコマンドだって最初わからなかった。というかnessus-fetchコマンド探したけど、/usr/local/sbinにないし。。。/usr/local/binにあったのね。けど、たいしたエラーにならなかったのは、all-2[1].0.tar.gzを/usr/local/lib/nessus/pluginsに展開していたからか?よくわからん。まぁ、動いているっぽいからいいか。(なげやり