Debian EtchにNepenthesしこむ

ハニーポットで検体収集したかったのでnepenthes仕込んでみた
http://nepenthes.mwcollect.org/


Debian etchにはパッケージがあるので

apt-get update
apt-get install nepenthes
で入る。バージョンは0.1.7-3。最新は0.2.2
設定ファイルとかは/etc/nepenthes/
ログは/var/log/nepenthes.log /var/log/nepenthes/

hexdumpsに溜まったファイルをチェック

/usr/sbin/nepenthes -f rmknown,rmnonop,dononp /var/lib/nepenthes/hexdumps

/var/lib/nepenthes/binaries/
に溜まったファイルをhttp://www.virustotal.com/に投げるプログラム


MailSend.pmはここから
http://www.mukairiku.net/PerlModule/MailSend.pm.html

#!/usr/bin/perl
use strict;
use MailSend;


my $dir = "/var/lib/nepenthes/binaries/";
my @file;
my $file;


opendir(DIR, $dir) or die;
@file = sort grep { -f "$dir/$_"} readdir(DIR);
closedir(DIR);


my $msg = < '',
"From" => '', #このアドレスに結果が届きます
"Subject" => 'SCAN',
"Msg" => "$msg",
"Server" => 'localhost',
"User" => '',
"Pass" => '',
"Attach" => "$dir/$file",
);
MailSend(\%data);
}

48時間たったものを送ってますが、この辺はCronを24時間ごとにまわすとかお好みで

せっかく捕獲した検体をviruschekしてみたいなら(avast,avg,antivir)
http://www12.atwiki.jp/linux2ch/pages/78.html
http://www.avast.com/jpn/download-avast-for-linux-edition.html
http://free.grisoft.com/doc/5390/jp/frt/0?prd=afl
http://www.free-av.com/en/download/download_servers.php
とかを利用するとよいかな