52
1 Master Project Report PhishLurk: A Mechanism for Classifying and Preventing Phishing Websites by: Mohammed Alqahtani 1. Committee Members and Signatures: Approved by Date __________________________________ _____________ Advisor: Dr. Edward Chow __________________________________ _____________ Committee member: Dr. Albert Glock __________________________________ _____________ Committee member: Dr. Chuan Yue

1. Committee Members and Signatures: · Web viewFigure 4 is a diagram shows the design of PhishLurk. Figure 4: Diagram shows the design of PhishLurk Classifier: PhishLurk’s mechanism

  • Upload
    vunhan

  • View
    215

  • Download
    1

Embed Size (px)

Citation preview

36

Master Project Report

PhishLurk:

A Mechanism for Classifying and Preventing Phishing Websites

by: Mohammed Alqahtani

1. Committee Members and Signatures: Approved by Date

__________________________________ _____________ Advisor: Dr. Edward Chow

__________________________________ _____________ Committee member: Dr. Albert Glock

__________________________________ _____________ Committee member: Dr. Chuan Yue

Abstract

Phishing attackers haves been increasingly improving and sophisticating their attempts using different ways and methods to target users. At the same time, users started are using varieties ways to access the internet with different platforms, different computation capabilities and various level of protection support which expands the surface for phishing attackers and complicates the provisioning of security protection.

I proposed PhishLurk, an anti-phishing search website that classifies and prevents phishing attacks. PhishLurk provides the protection from the server side and uses the coloring scheme and note text warning for classification in order to consume as little computation and screen resource as possible on the client-side. It can work efficiently with varieties of devices having different capabilities. PhishLurk uses PhishTank as the blacklist provider and checks the list in real time to achieve the maximum possible accuracy. The idea of PhishLurk can be a useful enhancement, if it is adopted by major search engines, e.g.,i.e. Google and Yahoo. Besides the mechanism can be optimized to apply and work efficiently forin smartphones.

1. Introduction

Phishing is a cybercrime when an attacker tries in an attempt to gather personal and financial information, such as usernames, passwords, and credit card numbers, from recipients, information such as usernames, passwords and credit card details, by pretending to be a legitimate website. Mostly, phishing attacks come into two types: emails and webpages that spoof or lure the user to enter sensitive information. On other words, phishing is directing users to fraudulent web sites in order to get the sensitive information. The sensitive information can be confidential information or financial data [22]. Fiugre 1 shows a sample of phishing website. Phishers used to utilize emails to lure the targets to give away some information. Lately, Phishers started to used different methods to lure and steal the targeted users information, Methods such as faked websites, tTrojans, key-loggers and screen captures [23].

Fiugre1 : Sample of a phishing website (source: www.phishtank.com)

1.1 Impact of phishing

Phishing has been a major concern in the IT security. In the U.S., companies lose more than $2 billion every year as results of phishing attacks [6]. 1.2 million users in theU.S. were phished between May 2004 & May 2005 which approximately cost $929 million[6]. AOL-UK announced that one out of twenty users has lost money from phishing attacks [25]. In 2010 a survey indicates that generally between half a billion dollars to $1 trillion every year is the loss from cybercrime due to the loss of confidential banking information or corporate data [25].

2. Background

Recently, Users started to have more varieties of access to surf the internet for example notebooks, PC, game console, handhelds, and smartphones , However; using more varieties of devises made in different abilities and features leads tomake it complicate and sophisticateto provideing a full protection, especially from phishing attacks methods. Yet Currently there is no such a completeperfect protection. One of the most used devices is smartphones. According to a survey of ComScore, Inc. the number of smartphones subscribers increased 60 percent in 2010 compared to 2009 [4]. Another report by Nielsen Company indicates that by 2011 half of cell-phones users would be using smartphones [5]. Users prefer to use these types of access to do their activities and tasks due to the advantages they provide. Si.e. smartphone is preferred to use because of the easiness, flexibility, and mobility that smartphone have. Some activates activities such as online banking, paying bills, online shopping, emailing, and social networking[5] demand users need to enter sensitive information to complete the authentication and authorization process., Ssensitive information could be credit-cards numbers, password and usernames. In fact, having varieties of accesses to the internet would expands the surface for phishing attackers and complicate the protection.

2.1 History of Phishing

