【注意】このサイトに記載されていることを他人に試すことは「不正アクセス禁止法」に該当する場合があります。詳しくはこちらから

ハッカーはike-scan使いを実装しているホストを特定する(Kali Linuxツール説明)

ホワイトハッカーの知識座学,Kali Linuxツール,ike-scan

IKEを実装しているホストを特定する方法を理解するためにまとめてみました。
このike-scanの動作確認は自分のドメインでテストを行っています。

ike-scanとは

ike-scanは、IKEを実装しているホストを特定するツールで、ike-scanによって送信されたIKE要求に応答するホストを表示します。

IKE(Internet Key Excange)とは、ネットワーク層のレベルでセキュリティを監視するIPsecを構成するプロトコルのうちの一つである。
IKEは改ざんの検出や暗号通信に用いる共通鍵を生成するためのプロトコルになります。

機能

  • バックオフフィンガープリント
    ターゲットホストからのIKE応答パケットの時間を記録し、観測された再送信バックオフパターンを既知のパターンと比較します
  • ベンダーIDフィンガープリント
    ベンダー固有のベンダーIDを既知のベンダーIDパターンと照合します
  • 独自の通知メッセージコードを出力します

ツールの場所

[Applications]→[01-Information Gathering]→[ike-scan]

ツールと使用方法

ike-scan [options] [hosts…]

例 ike-scan www.yahoo.co.jp

【実行イメージ】少し端折って整形しています。

