●Snotを利用したアタックテスト |
実際に、Snortをインストールしたサーバへ「snot-0.92a」を利用し、アタックテストを行った結果を見てみよう。Snortは下記のようなオプションで起動し、ローカル環境でのテストを行っている。なお、当然のことだが、自分の管理しているネットワーク以外へ、以下の手段を用いることは法律に違反することとなるのは、承知しておいていただきたい。
# /usr/local/bin/snort -Dd -A fast -c /etc/snort/snort.conf -u snort -g snort |
snotでアタックテストを開始
では、snotを利用してアタックテストを行ってみよう。以下のコマンドを入力すると、攻撃が開始される。ここで「210.97.12.0/24」は、攻撃元となる偽のアドレス空間だ。
# ./snot -r ./snortrules.txt -s 210.97.12.0/24 -d 192.168.1.11 -l 5 snot V0.92 (alpha) by sniph (sniph00@yahoo.com) ---------------------------------------- Rulefile : ./snortrules.txt Source Address : 210.97.12.0/24 Dest Address : 192.168.1.11 Number of Packets : Unlimited Delay (max seconds): 5 Payloads : Random ---------------------------------------- [Parse Rules - Completed parsing 1066 rules - Sending now] TCP - "Virus - Possible Papa Worm" - 210.97.12.218:110 -> 192.168.1.11:36330 Sleeping for 2 seconds UDP - "EXPLOIT sparc NOOP" - 210.97.12.38:6892 -> 192.168.1.11:41814 Sleeping for 4 seconds ICMP - "ICMP Echo Reply" - 210.97.12.31 -> 192.168.1.11 Sleeping for 4 seconds TCP - "WEB-MISC netscape dir index wp" - 210.97.12.127:40478 -> 192.168.1.11:80 Sleeping for 0 seconds TCP - "TELNET not on console" - 210.97.12.197:23 -> 192.168.1.11:777 Sleeping for 1 seconds TCP - "INFO napster login" - 210.97.12.205:53662 -> 192.168.1.11:8888 Sleeping for 1 seconds TCP - "MS-SQL - xp_setsqlsecurity possible buffer overflow" - 210.97.12.124:3556 3 -> 192.168.1.11:1433 Sleeping for 2 seconds TCP - "WEB-MISC Phorum read access" - 210.97.12.2:12222 -> 192.168.1.11:80 Sleeping for 2 seconds TCP - "FTP RETR 1MB possible warez site" - 210.97.12.56:31282 -> 192.168.1.11:21 Sleeping for 4 seconds TCP - "WEB-CGI filemail access" - 210.97.12.125:14794 -> 192.168.1.11:80 Sleeping for 1 seconds TCP - "WEB-CGI snork.bat access" - 210.97.12.228:11933 -> 192.168.1.11:80 Sleeping for 2 seconds UDP - "RPC portmap request selection_svc" - 210.97.12.175:4305 -> 192.168.1.11:1 11 Sleeping for 3 seconds ICMP - "ICMP Mobile Registration Reply (Undefined Code!)" - 210.97.12.87 -> 192. 168.1.11 Sleeping for 4 seconds TCP - "Virus - Possible shs Worm" - 210.97.12.130:110 -> 192.168.1.11:46952 Sleeping for 1 seconds TCP - "SCAN ident version" - 210.97.12.97:23106 -> 192.168.1.11:113 Sleeping for 4 seconds TCP - "INFO Napster Client Data" - 210.97.12.225:62857 -> 192.168.1.11:7777 Sleeping for 4 seconds TCP - "WEB-COLDFUSION admin decrypt attempt" - 210.97.12.80:53516 -> 192.168.1.1 1:80 〜以下略〜 |
○Snotを利用したアタックテスト時のログディレクトリ
アタックテスト後にSnortのログディレクトリを見ると、指定したIPアドレスからの攻撃が、以下のように記録されている。
# ls /var/log/snort 210.97.12.16 210.97.12.187 210.97.12.38 210.97.12.96 210.97.12.88 210.97.12.120 210.97.12.163 210.97.12.189 210.97.12.51 210.97.12.97 210.97.12.121 210.97.12.17 210.97.12.2 210.97.12.56 210.97.12.99 210.97.12.124 210.97.12.175 210.97.12.202 210.97.12.79 210.97.12.125 210.97.12.177 210.97.12.226 210.97.12.80 210.97.12.127 210.97.12.181 210.97.12.228 210.97.12.86 210.97.12.138 210.97.12.184 210.97.12.238 210.97.12.87 210.97.12.147 210.97.12.185 210.97.12.242 210.97.12.88 〜以下略〜 |
○Snotを利用したアタックテスト時のalertログ
同様にalertログを見ると、膨大な量の攻撃ログが残されることになる。
07/30-22:32:35.333878 [**] [111:11:1] spp_stream4: STEALTH ACTIVITY (Vecna scan ) detection [**] {TCP} 210.97.12.218:110 -> 192.168.1.11:36330 07/30-22:32:37.340596 [**] [1:644:3] SHELLCODE sparc NOOP [**] [Classification: Executable code was detected] [Priority: 1] {UDP} 210.97.12.38:6892 -> 192.168. 1.11:41814 07/30-22:32:37.340683 [**] [1:644:3] SHELLCODE sparc NOOP [**] [Classification: Executable code was detected] [Priority: 1] {ICMP} 192.168.1.11 -> 210.97.12.38 07/30-22:32:45.358220 [**] [1:1160:6] WEB-MISC netscape dir index wp [**] [Clas sification: Attempted Information Leak] [Priority: 2] {TCP} 210.97.12.127:40478 -> 192.168.1.11:80 07/30-22:32:45.358628 [**] [1:717:5] TELNET not on console [**] [Classification : Potentially Bad Traffic] [Priority: 2] {TCP} 210.97.12.197:23 -> 192.168.1.11: 777 07/30-22:32:49.387250 [**] [1:1178:4] WEB-MISC Phorum read access [**] [Classif ication: Attempted Information Leak] [Priority: 2] {TCP} 210.97.12.2:12222 -> 19 2.168.1.11:80 07/30-22:32:51.396494 [**] [1:1377:7] FTP wu-ftp file completion attempt [ [**] [Classification: Misc Attack] [Priority: 2] {TCP} 210.97.12.56:31282 -> 192.168 .1.11:21 07/30-22:32:55.405525 [**] [1:858:5] WEB-CGI filemail access [**] [Classificati on: Attempted Information Leak] [Priority: 2] {TCP} 210.97.12.125:14794 -> 192.1 68.1.11:80 07/30-22:32:56.415132 [**] [1:860:5] WEB-CGI snork.bat access [**] [Classificat ion: Attempted Information Leak] [Priority: 2] {TCP} 210.97.12.228:11933 -> 192. 168.1.11:80 07/30-22:32:58.424435 [**] [1:586:2] RPC portmap request selection_svc [**] [Cl assification: Decode of an RPC Query] [Priority: 2] {UDP} 210.97.12.175:4305 -> 192.168.1.11:111 07/30-22:33:06.452313 [**] [1:616:3] SCAN ident version request [**] [Classific ation: Attempted Information Leak] [Priority: 2] {TCP} 210.97.12.97:23106 -> 192 .168.1.11:113 〜以下略〜 |
これらのログから「偽の攻撃ログ」が大量に作成されていることがわかるだろう。しかし、ログを見たところで、誰かが、なんらかの攻撃を行っているものがいることはわかるが、あまりにもログの量が多いため、いったいどれが本当の攻撃であるかを判断することは困難になる。
今回は攻撃元となる偽アドレスを210.97.12.0/24としているが、もちろんこのアドレスはランダムなものに変更することもできる。Stickも同様のアタックテストが可能だが、Snotはディレイタイムを遅くしたり、短時間で大量のアタックを行わないようにするなど、いくつかのオプションで細かく設定できる。このため、連続したアタックログを攻撃だと判断する、ということも難しい。いずれにしても実際にダウンロードしてローカル環境でテストしてみるとよいだろう。
3/4 |