The idea of luring people to give away their sensitive information started back in the seventies [27]. Phishers used the combined phishing technique: making phone calls Phreaking and luring the target client Fishing. In mid-1990s, the main target of phishing attackers target was America Online (AOL). Phishers keep sending instant messages to users, using social engineering and similar domain names like www.ao1.com, to lure users to reveal their passwords. Then, utilize users account for free. Later attackers started seeking for more details and information such as credit card numbers and social security numbers. During the past ten years, Phishing attackers start attacking at a higher level and target users withof financial service and online payment directly such as E-buyers, PayPal, eBay and banks. In addition to the previous techniques, attackers used more advance techniques such as key-logging, browser vulnerabilities, and link obfuscation [27].

2.2 Most Targeted Industries

As result of the denseintense confidential content and financial use, the financial services and online payment areis the most targeted industries by phishing attackers [22]. Figure 2 shows the distribution of the phishing activities by the targeted areas.

Figure 2. Phishing Activity Trends Report - 2nd Half 2010 - Anti-Phishing Working Group (APWG)

2.3 Why Phishing Works

Phishing works because of many reasons., Oone of the most common reasons is the users carelessness and ignorance about how to differentiate whether the website is legitimate or phishing [1]. Moreover, phishing attackers work hard by sending millions of messages and attempts, looking for vulnerabilities, and seeking for sensitive information.

2.4 Existing Work Anti-Phishing:

MThere are many techniques have been proposed focusing on anti-phishing, using different methods of filtering and detection, such as black lists, plugs-in, extensions, and toolbars for browsers [2]. The developers of desktop browsers try hard to provide a solid protection such as warning the user by displaying a box massage if the website is a potential phishing website, or contains invalid or expired SSL certificates. Mostly Often a third party and black-lists are involved to display and identify phishing websites [3].

3. Related Work

PhishTank is an unprofitable nonprofit project aimed to build dependable database of phishing URLs [7]., Tthe project is to collect, verify, track, and share phishing data. In order to report a phishing link, the user has to be registered as a member. So the admin can learn and judge each member's contribution. The phishing websites can be reported and submitted via emails or via PhishTanks websites. The data are verified by a committee after they are submitted by the members. PhishTanks database can be shared via the an API. The links in the original database are only classified as phishing and unknown. We propose to will classify the phishing links based on PhishTank database with a more precise modification and used them in the proposed project. PhishTank has been working effectively to fight against phishing attacks, thousands of phishing links are monthly detected and verified as valid phishing sites monthly [9]. , It usesing the publics effort and contribution to build a trustworthy and dependable database that is open for everyone to use and share. As a result, of that several well-known organizations and browsers started using PhishTank database such as Yahoo mail, Opera, MacAfee, and Mozilla Firefox [10]. In my prototype, I use PhishTank as a phishing blacklist provider.

In the paper titled Large-Scale Automatic Classification of Phishing Pages [2], Colin Whittaker, Brian Ryner, and Marria Nazif proposed an automatic classier to detect phishing websites. The classier maintains Googles phishing blacklist automatically and analyzes millions of pages a day including examining the URL and the contents to verify whether the page is phishing or not. The paper proposed a classifier works automatically with large-scale system which will maintain a false positive rate below 0.1% and reduce the life time of phishing page. They used machine learning technique to analyze the web page content. In my project, the determination is based on Phishtanks blacklist, however; I aim to provide a methodology for classification the phishing website. My ultimate goal is not to determine whether the page phishing or not, PhishLurk determines depending on PhishTanks blacklist, but to provide a new method to classify phishing links and considering two factors: consuming as less memory and screen space as possible which eventually improve the overall classification efficiency.

In the paper titled PhishGuard: A Browser Plug-in for Protection from Phishing [8], Joshi, Y. Saklikar, S. Das, D. Saha, proposed a mechanism to detect a forged website via submitting fake credentials before the actual credentials during the login process of a website, then the server-side analyzes the responses of the submissions of all those credentials to determine whether the website is phishing or not. The mechanism was implemented on browsers side user-side as plug-in of Mozilla Firefox, However; the mechanism only detects during the log-in process for a user. If another user log-in to the same phishing website, he will goes through the same detection process. In my project, if the website reported as phishing site, no other user can get access, the reported link will be blocked, to the reported website.

In the paper titled BogusBiter: A Transparent Protection Against Phishing Attacks [17] Chuan Yue and Haining Wang proposed a client-side tool called BogusBiter that send a large number of bogus credentials to suspected phishing sites and hides the real credentials from phishers . BogusBiter is unique it alsoand helps legitimate web sites to detect stolen credentials in a timely manner by having the phisher to verify the credentials he has collected at that legitimate web site. Bogus Biter was implanted as Firefox 2 extension. , however; My project is different since itthat uses the server side to provide the protection.