┌──(root__kali)-[/home/kali]
└─# ike-scan ******.com
Starting ike-scan 1.9.4 with 1 hosts (http://www.nta-monitor.com/tools/ike-scan/)

Ending ike-scan 1.9.4: 1 hosts scanned in 2.490 seconds (0.40 hosts/sec). 0 returned handshake; 0 returned notify
whitemarkn
whitemarkn
私のサーバーでテストしましたが、IKEを実装しているホストは無かった様子です。

オプション

–help or -h

Display this usage message and exit.
この使用メッセージを表示して終了します。

–file=<fn> or -f <fn>

Read hostnames or addresses from the specified file instead of from the command line. One name or IP address per line. Use “-" for standard input.
コマンドラインからではなく、指定されたファイルからホスト名やアドレスを読み込みます。1行に1つの名前またはIPアドレスを入力します。 標準入力の場合は"-“を使用します。

–sport=<p> or -s <p>

Set UDP source port to <p>, default=500, 0=random.
Some IKE implementations require the client to use UDP source port 500 and will not talk to other ports.
Note that superuser privileges are normally required to use non-zero source ports below 1024. Also only one process on a system may bind to a given source port at any one time. Use of the –nat-t option changes the default source port to 4500.
UDPソースポートを<p>に設定します。デフォルト=500、0=ランダムです。
IKEの実装によっては、クライアントがUDPソースポート500を使用することを要求し、他のポートでは通信しないものもあります。
なお、1024以下の非ゼロのソースポートを使用するには、通常、スーパーユーザ権限が必要です。 また、1つのソースポートにバインドできるのは、システム上の1つのプロセスのみです。–nat-tオプションを使用すると、デフォルトのソースポートが4500に変更されます。

–dport=<p> or -d <p>

Set UDP destination port to <p>, default=500.
UDP port 500 is the assigned port number for ISAKMP and this is the port used by most if not all IKE implementations. Use of the –nat-t option changes the default destination port to 4500.
UDPの宛先ポートを<p>に設定します(デフォルト=500)。
UDPポート500は、ISAKMPに割り当てられたポート番号で、すべてではありませんが、ほとんどのIKE実装で使用されているポートです。–nat-tオプションを使用すると、デフォルトの送信先ポートが4500に変更されます。

–retry=<n> or -r <n>

Set total number of attempts per host to <n>,default=3.
ホストごとの総試行回数を<n>、default=3に設定します。

–timeout=<n> or -t <n>

Set initial per host timeout to <n> ms, default=500.
This timeout is for the first packet sent to each host.
subsequent timeouts are multiplied by the backoff factor which is set with –backoff.
ホストごとの初期タイムアウトを<n>msに設定します(default=500)。
このタイムアウトは、各ホストに送信される最初のパケットに対するものです。
それ以降のタイムアウトは、–backoffで設定したバックオフ係数を乗じて計算されます。

–bandwidth=<n> or -B <n>

Set desired outbound bandwidth to <n>, default=56000.
The value is in bits per second by default. If you append “K" to the value, then the units are kilobits per second; and if you append “M" to the value, the units are megabits per second.
The “K" and “M" suffixes represent the decimal, not binary, multiples. So 64K is 64000, not 65536.
希望するアウトバウンド帯域幅を<n>に設定します。デフォルトは56000です。
値の単位は、デフォルトではビット毎秒です。 値に「K」を付けると単位はキロビット毎秒になり、「M」を付けると単位はメガビット毎秒になります。
接尾辞の「K」と「M」は、2進法ではなく10進法の倍数を表しています。 つまり、64Kは65536ではなく64000です。

–interval=<n> or -i <n>

Set minimum packet interval to <n> ms.
The packet interval will be no smaller than this number.
The interval specified is in milliseconds by default.
if “u" is appended to the value, then the interval is in microseconds, and if “s" is appended, the interval is in seconds.
If you want to use up to a given bandwidth, then it is easier to use the –bandwidth option instead.
You cannot specify both –interval and –bandwidth because they are just different ways to change the same underlying variable.
最小パケット間隔を<n>msに設定します。
パケット間隔は、この数値より小さくなることはありません。
指定する間隔は,デフォルトではミリ秒単位です。
u “をつけるとマイクロ秒単位、"s “をつけると秒単位になります。
指定した帯域まで使用したい場合は、代わりに–bandwidthオプションを使用したほうが簡単です。
intervalと–bandwidthの両方を指定することはできません。なぜなら、これらは同じ基本的な変数を変更する異なる方法にすぎないからです。

–backoff=<b> or -b <b>

Set timeout backoff factor to <b>, default=1.50.
The per-host timeout is multiplied by this factor after each timeout.
So, if the number of retries is 3, the initial per-host timeout is 500ms and the backoff factor is 1.5, then the first timeout will be 500ms, the second 750ms and the third 1125ms.
タイムアウトのバックオフ係数を<b>に設定します(デフォルト=1.50)。
ホストごとのタイムアウトは、タイムアウトごとにこの係数を乗じて計算されます。
つまり、再試行回数が3回、ホストごとの最初のタイムアウトが500ms、バックオフ係数が1.5の場合、最初のタイムアウトは500ms、2回目は750ms、3回目は1125msとなります。

–verbose or -v

Display verbose progress messages.
Use more than once for greater effect:
1 – Show when each pass is completed and when packets with invalid cookies are received.
2 – Show each packet sent and received and when hosts are removed from the list.
3 – Display the host, Vendor ID and backoff lists before scanning starts.
冗長なプログレスメッセージを表示します。
複数回使用するとより効果的です。
1 – 各パスが完了したときと、無効なクッキーを含むパケットを受信したときに表示します。
2 – 送受信された各パケットと、リストからホストが削除されたときに表示します。
3 – スキャンが始まる前に、ホスト、ベンダーID、バックオフリストを表示します。

–quiet or -q

Don’t decode the returned packet.
This prints less protocol information so the output lines are shorter.
返されたパケットをデコードしません。
これにより、プロトコル情報が少なく表示されるため、出力行が短くなります。

–multiline or -M

Split the payload decode across multiple lines.
With this option, the decode for each payload is printed on a separate line starting with a TAB.
This option makes the output easier to read, especially when there are many payloads.
ペイロードのデコードを複数の行に分割します。
このオプションを使用すると、各ペイロードのデコードが、TABで始まる別の行に出力されます。
このオプションは、特にペイロード数が多い場合に、出力を読みやすくします。

–lifetime=<s> or -l <s>

Set IKE lifetime to <s> seconds, default=28800.
RFC 2407 specifies 28800 as the default, but some implementations may require different values.
If you specify this as a a decimal integer, e.g. 86400, then the attribute will use a 4-byte value.
If you specify it as a hex number, e.g. 0xFF, then the attribute will use the appropriate size value (one byte for this example).
If you specify the string “none" then no lifetime attribute will be added at all.
You can use this option more than once in conjunction with the –trans options to produce multiple transform payloads with different lifetimes. Each –trans option will use the previously specified lifetime value.
IKE lifetimeを<s>秒、default=28800に設定します。
RFC 2407では、デフォルトとして28800が指定されていますが、実装によっては異なる値が必要になる場合があります。
10進数の整数で指定した場合(例:86400)、属性は4バイトの値を使用します。
0xFFなどの16進数で指定した場合は、適切なサイズの値(この例では1バイト)が使用されます。
文字列 “none “を指定した場合、ライフタイム属性は一切追加されません。
このオプションを –trans オプションと組み合わせて複数回使用し、異なるライフタイムを持つ複数の変換ペイロードを作成することができます。 各 –trans オプションは、以前に指定したライフタイム値を使用します。

–lifesize=<s> or -z <s>

Set IKE lifesize to <s> Kilobytes, default=0.
If you specify this as a a decimal integer, e.g. 86400, then the attribute will use a 4-byte value.
If you specify it as a hex number, e.g. 0xFF, then the attribute will use the appropriate size value (one byte for this example).
You can use this option more than once in conjunction with the –trans options to produce multiple transform payloads with different lifesizes.
Each –trans option will use the previously specified lifesize value.
IKEのライフサイズを<s>キロバイトに設定します(デフォルト=0)。
この値を10進数の整数(86400など)で指定すると、属性は4バイトの値を使用します。
0xFFのように16進数で指定した場合は、適切なサイズの値(この例では1バイト)が使用されます。
このオプションを –trans オプションと組み合わせて複数回使用すると、ライフサイズの異なる複数の変換ペイロードを作成することができます。
各 –trans オプションは、前に指定したライフサイズの値を使用します。

–auth=<n> or -m <n>

Set auth. method to <n>, default=1 (PSK).
RFC defined values are 1 to 5. See RFC 2409 Appendix A.
Checkpoint hybrid mode is 64221.
GSS (Windows “Kerberos") is 65001.
XAUTH uses 65001 to 65010.
This is not applicable to IKEv2.
auth.methodを<n>に設定し、default=1(PSK)とする。
RFCで定義されている値は1~5です。 RFC 2409の付録Aを参照してください。
チェックポイントのハイブリッドモードは64221です。
GSS(Windowsの「Kerberos」)は65001です。
XAUTHは65001~65010を使用します。
IKEv2には適用されません。

–version or -V

Display program version and exit.
プログラムのバージョンを表示して終了します。

–vendor=<v> or -e <v>

Set vendor id string to hex value <v>.
You can use this option more than once to send multiple vendor ID payloads.
ベンダーIDの文字列を16進数の<v>に設定します。
複数のベンダーIDペイロードを送信するために、このオプションを複数回使用することができます。

–trans=<t> or -a <t>

Use custom transform <t> instead of default set.
You can use this option more than once to send an arbitrary number of custom transforms.
There are two ways to specify the transform:The new way, where you specify the attribute/value pairs, and the old way where you specify the values for a fixed list of attributes.
For the new method, the transform <t> is specified as (attr=value, attr=value, …)
Where “attr" is the attribute number, and “value" is the value to assign to that attribute.
For a basic attribute, specify the value as a decimal number; for a variable length attribute, specify the value as a hex number prefixed with 0x. You can specify an arbitary number of attribute/value pairs.
See RFC 2409 Appendix A for details of the attributes and values.
Note that brackets are special to some shells, so you may need to quote them, e.g. -trans="(1=1,2=2,3=3,4=4)". For example,–trans=(1=1,2=2,3=1,4=2) specifies Enc=DES-CBC, Hash=SHA1, Auth=shared key, DH Group=2; –trans=(1=7,14=128,2=1,3=3,4=5) specifies Enc=AES/128, Hash=MD5, Auth=RSA sig, DH Group=5 and –trans=(1=5,2=1,3=1,4=1,11=1,12=0x00007080) specifies Enc=3DES-CBC, Hash=MD5, Auth=shared key, DH Group=1, Lifetime=28800 seconds as a 4-byte variable attribute.
For the old method, the transform <t> is specified as enc[/len],hash,auth,group.
Where enc is the encryption algorithm,len is the key length for variable length ciphers,hash is the hash algorithm, and group is the DH Group.
For example, –trans=5,2,1,2 specifies Enc=3DES-CBC, Hash=SHA1, Auth=shared key, DH Group=2; and –trans=7/256,1,1,5 specifies Enc=AES-256, Hash=MD5, Auth=shared key, DH Group=5.
This option is not yet supported for IKEv2.
デフォルトセットではなく、カスタムトランスフォーム <t> を使用します。
このオプションを複数回使用することで、任意の数のカスタムトランスフォームを送信することができます。
トランスフォームを指定するには、属性と値のペアを指定する新しい方法と、固定された属性のリストに値を指定する古い方法があります。
新しい方法の場合、トランスフォーム <t> は (attr=value, attr=value, …) のように指定されます。
ここで、"attr “は属性番号、"value “はその属性に割り当てる値であります。
基本属性の場合は10進数で、可変長属性の場合は0xを先頭につけた16進数で指定する。属性と値のペアは任意の数を指定できます。
属性と値の詳細については、RFC2409の付録Aを参照してください。
括弧はシェルによっては特殊なので、-trans="(1=1,2=2,3=3,4=4) “のように引用符で囲う必要があることに注意してください。例えば,–trans=(1=1,2=2,3=1,4=2)は,Enc=DES-CBC,Hash=SHA1,Auth=共有鍵,DH Group=2を指定しています.–trans=(1=7,14=128,2=1,3=3,4=5)はEnc=AES/128,Hash=MD5,Auth=RSA sig,DH Group=5を指定し、 –trans=(1=5,2=1,3=1,4=1,11=1,12=0x00007080)はEnc=3DES-CBC,Hash=MD5,Auth=shared key,DH Group=1,Lifetime=28800秒を4バイトの変数属性で指定します。
旧方式の場合、トランスフォーム<t>はenc[/len],hash,auth,groupと指定します。
ここで,encは暗号化アルゴリズム,lenは可変長暗号の場合の鍵長,hashはハッシュアルゴリズム,groupはDHグループを示します。
例えば、–trans=5,2,1,2 は Enc=3DES-CBC, Hash=SHA1, Auth=shared key, DH Group=2 を指定し、–trans=7/256,1,1,5 は Enc=AES-256, Hash=MD5, Auth=shared key, DH Group=5 を指定します。
このオプションは、IKEv2ではまだサポートされていません。

–showbackoff[=<n>] or -o[<n>]

Display the backoff fingerprint table.
Display the backoff table to fingerprint the IKE implementation on the remote hosts.
The optional argument specifies time to wait in seconds after receiving the last packet, default=60.
If you are using the short form of the option (-o) then the value must immediately follow the option letter with no spaces, e.g. -o25 not -o 25.
バックオフフィンガープリントテーブルを表示します。
リモートホストのIKE実装をフィンガープリントするためのバックオフテーブルを表示します。
オプションの引数には、最後のパケットを受信してから待つ時間を秒単位で指定します(default=60)。
オプションの短縮形(-o)を使用する場合は、オプション文字の直後にスペースを入れずに値を指定する必要があります。例えば、-o25は-o 25ではありません。

–fuzz=<n> or -u <n>

Set pattern matching fuzz to <n> ms, default=500.
This sets the maximum acceptable difference between the observed backoff times and the reference times in the backoff patterns file. Larger values allow for higher variance but also increase the risk of false positive identifications.
Any per-pattern-entry fuzz specifications in the patterns file will override the value set here.
パターン・マッチング・ファズを<n>msに設定します(default=500)。
これは、観測されたバックオフ時間とバックオフパターンファイルの参照時間との間の最大許容差を設定します。 大きな値を設定すると、より大きな分散が可能になりますが、誤認識のリスクも高まります。
パターン・ファイル内のパターン・エントリごとのファズ指定は、ここで設定された値を上書きします。

–patterns=<f> or -p <f>

Use IKE backoff patterns file <f>,default=/usr/share/ike-scan/ike-backoff-patterns.
This specifies the name of the file containing IKE backoff patterns. This file is only used when –showbackoff is specified.
IKEバックオフパターンファイル<f>を使用します。,default=/usr/share/ike-scan/ike-backoff-patterns.
IKEバックオフパターンを含むファイルの名前を指定します。 このファイルは –showbackoff が指定された場合にのみ使用されます。

–vidpatterns=<f> or -I <f>

Use Vendor ID patterns file <f>,default=/usr/share/ike-scan/ike-vendor-ids.
This specifies the name of the file containing Vendor ID patterns. These patterns are used for Vendor ID fingerprinting.
Vendor IDパターンファイル<f>を使用します。,default=/usr/share/ike-scan/ike-vendor-ids.
Vendor IDパターンを含むファイルの名前を指定します。 これらのパターンはVendor IDのフィンガープリンティングに使用されます。

–aggressive or -A

Use IKE Aggressive Mode. (The default is Main Mode)
If you specify –aggressive, then you may also specify –dhgroup, –id and –idtype. If you use custom transforms with aggressive mode with the –trans option, note that all transforms should have the same DH Group and this should match the group specified with –dhgroup or the default if –dhgroup is not used.
IKE Aggressive Modeを使用します。(デフォルトはMain Mode)
aggressiveを指定した場合は、–dhgroup、–id、–idtypeも指定できます。 アグレッシブモードで–transオプションを指定してカスタムトランスフォームを使用する場合、すべてのトランスフォームが同じDHグループを持つ必要があり、これは–dhgroupで指定されたグループと一致する必要があります。

–id=<id> or -n <id>

Use <id> as the identification value.
This option is only applicable to Aggressive Mode.
<id> can be specified as a string, e.g. –id=test or as a hex value with a leading “0x", e.g. –id=0xdeadbeef.
識別値として<id>を使用します。
このオプションはAggressive Modeにのみ適用されます。
<id>は,–id=testのように文字列で指定することも,–id=0xdeadbeefのように先頭に “0x “を付けた16進数で指定することもできます。

–idtype=<n> or -y <n>

Use identification type <n>. Default 3 (ID_USER_FQDN).
This option is only applicable to Aggressive Mode.
See RFC 2407 4.6.2 for details of Identification types.
識別タイプ<n>を使用します。 デフォルトは3(ID_USER_FQDN)です。
このオプションはAggressive Modeにのみ適用されます。
識別タイプの詳細については、RFC 2407 4.6.2を参照してください。

–dhgroup=<n> or -g <n>

Use Diffie Hellman Group <n>. Default 2.
This option is only applicable to Aggressive Mode and IKEv2. For both of these, it is used to determine the size of the key exchange payload.
If you use Aggressive Mode with custom transforms, then you will normally need to use the –dhgroup option unless you are using the default DH group.
Acceptable values are 1,2,5,14,15,16,17,18 (MODP only).
Diffie Hellman Group <n>を使用します。 デフォルトは2です。
このオプションは、アグレッシブモードとIKEv2にのみ適用されます。 この2つのモードでは、鍵交換のペイロードのサイズを決定するために使用されます。
Aggressive Modeでカスタムトランスフォームを使用する場合、デフォルトのDHグループを使用する場合を除き、通常は–dhgroupオプションを使用する必要があります。
許容される値は1,2,5,14,15,16,17,18(MDPのみ)です。

–gssid=<n> or -G <n>

Use GSS ID <n> where <n> is a hex string.
This uses transform attribute type 16384 as specified in draft-ietf-ipsec-isakmp-gss-auth-07.txt, although Windows-2000 has been observed to use 32001 as well.
For Windows 2000, you’ll need to use –auth=65001 to specify Kerberos (GSS) authentication.
GSS ID <n> を使用します。<n> は 16 進文字列です。
これは、draft-ietf-ipsec-isakmp-gss-auth-07.txtで指定されている変換属性タイプ16384を使用していますが、Windows-2000では32001も使用されていることが確認されています。
Windows-2000の場合、Kerberos(GSS)認証を指定するには–auth=65001が必要になります。

–random or -R

Randomise the host list.
This option randomises the order of the hosts in the host list, so the IKE probes are sent to the hosts in random order.
It uses the Knuth shuffle algorithm.
ホストリストをランダム化します。
このオプションは、ホストリストのホストの順番をランダムにして、IKEプローブがランダムな順番でホストに送信されるようにします。
Knuth シャッフルアルゴリズムを使用しています。

–tcp[=<n>] or -T[<n>]

Use TCP transport instead of UDP.
This allows you to test a host running IKE over TCP.
You won’t normally need this option because the vast majority of IPsec systems only support IKE over UDP.
The optional value <n> specifies the type of IKE over TCP. There are currently two possible values:
1 = RAW IKE over TCP as used by Checkpoint (default);
2 = Encapsulated IKE over TCP as used by Cisco.
If you are using the short form of the option (-T) then the value must immediately follow the option letter with no spaces, e.g. -T2 not -T 2.
You can only specify a single target host if you use this option.
UDPではなく、TCPトランスポートを使用します。
これにより、TCP 上で IKE を実行しているホストをテストすることができます。
大半のIPsecシステムはUDP上のIKEしかサポートしていないため、通常はこのオプションは必要ありません。
オプション値<n>は、IKE over TCPのタイプを指定します。 現在、2つの値があります。
1 = チェックポイント社が採用しているRAW IKE over TCP(デフォルト)。
2 = Cisco社が採用しているEncapsulated IKE over TCP。
オプションの短縮形(-T)を使用する場合は、オプション文字の直後にスペースを入れずに値を指定する必要があります(例:-T 2ではなく-T2)。
このオプションを使用する場合、ターゲットホストは1つしか指定できません。

–tcptimeout=<n> or -O <n>

Set TCP connect timeout to <n> seconds (default=10).
This is only applicable to TCP transport mode.
TCP接続のタイムアウトを<n>秒に設定します(デフォルト=10)。
これは、TCPトランスポートモードにのみ適用されます。

–pskcrack[=<f>] or -P[<f>]

Crack aggressive mode pre-shared keys.
This option outputs the aggressive mode pre-shared key(PSK) parameters for offline cracking using the “psk-crack" program that is supplied with ike-scan.
You can optionally specify a filename, <f>, to write the PSK parameters to. If you do not specify a filename then the PSK parameters are written to standard output.
If you are using the short form of the option (-P) then the value must immediately follow the option letter with no spaces, e.g. -Pfile not -P file.
You can only specify a single target host if you use this option.
This option is only applicable to IKE aggressive mode.
アグレッシブモードの事前共有鍵をクラックします。
このオプションは、ike-scanに付属の “psk-crack “プログラムを使ってオフラインでクラックするためのアグレッシブモードの事前共有鍵(PSK)パラメータを出力します。
オプションとして、PSKパラメータを書き込むファイル名<f>を指定することができます。 ファイル名を指定しなかった場合、PSKパラメータは標準出力に書き込まれます。
オプションの短縮形(-P)を使用する場合は、オプション文字の直後にスペースを入れずに値を指定する必要があります。
このオプションを使用する場合、ターゲットホストは1つしか指定できません。
このオプションは、IKEのアグレッシブモードにのみ適用されます。

–nodns or -N

Do not use DNS to resolve names.
If you use this option, then all hosts must be specified as IP addresses.
名前の解決にDNSを使用しません。
このオプションを使用する場合は、すべてのホストをIPアドレスで指定する必要があります。

–noncelen=<n> or -c <n>

Set the nonce length to <n> bytes. Default=20.
This option controls the length of the nonce payload that is sent in an aggressive mode or IKEv2 request.
Normally there is no need to use this option unless you want to reduce the nonce size to speed up pre-shared key cracking, or if you want to see how a particular server handles different length nonce payloads.
RFC 2409 states that the length of nonce payload must be between 8 and 256 bytes, but ike-scan does not enforce this.
Specifying a large nonce length will increase the size of the packet sent by ike-scan. A very large nonce length may cause fragmentation, or exceed the maximum IP packet size.
This option is only applicable to IKE aggressive mode.
nonceの長さを<n>バイトに設定します。デフォルトは20です。
このオプションは、アグレッシブモードまたはIKEv2リクエストで送信されるnonceペイロードの長さを制御します。
通常、事前共有鍵のクラッキングを高速化するためにnonceのサイズを小さくしたい場合や、特定のサーバーが異なる長さのnonceペイロードをどのように処理するかを確認したい場合を除き、このオプションを使用する必要はありません。
RFC 2409 では、nonce ペイロードの長さは 8 バイトから 256 バイトの間でなければならないとされていますが、IKE-SCAN はこれを強制しません。
大きな nonce の長さを指定すると、ike-scan が送信するパケットのサイズが大きくなります。非常に大きな nonce の長さを指定すると、フラグメントが発生したり、IP パケットの最大サイズを超えたりすることがあります。
このオプションは、IKEのアグレッシブモードにのみ適用されます。

–headerlen=<n> or -L <n>

Set the length in the ISAKMP header to <n> bytes.
You can use this option to manually specify the value to be used for the ISAKMP header length.
By default, ike-scan will fill in the correct value.
Use this option to manually specify an incorrect length.
<n> can be specified as “+n" which sets the length to n bytes more than it should be, “-n" which sets it to n bytes less, or “n" which sets it to exactly bytes.
Changing the header length to an incorrect value can sometimes disrupt VPN servers.
ISAKMPヘッダー内の長さを<n>バイトに設定します。
このオプションを使用して、ISAKMPヘッダーの長さに使用する値を手動で指定することができます。
デフォルトでは、ike-scanは正しい値を記入します。
間違った長さを手動で指定する場合は、このオプションを使用します。
<n>には、長さを本来よりnバイト多く設定する「+n」、nバイト少なく設定する「-n」、または正確に1バイトに設定する「n」を指定できます。
ヘッダーの長さを不正な値に変更すると、VPNサーバーが混乱する場合があります。

–mbz=<n> or -Z <n>

Use the value <n> for reserved (MBZ) fields, default=0.
Specifying this option makes the outgoing packet non-RFC compliant, and should only be used if you want to see how a VPN server will respond to invalid packets.
The value of <n> should be in the range 0-255.
予約済み(MBZ)フィールドには値<n>を使用し、デフォルトは0です。
このオプションを指定すると、送信パケットがRFCに準拠しないものになりますので、VPNサーバーが無効なパケットに対してどのように反応するかを確認したい場合にのみ使用してください。
<n>の値は、0~255の範囲で指定します。

–headerver=<n> or -E <n>

Specify the ISAKMP header version.
The default is 0x10 (16) which corresponds to v1.0.
Specifying a non-default value will make the outgoing packet non-RFC compliant, and should only be used if you want to see how the VPN server reacts to strange versions.
The value should be in the range 0-255.
ISAKMPヘッダーのバージョンを指定します。
デフォルトは 0x10 (16) で、v1.0 に相当します。
デフォルト以外の値を指定すると、送信パケットがRFCに準拠しなくなるため、変なバージョンに対するVPNサーバーの反応を確認したい場合にのみ使用してください。
値は 0 ~ 255 の範囲で指定してください。

–certreq=<c> or -C <c>

Add the CertificateRequest payload <c>.
<c> should be specified as a hex value.
The first byte of the hex value will be interpreted as the certificate type; the remaining bytes as the certificate authority as described in RFC 2408 3.10.
The certificate types are listed in RFC 2408 sec 3.9.
RFC 2048 states “The Certificate Request payload MUST be accepted at any point during the exchange".
CertificateRequestのペイロード<c>を追加します。
<c>は16進数の値で指定します。
16進値の1バイト目は証明書タイプ、残りのバイトはRFC 2408 3.10に記載されているように認証局として解釈されます。証明書の種類は、RFC 2408 の 3.9 項に記載されています。
RFC2048では、「証明書要求のペイロードは、交換中のどの時点でも受け付けなければならない(MUST)」とされています。

–doi=<d> or -D <d>

Set the SA DOI to <d>, default 1 (IPsec).
You will not normally want to change this unless you want to see how the VPN server responds to a non-standard DOI.
SA DOIを<d>(デフォルト1(IPsec))に設定します。
通常は、標準外のDOIに対するVPNサーバーの応答を確認する場合を除き、この設定を変更する必要はありません。

–situation=<s> or -S <s>

Set the SA Situation to <d>, default 1.
The meaning of the situation depends on the DOI, and is detailed in the appropriate DOI document. For the IPsec DOI, the default Situation of 1 represents SIT_IDENTITY_ONLY.
You will not normally want to change this unless you want to see how the VPN server responds to a non-standard situation.
SAシチュエーションを<d>(デフォルト1)に設定します。
シチュエーションの意味はDOIによって異なり、適切なDOIドキュメントに詳細が記載されています。 IPsec DOIの場合、デフォルトのSituationの1はSIT_IDENTITY_ONLYを表します。
通常、VPNサーバーが標準外の状況にどのように反応するかを確認したい場合を除き、これを変更することはありません。

–protocol=<p> or -j <p>

Set the Proposal protocol ID to <p>, default 1.
The meaning of the proposal protocol ID depends on the DOI, and is detailed in the appropriate DOI document.For the IPsec DOI, the default proposal protocol id of 1 represents PROTO_ISAKMP.
You will not normally want to change this unless you want to see how the VPN server responds to a non-standard protocol ID.
プロポーザルプロトコルIDを<p>(デフォルト1)に設定します。
プロポーザルプロトコルIDの意味はDOIによって異なり、適切なDOIドキュメントに詳細が記載されています。IPsec DOIの場合、デフォルトのプロポーザルプロトコルIDである1はPROTO_ISAKMPを表します。
IPsec DOIの場合、デフォルトのプロポーザルプロトコルIDである1はPROTO_ISAKMPを表します。標準外のプロトコルIDに対するVPNサーバーの応答を確認したい場合を除き、通常はこれを変更する必要はありません。

–transid=<t> or -k <t>

Set the Transform ID to <t>, default 1.
The meaning of the transform ID depends on the DOI, and is detailed in the appropriate DOI document. For the IPsec DOI, the default transform id of 1 represents KEY_IKE.
You will not normally want to change this unless you want to see how the VPN server responds to a non-standard transform ID.
トランスフォームIDを<t>に設定します(デフォルトは1)。
トランスフォームIDの意味はDOIによって異なり、適切なDOIドキュメントに詳細が記載されています。 IPsec DOIの場合、デフォルトのトランスフォームIDである1はKEY_IKEを表します。
非標準のトランスフォーム ID に対する VPN サーバーの応答を確認したい場合を除き、通常はこれを変更する必要はありません。

–spisize=<n>

Set the proposal SPI size to <n>. Default=0.
If this is non-zero, then a random SPI of the specified size will be added to the proposal payload.
The default of zero means no SPI.
提案するSPIサイズを<n>に設定します。 デフォルトは0です。
これが0以外の場合、指定されたサイズのランダムなSPIがプロポーザルのペイロードに追加されます。
デフォルトの0はSPIがないことを意味します。

–hdrflags=<n>

Set the ISAKMP header flags to <n>. Default=0.
The flags are detailed in RFC 2408 section 3.1
ISAKMPヘッダーフラグを<n>に設定します。 デフォルトは0です。
フラグの詳細はRFC2408のセクション3.1に記載されています。

–hdrmsgid=<n>

Set the ISAKMP header message ID to <n>. Default=0.
This should be zero for IKE Phase-1.
ISAKMPヘッダメッセージIDを<n>に設定します。 デフォルトは0です。
IKE Phase-1では0にしてください。

–cookie=<n>

Set the ISAKMP initiator cookie to <n>.
The cookie value should be specified in hex.
By default, the cookies are auto.
ISAKMPイニシエータのクッキーを<n>に設定します。
クッキーの値は16進数で指定します。
デフォルトでは、クッキーは自動です。

ike-scanツールのまとめ

冒頭でもお話したとおり、IKEとは、ネットワーク層のレベルでセキュリティを監視するIPsecを構成するプロトコルのうちの一つでありVPNを実現するプロトコルです。

VPNは仮想専用線のことで、安価な共用回線上に認証と暗号化の技術を使って専用線を構築しています。

ブラックハットハッカーはIKEを実装しているホストを特定して、VPNにハッキングをするのでしょうか。
それともあきらめるのでしょうか。