In the paper titled The Battle Against Phishing: Dynamic Security Skins [18] Rachna Dhamija and J. D. Tygar proposed, an extended paper of [1], an anti-phishing tools helps user distinguishing if they are interacting with a trusted site or not by [1]. This approach uses shared cryptographic image that remote web servers use to proof their identities to users, in a way that supports easy verication for humans being and hard for attackers to spoof/, however; in my project there is no dependency on the client-side. It[18] cant provide protection when we have users utilizing a public access because the approach requires support from both client-sides and server-side. In my project there is no dependency on the client-side.

3.1 Blacklisting

Blacklisting simply is the idea of denying the access to resources based on a list. The blacklisting is determined either by a mechanism automatically e.g.,i.e. Googles blacklist [2] or by the users feedback as the case in PhishTank [7], where users submit and report the suspicious websites. The object of a blacklist can be a user, IP, website, or software.

We can classify varieties of blacklists as follows:

Content filter: It is aA proxy server to filter the content., Tthe proxy server not only blocks banned URLs using blacklist but also use keywords, metadata, and pictures to filter the content. Examples of content filters include DansGuardian [28] and SquidGuard [Refs]. In SquidGuard, The proxy use advance web filtering polices to prevent inappropriate content for the organization or company. The filter blocks URLs using blacklist, controls the content by using the inferred keywords blocking from the metadata and the page content. SquidGuard mostly are used mostly at educational environments and for kids protection. The main goal of content filter is to speed up the access control management efficiently. In DansGuardian, the client requests URLs, DansGuardian collects them and compare against the blacklist and whitelist. In case the requests is clean, then DansGuardian passes along the URL request. If the URL its is not clean, then DansGuardian blocks it [28].

E-mail spam filter: It monitors, prevents, and blocks spam emails and phishing emails using a blacklist of spam emails resource. It prevents them from reaching the client side. There are many blacklists of emails anti spams, e.g.,i.e., GFI MailEssentialss list, ATL Abuse Block List, Blacklist Master, Composite Blocking List (CBL), and SpamCop.

Many web-browsers and companies use their own black list against spams and phishing, e.g.,i.e., IE, Google, and Norton.

3.2 Current Browsers Phishing Protection

Most popular browsers provide a phishing filter that warns users from malicious websites including phishing websites. Filters mainly depend on certain lists to detect the malicious websites. IE7 used Phishing Filter that has been improved to be SmartScreen Filter in later version of IE due to the weak protection phishing filter provides [15]. In IE 8 and IE 9 "SmartScreen Filter" verifies the visited websites based on the updated list of malicious websites that Microsoft created and updated continuously [11] [12]. Similar to IE, Safari browser has filters checkings the websites while the user browsing against a list of phishing sites. After the warning of PayPal to its members that Safari is not safe for their service [13], Safari started to use an extended validation certificates to support analyzing websites [14]. EFirefox earlier versions of Firefox take advantage of ant-phishing companies such as GeoTrust, or the Phish-Tank, using their list to support identifying malicious websites. The current version of Firefox has adopted Google's anti-phishing program to support its phishing protection.

Many research projects have proposed mechanisms that implemented as browser plugs-in and or tool-bar against phishing attack. The main problem with plugs-in and tool bar is the need for users cooperation. Users may not cooperate and install the tool. Some users occasionally prefer to turn their filter off to brows faster [16]. Plugs-in and tools bar in some devices may not be as effective as it in desktop browser due to the limitation in the performance and the screen space as the case in smartphones.

3.3 Classification of Phishing Defense

The different phishing defense approaches can be further classified based on where the alerts are generated:

Browsers themselves: IE9, Firefox 5.

Browsers extensions or plug-ins: BogusBiter, PhishGuard.

Anti-phishing Search Site: PhishLurk my project.

Proxy server: Dansguardian [20].

Anti-phishing Server: OpenDNS [19], GFI MailEssentials [21], and some browser extensions use server side partially such as Skins [18].

According to the official website [20], DansGuardian is an active web content filter that filters web sites based on a number of criteria including website URL, words and phrases included in the page, file type, mime type and more. DansGuardian used is configured as a proxy server that control, filter, and monitor all content.,Therefore So its functions more than anti-phishing. There is no such a project using proxy server as anti-phishing but it can be really an effective technique to classify and prevent phishing websites.

4. The Proposed Project

In this project we propose to create a software tool, called PhishLurk, aiming to classify and blocking phishing links. PhishLurk uses PhishTank as the provider of the blacklist. PhishLurk indicates the risk to users and consumesing as little computation and screen recourses as possible, using coloring scheme and note warning annotation. The process is fully done on the search server side and delivers classified and protected links to the users. Even if the phishing protection was disabled or uninstalled on client-side, PhishLurk still provide protected and classified links to the user. Figure 3 shows explains PhishLurks scenario against phishing sites. In addition, PhishLurk has a database which contains records for the visits of each website, and how many times the website has been visited.

Figure 3: Diagram explains PhishLurks scenario against phishing sites

5. Design of PhishLurk

5.1 PhishLurk Components:

Classifier: to assesses and classifies the links based on PhishTanks blacklist.

Logger: records the visits of each link, how many times the link has been visited.

Blacklist: an updated blacklist and Live checking using API.

Database: to store every single visited link, the number of visits for each link and the links class.

Figure 4 is a diagram shows the design of PhishLurk.

Figure 4: Diagram shows the design of PhishLurk

Classifier: PhishLurks mechanism assesses and classifies the links based on PhishTanks blacklist, The mechanism classifies as following:

Phishing link (Red): It is an absolute phishing link. The link will be disabled, so even if the user is ignorant or surfing carelessly as we saw in the survey [1], there is no way to access the link.

Unknown link (Orange): It is a suspicious link. It might potentially be a phishing link. It could be a link indicate the same name or part of a real company's name asking the user to provide sensitive information. The link is submitted as a phishing link but it hasnt been verified yet. If the user clicks and gets access to this type of sites, it is their own responsibility. The user gets warned before accessing the link.

Safe Link (Blue): These are safe links, totally not phishing. The user can access the link without triggering warning messages. Figure 5 shows the categories of links that PhishLurk classifies.

Type

Description

Color

Treatment

Phishing link

A valid phishing link, high risk.

Red

Disabled, Users will be warned highly not to access the links.

Unknown link

Suspicious links, might be potentially phishing, but not verified yet.

Orange

Users are warned about potential impact.

Safe Link

links that are not blacklisted.

Blue

user can access the link without triggering warning messages

Figure 5: Table showing the categories of links PhishLurk classifies

BlackList: PhishLurk utilizes PhishTanks blacklist. In order to achieve the possible maximum accuracy, PhishLurk updates the blacklist using two different methods:

Updating the blacklist periodically: downloading it every 24 hours.

Live checking using API.

Here the live checking is referred to checking individual url with PhishTank. If you have 10 urls in the web page, 10 queries to PhishTank will be issued. Therefore there are trade-offs between these two approaches.

Logger: PhishLurk has a logger that records the number of visits for every single visited link within the web application and stores the datas logs in PhishLurks database including URLs, visits and the current class of the URL.

Database: It is a database to store the records of every single visited link including the number of visits for each link and the links class. Users can have an access to the database to view the table of the all likes have been visited by PhishLurks users; the links are also colored based on their class on the revised webat the view page.

6. Implementation

PhishLurks is programmed using in PHP. PHP is wildly widely used in web server side programing and deployed on many web servers. PHP currently is supported by most of web servers including Apache and Microsoft Internet Information Server. PHP works easily with HTML and provides the ability to interact with the user dynamically.

Given that PhishLurks mechanism is aimed to use as less space and competition as possible in the client side, PhishLurk uses CSS for classifying and indicating the risk level of the links, due to the light computation CSS consumes. I created a database using MySQL to store the logs records. PhishLurk utilizes PhishTanks blacklist, Therefore; I used two methods to read and to update the blacklist from PhishTank: Live checking and periodic downloaded blacklist.

6.1 The Information flow

The information flow in PhishLurk starts by receiving the keywords queries from the user. Next, the keyword is transferred to the search engine to execute the queries. Then, the PhishLurk Classifier received query results and classifies them based on PhishTanks blacklist. After the classification, PhishLurk creates log records for all the visited URLs and registers the visit. Finally, requested URLs are delivered to users browsers. Figure 6 explains the information flow in PhishLurk.

Figure 6: Flowchart showing the information ow in PhishLurk.

PhishLurk needs a search engine to process the search queries. I used Google.com to process the queries. I will explain why I use Google in Section 8. To send quires to Google, I used the following statements:

$gg_url = 'http://www.google.com/search?hl=en&q='. urlencode($query) . '&start=';

$ch = curl_init($gg_url.$page.'0');

curl_setopt_array($ch,$options);

$scraped="";

$scraped.=curl_exec($ch);

curl_close( $ch );

$results = array();

preg_match_all('/a href="([^"]+)" class=l.+?>.+?/',$scraped,$results);

ToAnd receive the results back from Google and to show them, through PhishLurk usesing the functionfollowing statements:

$ch = curl_init($gg_url.$page.'0');

curl_setopt_array($ch,$options);

$scraped="";

$scraped.=curl_exec($ch);

curl_close( $ch );

$results = array();

preg_match_all('/a href="([^"]+)" class=l.+?>.+?/',$scraped,$results);

For each link of the page results, Metadata function is used to show the websites title and the description related to the URL for each link of the page results.

$content = file_get_contents($url);

$title = getMetaTitle($content);

$description = getMetaDescription($content);

6.2 Blacklist

PhishLurk needs to use the blacklist to classify a link. To check against the blacklist I used two methods: updated blacklist and live checking.

6.2.1 Updated Blacklist

PhishTank provides a downloadable database blacklist in different formats and updated hourly to facilitate utilizing PhishTanks blacklist and phishing detection in your application. The PHP format of the blacklist is available on: (http://data.phishtank.com/data/online-valid.php_serialized)., THowever, the blacklist file is big. The average size of the black list is between 13 and 17 MB, which consumes takes more time to process and slowser the performance during the updateting.

To improve the performance, I minimize size of the blacklist by first changing its format from

I minimize the size of the blacklist by first changing its format from\

Phish-id

Phish_detail_url

URL

Submission_time

Verified

Verification_time

Online

Target

Toto

Phish-id

URL

Class

I removed the fields that I dont use in my prototype.

I created a function that reads the list from the file Blist.txt and if the link is blacklisted, and it is classified as phishing. If a link are reported as a potential phishing link but not yet verified, it is classified as unknown.

$class= 0;

$file_handle = fopen("blist.txt", "rb");

while (!feof($file_handle) )

{

$line_of_text = fgets($file_handle);

$parts = explode(',', $line_of_text);

if ($url==$parts[0])

{ $class= $parts[1];}

elsif ($url==$parts[0])

{ $class= $parts[2];}

}

fclose($file_handle);

Due to the parsing errors in processing the blacklist, I changed the formatresort to use the ing Excels function. which means theThe drawback is that the process is changed process isto partially manual. The problem is solved by using live checking.

6.2.2 Checking the URLs Live:

I used the API to make a live checking with the blacklist. This method also works with HTTP POST request, the same PhishLurk uses, and responds with the URL's status in the database. I created a parameter called $phishtank that PhishLurk sends it to the PhishTank API-checking:

$phishtank = file_get_contents("http://checkurl.phishtank.com/checkurl/index.php?url=$url");

For example the Link www.uccs.edu has been received from the search results and will be sent to get live checked to PhishTank.

$phishtank=file_get_contents("http://checkurl.phishtank.com/checkurl/index.php?url=http://www.uccs.edu/");

TAnd the responsend appears in XML format as the following.:

2011-08-18T04:09:22+00:00

2d5c2cb

192.168.0.109.4e4c90729dea26.99932296

false

6.3 Classification

After the checking, the links go through the classification function. Tthe process is explained fuarther.

Phishing Links:

if ($class == 1) {

Shows a note = "This web page has been reported as a phishing webpage based on our security preferences"

the user redirected to warning.php with class1 and its URL.

Scheme color colors the link red and prints small tag next to the title (Phishing Link).

Unknown Links:

Elseif ($class ==2){

Shows a note ="This web page might potentially be p an phishing page" the user redirected to warning.php with class 2 and its URL.

Scheme color colors the link orange and prints small tag next to the title (Known Link).

Safe Links:

Else ($class == 0){

the user transferred directly to the logger log.php with class 0 and its URL. Then to the targeted URL through

}

6.4 Warning:

I created one a dynamic page, warning.php for the generateing the warnings. warning.php, Hhaving one dynamic warning page for all classes is useful to control the writing of the log records. First, the warning page recognizes the links class using ($_GET['class'] == class # ) . Then it shows the warning of that class. The process is as follows :

if the class == 1 // phishing link

{

Print Phishing Site!

Display:

A warning note: This web page is reported as phishing website. We recommend you to exit, otherwise, click on Proceed.

This URL has been visited: visits number by PhishLurk's users

}

Elseif if the class == 2 // Unknown link

{

Print Unknown page!

Display a warning note: This web page might potentially be a phishing page. If you

trust this page click Proceed, otherwise, exit.

This URL has been visited: visits number by PhishLurk's users

else

{ die (); }

If the class number is not listed or the user triesy to use unlisted class number, PhishLurk kills the request by using the PHP function Die ();.

In order to show the user how many times the link has been visited by PhishLurks users, I created visited.php to connect to the database and querying about the link visits, The function as following: