Phishing URLs are critical security threats to both the privacy and security of internet users. They serve as the first steps for phishing, intrusion, ransomware and more sophisticated attacks such as Advanced Persistent Threat (APT) [17] .
While the world is dealing with the global pandemic of COVID-19 and people are relying heavily on online services than ever before, cybercriminals are actively trying to exploit this situation by sending out phishing URLs to allure internet users into clicking them [22] . According to a recent report from Google [31] the number of active phishing URLs in January 2020 was 149,195. This number increased by 50% to 293,235 websites in February. By March, the number spiked up to its highest peak (since last two decade) with an increase of 350% to 522,495 phishing URLs.
A URL is a concise sequence of characters that points to a unique web resource (e.g. file, web page) [27] . In contrast, a phishing URL points to a counterfeit version of the legitimate website. For instance, "https://www.paypal.com/" is a URL of Paypal company that points to a legitimate online payment service. However, "http://paypal.com.igr2.ru/n" is a phishing URL that was recently detected by Openphish [60] . Although, phishing URLs are not associated with the actual genuine websites, their associated websites often look alike [104] . Figure 1 shows an example of an official Paypal sign-in page versus its counterfeit version access through these two URLs. Both pages look similar with only a few differences in the URL of both sites. Since the two websites and their URLs look similar, the counterfeit website can deceive a naive user into giving away sensitive information (such as credentials and credit card number) or downloading malicious software. Consequently, it can cause financial and reputational losses to the user and the legitimate businesses [59] . Therefore, it is critical to detect them promptly. To this end, several efforts have been made by the industry [20, 32, 37, 43, 67, 75, 84, 94] and academia [1, 10, 21, 76, 96] to prevent people from visiting these URLs. However, the lines of defences are mostly reactive measures that rely on updating the sets of rules for domain registrations or adding new phishing URLs reported by users in blacklists of already known phishing URLs. For example, recently a new vulnerability was discovered in Verisign and other software as a Service (SaaS) [9] including Google, Amazon, and DigitalOcean that allowed people to register ".com" and ".net" homograph domain names [15] (similar-looking characters but having different Unicode, e.g., "www.microsoftonLine.com" against "www.microsoftoline.com) generated using IPA Extensions [92] . To resolve this issue, Verisign and Amazon (S3) had to deploy new changes to upgrade their registration rules. These solutions have following limitations: (i) they cannot handle zero-day attacks (new phishing URL not in the blacklist). (ii) they require constant updates and (iii) they are not scalable. [53] .
To address these limitations, Machine Learning based Phishing URL detection (MLPU) systems are widely adapted to detect phishing URLs [50, 76, 96] . These systems serve as first levels of defence against phishing attacks because processing a limited size URL is more efficient and scalable than evaluating the complete web page content [6] . Over the years, many studies [6, 72, 80] have proposed MLPU systems ranging from traditional Machine Learning (ML) that use classical ML classifiers such as Support Vector Machine (SVM), Decision Trees (DT) to more complex Deep Learning (DL) methods. These studies have shown that these MLPU obtain good accuracy and effectiveness in detecting zero-day (unseen) phishing URLs. For example, [47] showed that their method could differentiate between phishing and legitimate URLs with an average Area Under the Curve (AUC) of 99.29%. However, MLPU systems are also subject to some limitations.
Recent studies [8, 24, 62, 89] have unveiled that ML solutions, yield unreliable results at test time when subjected to adversarial examples. Adversarial examples are artificially synthesized input examples on which ML models tend to misclassify the output classes, e.g., classify malicious samples as benign. Cybercriminals can bypass ML models by subjecting them to adversarial examples to carry out evasion attacks. ML models yield unreliable results under evasion attacks, which can hinder their practical capabilities. Therefore, it is necessary to study an efficient and practical evasion techniques against ML systems to unveil their security vulnerabilities.
In general, several attack approaches have been designed for image [8] , malware [12, 56] and text classifications [99] . These approaches cannot be directly applied against MLPU systems because URLs follow well defined structural constraints formulated by RFC 3986 standard [27] . There are a few efforts [2, 20] recently proposed to evade MLPU systems. However, prior works have the following limitations: (i) they lack comprehensive evaluation (only test one MLPU system); (ii) they are computationally expensive (as they require training a deep Neural Network (DNN) to generate adversarial URLs; and (iii) they consider the feedback from the test MLPU system to select the seed URLs (URLs used to generate new adversarial URLs). In this paper, we seek answers to the Research Questions (RQs) outlined in Table 1 . Our motivations behind these research questions are as follows:
• RQ1 investigates the success rate of an evasion attack on each considered model in terms of features and classifier used. Such an analysis can help the practitioners to select robust features and classifiers for developing MLPU systems. Whilst it can also assist researchers in identifying security vulnerabilities in these systems. • In RQ2, we further investigate the evasion behaviours of all the models with each evasion adversary type. This analysis identifies the most potent adversary type (an adversary with highest success rate across all the models). These insights can guide the researchers to carry more specific research and development efforts towards defending the potent adversaries. • Adversarial training is a popular technique largely used in image [82] and text [73] classification to improve model robustness. It increases the robustness of ML models by augmenting adversarial examples with training data. RQ3 examines whether integrating the adversarial training can serve to advance the robustness of the test models against evasion attack. This type of analysis can help the practitioners to understand whether or not an adversarial training is a suitable defense against evasion attacks. Moreover, researchers can perform their researches on evasion defences to improve the robustness of MLPU systems. • Lastly, RQ4 assesses the actual threat posed by an evasion attack by studying the computational effort, scale, registration price and availability of our generated phishing URLs. This analysis can help to understand the ease of registering a phishing domain and unveil the vulnerabilities in overall web infrastructure, which can guide the future research. To answer these questions, we conduct a comprehensive evaluation of 41 state-of-the-art MLPU systems against our evasion attack. We first generate three types of adversaries (adversarial phishing URLs) by introducing perturbation on three parts of the target URL, i.e., domain, path and Top Level Domain (TLD). We then train 41 MLPU systems to reproduce the state-of-the-art models. Finally, we simulate an evasion attack on these MLPU systems. By further analysing the results and answers to these questions, we distil potential vulnerabilities in considered MLPU systems and recommend future direction to improve these systems.
The contributions of our work are as follows:
• An experimental study on the impact of an evasion attack on MLPU systems.
• Identification of the adversary types that can deceive the considered MLPU systems.
• Investigation of the impact of adversarial training on the MLPU systems.
• Evaluation of the feasibility and scale of the proposed evasion attack.
• Identification of vulnerabilities in the considered MLPU systems.
• Reproducible code for our attack and 41 trained MLPU models. The remainder of this paper is organized as follows. Section 2 presents the background and related work. Section 3 describes our approach. Section 4 demonstrates the experimental setup of our study. We report our results in section 5 while section 6 discusses the implication of our results and finally, section 7 concludes the paper.
This section presents the background and related work. Here, we provide the background of URL structure and obfuscation techniques followed by a discussion on the state-of-the-art MLPU systems. Finally, we discuss the recently proposed evasion attacks against ML phishing detectors.
A Uniform Resource Locator (URL) is a sequence of characters that points to a web resource such as a file or website. URLs follow a standard structure and specific syntax rules defined by Request for Comments (RFC) as shown below [27] .
scheme://sub-domain.domain.TLD/path?query-string#fragment The structure of URL consists of seven parts, namely scheme or protocol, domain, sub-domain, Top-Level-Domain (TLD), path, query-string and fragment. The scheme indicates the network protocol for accessing the requested resource. The most common protocols are Hypertext Transport Protocol (HTTP), HTTP with Transport Layer Security (HTTPS), and File Transfer Protocol (FTP). A domain is a name that points to the server or computer that host the resource (website or file). The domain can be a direct Internet Protocol (IP) address of a computer. For example, "212.432.43.09" is a valid URL that contains the IP address to represent the domain. However, IP addresses are hard to remember; therefore, domain names are used instead. E.g., for the URL 'https://aws.amazon.com/login?id=xyz#abc', 'amazon' is the domain name for Amazon website. A sub-domain is an additional part of the primary domain name. Sub-domains systematize different sections of the website. In the above example, 'aws' is a sub-domain that indicates Amazon Web Services (AWS) section of the main Amazon website. A Top-level-Domain (TLD) indicates the type of the website. E.g. '.gov' correspond to government website while '.edu' suggest that a website is educational. A domain name, along with its TLD is called the hostname and is unique across the internet. In the above example, "amazon.com" is a unique identity of the Amazon organization on the Internet. A path represents the address of the location of a resource within a website. It is analogues to the underlying file structure of the website. 'login' in the above example indicates the login page location is the root directory of the 'amazon'. A query-string defines the values to the site parameter. For instance, id=xyz assign 'xyz' to id parameter. The last part of the URL is a fragment. Both query string and fragment are optional parts of a URL. Fragment identifies the portion of a webpage and helps in navigation within a page.
Attackers try to use different tactics to generate a phishing URL manually or through random generators [6] that spoofs the identity of the target website. These techniques are called obfuscation methods. Over the previous decade, different studies [46, 57] have identified several obfuscation techniques used by the attackers by analyzing phishing URLs. For instance, a study [57] identified two types of obfuscation techniques used by the attacker: hostname obfuscation and directory obfuscation. In hostname obfuscation, the attacker replaces the hostname of the phishing URL with an IP or a brand name e.g., 'http://34.227.96.252/d/internet/dosegmento', 'www.hi-google.com'. In the directory obfuscation technique, an attacker manipulates the path of the phishing URL using encoding, redirection or hexadecimal numbers. For example, '/%63ur%65' is an encoded hexadecimal form for the word 'cure'.
Over the years, numerous efforts have been made to detect phishing URLs using Machine Learning (ML), referred to here as MLPU [76] . MLPU systems use either online learning or batch learning to develop learning models. Online learning incrementally adapt the model after processing individual training examples over time. In contrast, batch learning algorithms learn the model after making a pass over the entire dataset of training examples. These algorithms are the most popular ones in MLPU [76] . Table 2 enlists the classifiers used by online and batch learning approaches, their acronyms and reference to the studies that utilized these approaches. In the rest of the paper, we have used these acronyms instead of the full name to refer to a classifier. In this study, we only test batch learning classifiers while online learning is out of the scope of this study. Batch learning algorithms have two main types: Traditional ML and Deep Neural Network methods.
. T-MLPU methods are the most common state-of-the-art MLPU systems. Table 2 shows the list of classifiers used by these systems. These classifiers are trained using three types of features [76] : lexical, third-party and distance-based features.
Lexical features. they account for the properties of URL string [10] . Various prior studies have used different lexical features that can be grouped into the following types.
(1) Basic-lexical features: they represent the statistical properties of a URL string such as number of characters, number of digits, entropy, keywords in a URL string or URL parts. These features are often used in industrial solutions for detecting phishing attacks combined with content-based features [49] . A study [57] trained KNN, DT and RFT on these features to [103] classify phishing, spam, defaced and malware URLs. The work showed that RFT performed better, achieving precision and recall of 99%. A relevant study [46] also used these features and trained SVM and online learning classifier. The work showed that online classifier (AROW) performed better than SVM classifiers. Another study [39] trained RFT over these features along with content-based (features from a webpage) and demonstrated that their proposed solution achieved an accuracy of 99.09%. (2) Bag of Words (BoW): these features represent the most common words in a URL dataset.
Multiple studies have used these features with several classifiers to detect phishing. [44, 63] used these features. (3) Bigram of URL: these features provide the closest context of a word and constitute of two common consecutive words in a URL dataset. [10, 25] used these features with BoW of URL to detect phishing URLs. (4) BoW of URL parts: they contain the most common words in each part of a URL. These features are used by [54, 55, 95] . (5) Character n-grams: they constitute most common n character sequences in a URL dataset.
These features are recently used by [18, 97] .
Distance-based features. they contain complex features like Conditional Kolmogorov Complexity [61] and edit distance of a given URL with known brand [14] . These features can only be extracted for a limited number of known brand names [76] such as PayPal and Google and hence are not scalable on large datasets.
Third-party features. they represent the quality attributes of a URL computed by an external third-party. These features include domain registration information from WHOIS [100] such as registration authority, registrar name, age of a domain, page rank. Despite the usefulness, these features cause additional latency due to external server queries [46] .
Once the features are selected, the classifiers are trained by tuning hyper-parameters such as the number of trees in RFT or the learning rate in SVM based on the validation results. Validation uses an unseen part of the training data to validate the performance of the trained model using either K-fold or holdout cross-validation. In the K-fold validation method, the training data is split into k parts. k − 1 parts are used for training, whereas one part is used for testing. This procedure is repeated k times, and the average performance is recorded. In the holdout method, the training data is split into two parts: one is used for training while the other is used for validation. The performance of MLPU systems are measured using the performance matrices shown in Table 3 . 
Accuracy Percentage of correctly classified instances.
The correctly identified proportion of positive instances. Precision
The percentage of the detected positive instances that were correct. F1-Score
The harmonic mean of recall and precision.
A loss function that compute the error between the target(actual) value and predicted value. False Positive Rate (FPR)
The ratio of negative instances incorrectly classified as positive over the total number of negative instances. True Negative Rate (TNR)
The percentage of the detected negative instances that were correct False Negative Rate (FNR)
The ratio of positive instances that are classified as negative over the total number of positive instances. Area Under the Curve (AUC) It is a two-dimensional area under Receiver operating characteristic (ROC).
Recently, DNN-MLPUs have gained tremendous popularity in detecting phishing URLs [5, 47, 50, 66, 77] . These methods use character and word vectors representations of URLs to train the Deep Neural Networks. In our study, we refer this input representation as vector-based features. Table 2 shows the list of deep learning classifiers used by these systems. Following are some examples:
(1) URLNET: A study [47] proposed a MLPU system that detected phishing URLs using CNN. The CNN was trained on five input modes. These modes were: URLNet (Full), URLNet Word CNN, URLNet Word CNN + Character-Level Words, URLNet Word CNN + Special Characters and URLNet Character-level CNN (see [4, 47] for details). The study concluded that the URLNet (Full) outperformed the state-of-the-art MLPU system, achieving an AUC of 0.9929. (2) EXPOSE: Another study [77] utilized Bag of CNNs (four CNNs) trained on character vectors ( [77] for details) to detect phishing URLs. The method attained an AUC of 0.993. (3) LSTM: Recently, [5] proposed a method to detect phishing URLs using LSTM. The study achieved an accuracy of 98.7%. 
Evasion is an attack on a target ML model at the test time. These attacks are distinct from one another based on their threat models.
The threat model represents the adversary strength in terms of two main factors: knowledge and leverage [86] . The knowledge about the target ML model includes sensitive information about its anatomy such as the features, learning algorithm, hyper-parameter, and training dataset instances. Whereas, leverage defines the attackers' control over modifying this information.
Based on the threat model, evasion attacks are classified into three main types namely white-box, black-box and grey-box [8] . In white-box attacks, the attackers have complete knowledge and leverage of the systems. In grey-box attacks, the attackers have limited knowledge and leverage of the ML systems such as control over changing features but not model hyper-parameters. Contrary, black-box attacks are realistic in practice as they assume no insider access knowledge and leverage of the system.
Previous studies have proposed two types of black-box attacks: (i) one that uses the query access to target ML or surrogate (attacker created model using the domain knowledge) models to find the adversarial examples using gradient optimization techniques. These attacks assume a transferability principle, i.e., adversarial examples affecting one model will have an impact on the other models [30] . And (ii) one that produces adversarial examples independent of any ML models [24] . In terms of defences, Adversarial Training is the most popular one [8] . An adversarial training increases the robustness of ML models by augmenting adversarial examples with training data [89, 90] .
In this study, we apply a black-box evasion attack against MLPU systems that requires no query access while creating adversarial examples. Therefore, our attack is not dependent on a particular MLPU system. Besides, we investigate the adversarial training defence using our generated samples to study their impact on our evasion attacks.
This section presents the state-of-the-art of evasion attacks on ML-based phishing Detectors.
DeepPhish. A study [6] proposed an algorithm called DeepPhish. The study revealed how the Machine learning algorithms could be used as a weapons to simulate more powerful attacks against phishing URL detectors. This work has identified three different attackers (threat actors) by analyzing one million phishing URLs and clustering them based on patterns and domain information. The URLs in each cluster were then passed through an MLPU system [5] to obtain a phishing score (probability that a URL belongs to phishing class) of the cluster. The most effective clusters were selected to synthesize more adversarial URLs using a Long Short Term Memory (LSTM) neural network. The generated URLs were 27% more effective than the original phishing URLs.
This work has a few limitations: (i) it is computationally inefficient as it requires training a LSTM model to produce adversarial examples; (ii) it involves query access to a test model (to select adequate phishing URLs). Therefore, this approach is dependent on the test model and cannot be extended to other models; and, (iii) the evaluation is not comprehensive as they tested only one MLPU system [5] against their attack.
A recent study [2] formulated an evasion attack against MLPU system trained over distance-based features. They generated adversarial URLs using Generative Adversarial Network (GAN). The generator took binarized URL feature vectors as input. It then learned to generate adversarial examples by using constant feedback from the discriminator.
The limitation of this work is that the adversarial example generation process is computationally expensive and requires the knowledge of the URL features.
Cracking Classifiers Google Page Filter. Another work [49] demonstrated that Google Phishing Page Filter (GPPF) classifier could be evaded by only changing on average of 3-5 features used by it. The study extracted GPPF from the chromium (development version of chrome browser) and reversed engineered it to get the used features. The authors then identified bad and good features based on GPPF score feedback and then devised two attacks, namely addition of good features and removal of bad features. The study found that the GPPF can be evaded successfully by on average adding three good and eliminating five bad features. Additionally, the study also unveiled that adding only 2.5% good URL features could result in a successful evasion attack. This is an interesting observation suggesting the Phishing URL features can affect not only MLPU but also effect the state-of-the-art industrial Phishing page detectors like GPPF. Nevertheless, this study gained access to GPPF and directly manipulated the features. In contrast, our attack is not specific to a particular model and does not rely on MLPU knowledge.
Adversarial Sampling. Recently another study [81] proposed an evasion attack against phishing detectors. The study showed that phishing detectors were vulnerable to adversarial attacks if the feature set were manipulated and the performance droped to 70% by changing a single feature. Their direct feature manipulation assumption could be unrealistic in practice as it requires insider access to a targeted system. Unlike this study, our work generates adversarial examples without the knowledge and access to the target ML features. Moreover, our work only considers MLPU instead of Phishing detectors in general.
In this section, we describe the details of our approach to solve the identified problems from three aspects: threat model, overall methodology and our research questions. Finally, we discuss the comparison of our approach with the existing attacks (DeepPhish and GAN) on MLPU systems.
We define our threat model based on the following factors:
(1) Knowledge and Leverage: We assume no knowledge and leverage of the target ML models.
(2) Attack Goal: Given a pre-trained MLPU system F : X → Y , which maps from input space X to a set of classes Y, our attack aims to generate a set of adversarial URLs A exp from a legitimate URL x ∈ X whose ground truth label is y ∈ Y , so that F (A exp ) = t where (t y). These constraints are usually data-dependent, e.g., for textual data, the limitation is the adversarial example must follow the grammar and syntax format of the used language [102] . We formulate three main constraints that our generated adversarial phishing URLs must satisfy. (a) The adversarial example must be a valid URL, i.e., it must follow the generic syntax provided by RFC 3986 [27] . (b) They should either contain the target domain name as a part of the adversarial URL or the edit distance (number of character transformations) between real and adversarial URLs must be minimal [28] (less than 10% of the total length of the real URL). These constraints are essential for satisfying the semantics of the phishing URLs [46] . (c) They should be available for registration. This constraint is used to avoid bias in evasion result confirming that the newly generated phishing URL is not already present in a phishing dataset.
The goal of our study is to unveil the security vulnerabilities of MLPU systems. To achieve this goal, we first propose an algorithm to generate adversarial examples. After that, we train MLPU classifiers to reproduce the 41 state-of-the-art MLPU systems. Finally, we simulate an evasion attack against the trained classifiers. Fig 2 provides an overview of our approach. We discuss the details of each stage in the subsections below:
3.2.1 Generate Adversarial Examples. This stage is responsible for the generation of adversarial examples. It consists of two modules. The first module is responsible for adversary generation while the second module generates an adversarial URL by validating the perturbation constraints. The pseudo-code for each module is shown by Algorithm 1 and 2 respectively. The details of each module are described in subsections below.
Adversary Generation. The algorithm 1 takes four inputs: Seed URL dataset dseed, pre-trained word embedding W emb , list of known malicious extension lst exe and list of known malicious TLD lst tld . The output of Algorithm 1 is a list of adversarial examples A exp . This module consists of four steps, namely preprocessing, domain, path and TLD adversary.
Preprocessing. In this step, we preprocess each URL x in dseed to obtain meaningful tokens of the URL. Firstly, x is parsed using 'urllib' [71] and 'tldextract' python libraries [69] to obtain following parts url t : IP address, port, scheme, sub level domain (sld), domain (d), tld (t), path (p), parameter and fragment e.g, for the URL "http://www.outsavoringcytotaxonomies.com" the domain name is Input: dseed, w emb ,lst exe , lst tld ;
A exp .append(DM adv (url t ,d,n,w emb ,x)); A exp .append(PT adv (url p ,d,p,n,w emb ,url part ,x)); A exp .append(T D adv (url t , t, x, l tld )); end return: A exp ;
Input: l ad , x;
AND godaddy(crafted) is 'available' then A u .append(crafted); end end return: A u ; "outsavoringcytotaxonomies", TLD is "com", subdomain is "www" and scheme is "http". Further, we decompose each part into more meaningful tokens by using "English word-based" tokenizer [7] . For instance, in the above example, the domain name can segment into five more meaningful tokens, i.e., 'out savoring cy to taxonomies'. Therefore for each part, url t is composed of a single or sequence of multiple tokens. These tokens are then sent to the DM adv , PT adv and T D adv steps that implements domain, path and TLD adversaries respectively.
Domain Adversary. In this step, our algorithm perturbs the domain name of the seed URL x at two levels of granularity: character (char) and word. The char-level granularity produces syntactically similar but different domain names by changing the letters used in the original domain name, e.g., 'http://www.netf1ix.com' is created by changing the 'l' in 'http://www.netflix.com' to '1'. This type of substitution is called homoglyph attack [74] whereas our word-level adversary targets the domain name by concatenating it with a similar word. Algorithm 3 shows our method to generate this adversary.
The algorithm takes the url t , d, W emb , n, x as input and outputs of list of valid domain adversaries. Firstly, it generates the char-level adversaries for d based on nine techniques using an open-source tool DNStwist [91] . However, for homoglyph generation, our algorithm only produced ASCII character-based homoglyphs unlike this tool because we assume that URL pre-processing will transform the Unicode homoglyphs to International Domain Name (IDN) standard [36] .
For word-level adversaries, we devise four novel word-level adversaries: subdomain (url sub ), part (url part ), swap (url swap ) and repetition (url repeat ). The former two-word adversaries concatenate semantically or syntactically similar word with d. This is done by searching d in W emb vocabulary. If d is in vocabulary then a list of n semantically related words to d is retrieved fromW emb . The rationale behind using the related word is to improve the intra-relatedness of words to convey a semantically coherent meaning in the adversarial URL. If d is not in the W emb then we used SymSpell library [78] to get the n syntactically similar words. This library provides spelling correction suggestions for unknown words and produces a list of n word with similar spellings.
For example, given a domain name which is not a valid word as 'adcb' (Abu Dhabi Commercial Bank), using SymSpell we obtained a list of n syntactical similar words such as 'add', 'act', 'ads', 'acc', 'arc', 'ace', 'adze' etc. We denote the list of these n related words by R n . For each related word r in the list R n , the algorithm concatenates it with d using '.' and op i.e. ('-' or ") to create url sub and url part respectively. For illustration, against 'Netflix', our algorithm produces a new domain 'netflix.hd'. The generated domain is 'hd, whereas 'netflix' is a subdomain. Similarly, four url part are produced i.e., 'hd-netflix', 'netflix-hd','hdnetflix' and 'netflixhd' against 'netflix'. Here, the above generated adversarial example combines the target domain "Netflix" which provides video streaming service to users with HD short form for high definition video quality. Both words semantically convey that "Netflix in HD quality". As we have mentioned earlier that the domain name may contain multiple word tokens.
To generate (url swap ), the different word tokens of the domain are swapped to obtain a new domain name. For example, for domain 'bankofamerica', our algorithm produces five new domain names, i.e., bankamericaof, ofbankamerica, americabankof, americaofbank, ofamericabank. Subsequently for repetition obfuscation technique our algorithm repeats d, n t times to produce a new URL, e.g., 'netflix-netflix' when n t =2. Table 5 enlists the obfuscation techniques used to generate adversarial URLs with an example for a particular seed URL. All the generated adversarial domain names are appended to the list D a . This list with the original URL is then sent to reconstruct and validate module (Algorithm 2) that creates the adversarial URLs and apply perturbation constraints to accept or reject the generated adversarial examples.
Path Adversary. In this step, we perturb the path of the seed URL x. This adversary takes the url t , path (p), domain (d), seed URL (x), pre-trained word embeddings (W emb ), list of path extension lst exe and url part from domain adversary as input and outputs the list of path adversaries P u as shown in Algorithm 4. The new domains d n are obtained from DM adv (urlpart) obfuscation method. For each i in d n each token in the path is replaced by the original domain name d iteratively to create a new adversarial URLs p dm e.g., 'https://www.credit-suisse.com/au/en/ private-banking/contactus.html' is altered to 'https://www.overpaidcredit-suisse.com/au/en/credit-suisse/ private-banking/ contact-us.html'. Additionally, we generate path exe which replaces the original extension of the path with a malicious extension chosen from lst exe , e.g., the above path changes to '/au/en/creditsuisse/private-banking/contact-us.bin'. Lastly, the old domain d is replaced by i and p with p dm and p exe successively and appended to the list P a . This list is then sent to reconstruct and validation module (Algorithm 2).
TLD Adversary. This adversary takes the url t , seed URL (x), t , list of malicious TLD lst tld as input and outputs the list of TLD adversaries. It is the most common and straightforward type of adversary as depicted by Algorithm 5. It replaces the original TLD t of x with mt in lst tld to obtain if if d in w emb .vocab then R n = w emb .similar-words(d,n); else R n =SymSpell(d,n); end forall r in R n do url sub .append(replace(url t , d = concat(d, '. ',r )); url part .append(replace(url t , d = concat(d, 'op',r )); end if (numbero f words(d) > 1) then url swap .append(replace(url t , d =swapparts(url t , d))); end url repeat .append(replace(url t , d = concat(d, '-',d)); D a .append(url sub ); D a .append(url part ); PT adv (url part )//send to path adversary ; D a .append(url swap ); D a .append(url repeat ); D u =reconstruct(D a ,x); return: D u ; ALGORITHM 4: Path Adversaries PT adv Input: url t ,d,p n,w emb , x,lst exe ,url part ; Output: P u ; Initialize P a =[] //list of updated url t ; d n = url part ; forall i in d n do forall loc in path do p dm = replace(d,loc,p); rand=random(0, len(lst exe )); if if('ext' in p) //ext denotes the extension then p exe = replace(ext, p dm , lst exe [rand]); else p exe = concat(p dm , lst exe [rand]); end P a .append(replace(url t , d = i, p = p dm )); P a .append(replace(url t , d = i, p = p exe )); end end P u =reconstruct(P a ,x); return: P u ;
ALGORITHM 5: TLD Adversary T D adv Input:url t , t, x, l tld ; Output: T u ; Initialize T a =[] ; forall mt in l tld do T a .append(replace(url t ,t=mt)); end P u =reconstruct(T a ,x); return: T u ; Fig. 3 . Algorithms for generating Adversaries the list of TLD adversaries T a which is then sent to reconstruct and validation module (Algorithm 2) for validation and unparsing.
Validation. Algorithm 2 shows the reconstruct and validate module of our methodology. This module is essential for two purposes: It reconstruct a URL from its updated tokens url t to produce adversarial URLs Adv using [71] and then it applies three perturbation constraints mentioned in section 3.1. Firstly, it checks the generated Adv meets the RFC [27] standard using validators library [70] . Secondly, it checks either the edit distance between x and Adv is less the 10% of the x length or original d should be the part of the Adv. We have used Levenshtein distance [68, 85] Table 6 provides the list of the features used by these classifiers. We used the same preprocessing method as explained in section 3.2.1 for trained T-MLPU systems.
For deep learning methods, we used the reproducible code of URLNET [47] and EXPOSE [77] published on GitHub repository [4] and [41] respectively. The problem with this code was that for URLNET, the trained model was not available, while for EXPOSE, the trained model produced inconsistent results (floating values greater than 1) on our test data. One reason for this could be that the model was built in 2016 while the testing data was gathered from the latest phishing feed. For these reasons, we trained both of these models along with traditional ML models on the large corpus of URLs and recorded their performance.
Attack. Lastly, we simulate the evasion attack by testing the pre-trained models against our generated adversarial Phishing URL. We measure the success rate of our attack by evaluating percentage of adversarial phishing URL misclassified by the baseline models given success rate = (1 − Acc eva ) * 100. Here Acc eva is the accuracy of the model on evasion, i.e., the rate of correctly classifying the adversarial URL as phishing. [40] .
In this study, we aim to answer the research questions mentioned in Table 1. 3.3.1 RQ1. How successful our evasion attack is against the MLPU systems? To answer this RQ, the generated adversarial URLs were subjected to the trained baseline models, and the success rate of our attack was recorded. For comparison, we used the adversarial URLs generated by Deepphish [20] , tested them against the trained baseline models and recorded the success rate of Deepphish attack.
3.3.2 RQ2. Which evasion adversary algorithm achieved higher attack success rate? To answer this RQ, we analyzed the performance of baseline models based on three aspects: adversary type, perturbation level and obfuscation method.
3.3.3 RQ3. Does adversarial training improve the robustness of MLPU systems? To check whether adversarial training can help to improve the robustness of the test models, we selected all the adversarial URLs previously used to evade the baseline models, augmented them with the original phishing dataset and trained all the baseline models with exception to models using KNN classifier. KNN was not selected because it yielded worst average validation accuracy on the original dataset as indicated in section 5.2. Further, we tested both the original and adversarially trained models on another set F tar of adversarial phishing URLs generated using different seeds S ′ than those previously used. We did this because we wanted to analyze the evasion behaviour of the baseline models for known target brands (as previously used seeds contained popular phishing targets) and potential future targets.
To answer this question, we use three measures to evaluate the practical applicability of our attack. Firstly, we computed the average time to generate one adversarial example for a target domain. Secondly, we checked the annual domain registration cost of the generated domain name using go-Daddy python API [29] . Thirdly, we used two online tools API Google SafeBrowsing [33] and Virus Total [84] . 
We discuss our experimental setup in terms of the main steps of our methodology. 
For generating adversarial examples, we used the following inputs.
Seed URL Dataset. To formulate the evasion attacks against the considered baseline models, we initialized dseed to a set of 27467 legitimate URLs S. These URLs were obtained by crawling top 100 most frequent phishing target websites [60] . Moreover, only URLs of the web-pages containing a <form> tag were considered because phishing websites mostly use forms to obtain private information such as username and credentials [13] . This dataset contained popular phishing targets such as Netflix, eBay, PayPal, Facebook, Amazon, etc. A list of some examples generated adversarial URLs is given in the appendix (Table 13) .
Word Embedding and other lists. We used "English-subword" pre-trained embedding from FastText [23, 58] as an input to our adversary generation module. The rationale behind using this embedding is two-tier. Firstly, this embedding is trained over a Common Crawl database [16] . This database contains huge amounts of data obtained by crawling the web for the last seven years. Hence, we strongly believe that the word vectors trained on this dataset contains the contextual relationship between URL and website content. Secondly, a URL is a sequence of characters and domain names may not be an English word but merely a random sequence of characters, so the sub-word embedding is a more suitable choice to handle Out Of Vocabulary (OOV) words. lst tld is obtained from [19, 88] while lst exe is gather from [11, 87] . We initialize a number of related word n to 20.
Adversarial Training Dataset. For testing the adversarially trained models, adversarial examples are generated using a new seed dataset S ′ . This dataset contains a list of 107 legitimate URLs that were less popular phishing targets obtained from [83] . This data contained e-commerce sites such as JBHIFI, Alibaba, Target. We used this dataset to evaluate the impact of adversarial training defence on the models.
For training the ML models, we used the following setup.
A large URL dataset of 193, 386 URLs was collected using multiple sources mentioned in Table 8 . Instead of directly using Alexa dataset [3] , we crawled 1500 unique domains from this dataset to obtain relative URLs. This has been done because Alexa dataset only provides the list of index pages of the websites while phishing feed providers such as Phishtank [67] or OpenPhish [60] provide lists of complete phishing URLs. For example 'www.netflix.com' is in the Alexa dataset, while the relative URL 'www.netflix.com/au/login' is not present. In contrast, "https://handaummail.000webhostapp.com/shu/DHL-NEW/D2017HL/u.php" is a phishing URL in OpenPhish [60] which contains the full path of phishing resource in the URL. Hence, directly using Alexa dataset creates biases in the data as also highlighted by [80] .
These data sources also have overlapping URLs; therefore, we removed the duplicates. Although, practically this was an imbalance class problem where the number of legitimate URLs were always greater than their counterparts, a balanced dataset was considered for training to avoid any biases in results (such as learning one class more accurately than the other or overfitting).
For adversarial training, we augmented this dataset with the adversarial examples generated from the set of S seed URLs. We labelled the adversarial samples as phishing URLs. [79] . We used average validation accuracy in all epochs to record the performance.
For answering RQ1, we used 30, 000 adversarial URLs generated from the seed dataset S to evade the trained MLPU models. We recorded the success rate of our attack against all the models. To answer RQ2, we considered 10, 000 adversarial URLs per adversary type and recorded each of their evasion results using three factors the success rate, perturbation level and URL obfuscation techniques. To test the adversarially trained models, we used 30, 000 adversarial URLs generated from the seed dataset S ′ and recorded the success rate of the attack.
In this section, we report the results of our experiments by first presenting the baseline models performance, followed by answering four key questions that our study aimed to answer. Figure 4c shows the average FPR and FNR of all the models.
In these results, for deep learning, both EXPOSE and URLNet attained more than 97% average accuracy with a low (i.e., 0.37%, 0.59%) average FPR and FNR, respectively. While among traditional baseline models, all the models acquired a performance of more than 90% except for SVM and LR trained over basic lexical features. However, the average FNR and FPR is comparatively high, i.e., 2.98% and 6.72% respectively. These results suggest that deep learning models are more effective in differentiating between legitimate and phishing URL than traditional ML models.
Furthermore, in deep learning models EXPOSE, and URLNet (Full) performed better than other URLNet configuration whereas XGB and SVM with Char n-gram of URL performed the best among traditional baseline models. Interestingly, SVM with basic lexical features performed the worst with only 80.87% accuracy and an FNR of 29.39%. This result was unexpected as SVM with basic lexical features is the most popular model in the literature [76] . Other models, trained over basic lexical features and especially those using KNN and LR classifier also yielded a high FNR compared to other models indicating that these model are not suitable for precise URL classification.
In terms of the features, char-level inputs achieved the best average accuracy for both deep (Char vectors) and traditional models (Char n-grams). Moreover, the results reveal that all the ensemble classifiers (Bag of CNN, RF, XGB and LGBM) performed better than base classifiers (Single CNN, SVM, LR and KNN). Summary : All the baseline models except models trained over basic lexical features or based on KNN and LR classifier have a strong tendency to detect phishing URLs. Table 9 and Table 10 summarize our results against deep and traditional learning models respectively for seed dataset S (see section 4) . Overall, our attack evades all the models with an average success rate of 67.98% for deep learning while 66.89% for traditional ML models. For traditional baseline models, our attack yield best success rate for LR trained over BOW of URL parts features.
In terms of the features, our attack is 9.65% and 13.38% more successful on URLNet character and word vectors than one trained independently on character and word, respectively. For the traditional models, our attack is most successful on the models trained over BOW of URL parts with an average success rate of 75.53%. In contrast, unexpectedly, our attack has a least average success rate of 58.58% on models trained over basic lexical features although it has minimum original average accuracy and high FNR, i.e., 91.43% and 14.48%.
On further analysis, we found that this model predicted incorrect labels for 40% of our seed URL and classified them as malicious. Therefore, its result cannot be trusted. Moreover, a general observation is that models trained over character-based features have less success rate compared with those trained over word-based features. From these results, we conclude that character-based features are more robust (still not sufficient) than word-based features for detecting phishing URLs in adversarial environment.
We predicted from the results of baseline models that models trained over base classifiers, especially KNN would yield better evasion results as compared to ensemble classifiers. Nevertheless, KNN performed the worst but interestingly all the models were evaded irrespective of the nature of their architecture, i.e., base or ensemble. For example, our attack was 8% more successful against EXPOSE (based on Bag of CNN trained over character level vectors) than single CNN (URLNET ) trained over the same input. Similarly, our attack had almost equal success rate, i.e., 65% for the models trained on SVM (base) and LGBM (ensemble).
Consequently, we conclude that our attack is equally successful against all classifiers irrespective of their base versus ensemble nature. Another observation is that our attack yield high success rate of 69 Comparison of our attack with DeepPhish. Table 9 and Table 10 illustrate that our attack is more successful across all the models as compared to DeepPhish [6] . Interestingly, DeepPhish is 11.55% more effective against SVM trained over basic lexical features than our attack. Whereas, for all the other models, our attack outperforms DeepPhish. Notably, there is a considerable difference (53.78%) between the average success rate of our versus DeepPhish attack for deep learning models. For traditional methods, our attack has 41.2% more average success rate than DeepPhish. Although DeepPhish can also evade the underlying models with almost 20% success rate across all the models.
These results indicate that the ML models are highly sensitive to adversarial URLs and are not reliable. Summary: Our attack can evade all the baseline model with an average success rate of 66%, and it is stronger (>50%) than DeepPhish method. Models trained over word-based features and RF, KNN classifiers are more evasive than other models.
We further analyzed the results based on three categories: adversary type, level of granularity and URL obfuscation. Figure 5 shows the box-plot analysis of each category over all the 41 models. Figure 5 (a) demonstrates that both domain and path adversaries are highly successful in evading all the models with a median success rate of approximately 70%. On the other hand, TLD adversary is not significantly successful, attaining a median success rate of 55.29%. One reason behind this result is that we used an already known list of malicious TLD to create these adversaries. Thus there is a high chance that these TLD are already present in phishing class distribution of training data set. Despite their presence, these adversaries are still able to deceive the underlying models half of the time. Another interesting observation is that path adversary has an outlier with a minimum success rate of only 9.06%, indicating that one of the models (LR-Basic Lexical) tends to classify path adversary as phishing URLs. However, the original accuracy of this model is only 89% with an FNR of 21.80%. Figure 5 (b) shows the performance of all the adversaries in terms of the perturbation level. The character-level perturbation is more powerful (i.e., median of 97%) than word-level. We expected this result as a character-level perturbation introduces new character distributions (Out of Vocabulary problem) that may not be present in the training data. An interesting observation is that character perturbation achieves a success rate of more than 94% even for the models that work based on character-based features. Figure 5 (c) illustrates the relation of success rate with the URL obfuscation technique. Among Character level techniques, all the URL obfuscation were able to evade all the model with a median of more than 90%. Specifically, omission, subdomain, transpose, and homoglyph obfuscation techniques had a median success rate of 100%. Even the highly accurate deep learning models were 100% evaded by these methods. In contrast, in word-based obfuscation method word repetition was able to evade all the models more effectively (median 86.49%) than other methods. Whereas, word hyphenation and subdomain based obfuscation method showed a minimum success rate with a median of 38 and 40% respectively. This result shows that the current baseline models yield unreliable results for all the obfuscation methods, especially character-level perturbations such as subdomain, transpose and obfuscation technique. Summary: Domain and path adversaries are more successful than a TLD adversary. We found that MLPU systems are highly sensitive to character-level perturbations, especially subdomain, omission and homoglyph methods. Figure 6a depicts the difference between average validation accuracies of original versus adversarially trained models. The result shows that there is no significant difference between the average validation accuracy of models with and without adversarial training. With an exception to SVM and LR trained over basic lexical features, the performance of all other models is slightly (<1%) increased notably for Deep learning models. Figure 6b shows the evasion results of the original versus adversarially trained models for adversarial URLs F tar generated using S ′ . Compared to original models, 31 out of 36 adversarial trained models have less success rate on our attack. However, still, the average success rate of our attack is 79.85% across these models for F tar . The decrease in success rate is prominent for models using word-based and basic lexical features as compared to those using character-level features with exception of the Expose model. Additionally,the models using LR, XGB, LGBM and Bags of CNN become comparatively more robust by adversarial training than models using RF, SVM and DT as classifiers. Interestingly, there is an increase in success rate for five models, notably for URLNET word and special character level CNN, on which the success rate is increased by 14.88% compared to the original model.
These results show that adversarial training is not very beneficial in reducing the success rate of the attack. Besides, Figure 6b also depicts the difference between the previous (adversarial URLs generated using S as seed) versus F tar evasion results for the original models. Our attack is less successful for adversarial URLs generated using popular targets such as Netflix, Google, Office. While for new targets, it is highly effective. Summary: Adversarial training decreased the success rate of our attack on 31/36 models. Although the decrease was significant (i.e., 5.71% on average) but was not sufficient as our attack still had a success rate of 80%.
We present the results of this RQ using three main aspects: computation time and the number of examples, cost evaluation and online service evaluation.
We found that our method requires an average time of 23 milliseconds (ms) on (core i7 CPU 2.2Hz with 16GB RAM) to generate one adversarial example for a given target domain. However, to ensure the availability constraint, only 500 generated domain were tested per minute because of the GoDaddy API restriction [29] . The total number of examples N generated for the domain is dependent on each adversary type as given by Table 11 . Here, n depicts the number of URL obfuscation techniques for the adversary type, e.g., n=14,2,1 for a domain, path and TLD adversary. l, e, t represent the length of path, size of extension and TLD respectively. d f is the number of webpages in the domain containing the form HTML tag, in best case scenario d f = a total number of webpages, in a domain. p depicts the popularity of website brand in the phishing community, e.g., according to open-Phish [60] , Pay-pal, Rediff, Apple Inc, and Bank of America are the most popular phishing target. We found that N is inversely proportional to p because for popular phishing targets, some of the generated adversarial examples are already used by attackers and are currently blocked, e.g., for 'Netflix'. We found that 347/848 of the generated domain names were already blocked, thus violating our third perturbation constraint. 
We checked all the generated domain names for an annual registration cost. The median cost for all the adversaries is $11.99%/year. Table 12 enlists the results. We used a single row for both path and domain as path adversary share the same domains as URL-Hyphenation technique in domain adversary (see section 3.2.1). Most of the domains generated for these adversaries are available at a median price of $8.99/year. As already seen in Q2 that domain and path adversaries have the highest success rate (>69%), therefore availability of these adversarial domains at low annual cost makes these attacks highly feasible. Moreover, we found the adversarial domain name "manage.cloud" for "manage.com" with TLD ".cloud" have a maximum price of $19999.99/ year whereas the most of TLD adversary using "fun, club, website, xyz, site and space TLDs are available at the lowest registration cost of $0.99 only. For example, the domain name "centralbankofindia.club" is only available for $0.99. Hence, a famous domain name with these TLDs can quickly become a target of cybercrimes with less than a dollar of investment.
Although, there are some exceptions, e.g., "office.site" is available at $ 6499.99 while "steampowered.site" at $169. Moreover, we found that adversaries with ".love", ".global" and ".host" TLDs are available for most popular target such as "Netflix" and "chase" with high prices such as "apple.host" and "chase.host" are available at a price of $ 6499.99 and $3249.99 respectively, Moreover, for less popular targets such as "amcobank.com" (Ahmedabad Bank) ".host" TLDs are readily available at a low price of $9.99.
This result shows that the adversarial domain names are available at such a low cost (median of cost of $ 8.99% and 14.99% for the domain, path and TLD adversaries) which makes them attractive targets for adversaries in future.
We considered online service evaluation to analyze the flexibility of these services to detect variants of a known legitimate site. We tested two popular online services: Google SafeBrowsing [33] and VirusTotal [84] using their APIs. It is important to note that our adversarial examples were generated before March 2020 while we tested the online services between 1 st to 20 th March 2020. We found that Google Safe was able to detect only two hostnames (out of 20000 generated hostnames) "go-chase.com" and "hubpages.today" as phishing Whereas, VirusTotal API only returned a phishing alert for "hubpages.today".
The detection of these two domain names raised a question on the registration availability, i.e. if these hostnames are present in Google Safe than it should be already registered. Hence, to analyze further, WHOIS [100] service was queried to find the registration date of these domains. We found that "go-chase.com" was registered on 14 th March 2020 after the generation of our adversaries while information about this site containing phishing content was updated by Google SafeBrowsing on 31 st December 2019. While "hubpages.today" is not registered, both services updated the status of this site as phishing on 17 th January 2017 and 29 th April 2018 respectively. Moreover, while examining the results, we specifically tested the "go-chase.com" on VirusTotal. We found that "go-chase.com" was added in seven blacklists on 28 March 2020.
This result suggests two main points firstly, our attack produces realistic phishing URLs as evidenced by the example of "go-chase.com". Secondly, there is a gap present between domain registration services and these online tools as indicated by "hubpages.today" example i.e., "hubpages.today" is available for registration at a low cost of only $1.99 on GoDaddy, on the contrary, it has been blacklisted by Google SafeBrowsing and VirusTotal in the past.
These results show that researchers and practitioners should work together to bridge these gaps between ML, online blacklist and domain registration systems to ensure the security of the web. Summary : Our black-box evasion attack is feasible in practice as online services are unable to detect it. Our method is capable of producing multiple phishing URL in 23ms/URL at an average cost of $ 11.99/year. Furthermore, we found that the information about the phishing URLs is not consistent across all the web infrastructure, which further reduces the attacker effort.
This section presents further insights from the results obtained in the previous section.
By analyzing the results, we found the following limitations of the considered MLPU detectors.
6.1.1 Incomplete Modelling Assumption. Essentially, our attack is successful in evading the baseline models (section 5.2) because it exploits their basic modelling assumption. These models, learn the decision boundary based on the lexical or syntactic differences between phishing and legitimate URL tokens. For example, classifiers trained over basic lexical features assume that there exists a distinguishable difference between the structure of legitimate versus phishing URLs e.g., the length of the URLs.
Similarly, n-gram and vector-based models assume that character and word distribution between both classes is separable. However, this assumption does not consider the case where there is a strong correlation between the legitimate and phishing URL. For example, for legitimate URL "www.paypal.com" and phishing URL against it "http://paypal.com.igr2.ru/n", there is a significant similarity instead of difference.
Our attack takes advantage of this vulnerability and generates adversarial URLs having lexical, syntactic and semantic similarity with their targets (legitimate URLs). That is why our attack is more successful than DeepPhish attack (section 5.2) as the latter one retains the similarity with the phishing seed instead of its target. We believe that covering both the similarity and difference aspects while developing the models can prove to be more resilient to evasion attacks than the current solutions.
6.1.2 Biases toward Phishing Target Trends. In section 5.4, We observed that the success rate of our attack for less popular phishing targets is approximately 20% more than the popular ones. For instance, Figure 7 shows the success rate of our attack on Netflix vs Wish on three models (Expose, URLNET and Char n-gram XGB). We have chosen these models as they showed some resistance towards our attack as compared to other models (section 5.2). It can be seen that our attack is highly successful (success rate > 94%) against Wish as compared to Netflix. For Netflix, two models( URLNET and Char n-gram XGB) offered robustness (success rate < 5%) against our attack. However, EXPOSE was evaded by both Netflix and Wish adversarial URLs. On further analysis, we identified that these models have three notable vulnerabilities.
Out of Vocabulary (OoV). It refers to the word or character lexicons that are not present in the trained model's vocabulary. OoV is a common problem in NLP [34] based systems. However, it is more severe for Phishing URL detection because for a given website, the domain name can be repeated in the training dataset at most to number of webpages on a website whereas the probability of the same path, query-string and parameter repetition across all the legitimate URLs is relatively low. Subsequently, for the phishing URLs, an attacker usually generates multiple URLs of the same kind [77] targeting popular brands. Therefore, the probability of phishing tokens appearing as features is high but, limited to specific brands. Figure 8 (a) and (b) shows the word cloud for individual legitimate, and phishing dataset while (c) shows BoW vocabulary of the combined training dataset, respectively. Most of the words appearing in BoW features are high-frequency words from phishing URLs. In contrast, only a few domain names from the legitimate dataset (Geocities, pastehtml and Wikipedia) with more webpages appear in the vocabulary. It suggests that the training vocabulary is more biased towards phishing tokens while the legitimate domain names remain underrepresented. Attackers can exploit this vulnerability by generating adversarial examples against less popular targets and with more legitimate keywords as also shown by our results (Figure 8 ).
The training vocabulary inclination towards phishing trends is also one of the reasons for the failure of adversarial training defence on the baseline models because it covers the adversarial variants for popular domains, whereas unpopular (potential future) targets remained diminished.
FPR of the models. To examine further, we tested the popular targets (seed) URLs against all the models and recorded the seeds that were misclassified as phishing by the models. The results unveiled that there exists a bias in decision boundary of both traditional and deep learning MLPU systems, i.e., the legitimate URLs for popular phishing targets such as Netflix, Paypal, Microsoft and Google are misclassified by these models while modelling the decision boundary. e.g., Expose, and URLNET (Full) misclassified 50% and 20% of our seed URLs (400 URLs of popular phishing targets) as phishing. Furthermore, this issue is not only limited to the domain names but also extends to other recurring tokens in phishing dataset. These systems misclassify all the examples with login keyword irrespective of the legitimate or phishing nature of a URL. e.g., "http://www.netflix.com/login" are misclassified by all models decision boundary. This result implies that due to the inclination towards phishing tokens, these models are not able to distinguish between phishing and legitimate URLs.
This limitation is visible in the FPR of the initial validation results of the models (Figure 4c ). However, it becomes less evident for models trained over large dataset as the FPR is not often significantly large. For example, the FPR for our baseline models is less than 2.59% on average. FPR is a concern as it can lead to a denial of service attack. One solution to resolve this limitation is to incorporate whitelist (list of legitimate known brands) as the second layer of defence. If the URL is detected as phishing and is in the whitelist, then the access should not be denied. However, this solution also suffers from similar problems as a blacklist; i.e., it is inherently reactive, requires a frequent update and is not scalable.
Possibility of Poisoning Attacks. The dependency of these models on phishing target trends can be leveraged by the attackers to cause poisoning attacks. In poisoning attacks, an attacker manipulates the training datasets with an intent to evade the models in test time. For instance, consider a scenario where an attacker creates a single phishing site and register it with multiple URLs generated using the same pattern, e.g. more than 100 alphanumeric characters, against Paypal organization. However, it has done this with an intention to mislead the models in believing that this typical pattern likely represents the phishing URLs. These phishing URLs get detected and subsequently get added in the blacklist such as PhishTank or OpenPhish. As the training dataset for phishing URLs is mostly collected from the open-source threat intelligence sites, these URLs become a part of the training dataset of the models. Later, the attacker carries out an actual attack by using a different kind of URLs (similar to legitimate URLs pattern, i.e., less than 30 characters impersonating Common Wealth Bank). This poisoning can result in models in believing that the actual attack is benign.
In section 5.5, we found that "hubpages.today" URL was detected as phishing by two online services Google SafeBrowsing and VirusTotal. However, this domain is available for registration on GoDaddy at only $1.99. This finding revealed that there is a gap between blacklist and online registration services.
For instance, consider a case where a URL is detected as phishing and is present in the blacklist. The owner of the phishing website deletes the website, and hence it becomes available for registration. Later, a legitimate registrar registers this website, but the browsers do not let the clients of this website visit it (as it was already blacklisted). In this case, either the blacklist needs to be updated, or the website should not be available for registration.
Another interesting finding is that some of the URLs that violated our availability constraint (although blocked as we cross-checked their status via WHOIS) were not present in any of the blacklist. For example, we found "W1sh.com" is a blocked website, but neither Google SafeBrowsing nor Virustotal has any information regarding it. Consequently, there exists a gap of information between the domain registration services, WHOIS and online blacklists.
Overall, we study an evasion attack against state-of-the-art ML phishing URL detector in black-box settings. Comprehensive experimental results and evaluation have shown that our proposed attack is effective and realistic for generating targeted adversarial phishing URLs. Our study has revealed that considered MLPU systems are highly sensitive to the character-level perturbations. We have also discovered that adversarial training is not an effective defence against our attack. Additionally, we have found that there is a lack of information exchange between online blacklist, WHOIS and domain registration services that hamper users to get precise, consistent and up-to-date information regarding a URL that they intend to visit. On further analysis, we have identified several limitations of the considered MLPU systems that include incomplete modelling assumption and biases towards phishing trends. The implication of our study and the limitations of our research are presented below:
In this subsection, we highlight the implication of our study based on the following stakeholders.
7.1.1 Researchers. Our work can be leveraged by the researchers in the following ways:
(1) Our results showed that MLPU systems achieving high performance (accuracy> 97%) were evaded successfully by our attack. This suggests that the performance should not be used as a sole criterion for an effective MLPU system. The researchers can propose standard metric to quantify the robustness and performance of these systems. This type of metric can help to select robust and effective hyper-parameters of the models while training. (2) We have found that the considered MLPU systems can be evaded successfully by our attack and have also identified the most powerful adversaries (adversary type, perturbation level and obfuscation method). In future, researchers can conduct more focused research on these adversaries to propose more robust and effective MLPU systems. (3) We have also discovered that the MLPU systems are biased towards Phishing URL dataset that is one of the reasons behind the success of our evasion attack. The researchers can propose solutions to address this limitation. (4) Our results revealed that the adversarial training is not suitable for defending the considered MLPU systems against our evasion attack. The researchers can introduce effective defence mechanisms for protecting MLPU systems from evasion attacks. (5) We have shown that there is a gap in phishing detection infrastructure. In future, the researcher can propose a standard synchronization mechanism to exchange information between different services (blacklist, domain registration and WHOIS) so that users can get precise, consistent and up-to-date information regarding the URL they intend to visit.
Our work can guide the MLPU developers in the following way.
(1) Our results suggested that RF and KNN classifiers yield unreliable results under evasion attack. Therefore, we discourage practitioners from using them for developing MLPU systems. (2) We have also observed the character-level features are more robust against our evasion attack.
We suggest that practitioners should prefer these features over word-level features to develop MLPU systems. (3) We also propose that practitioners cannot rely only on adversarial training defence to handle evasion attacks on MLPU systems. (4) We recommend practitioners should not rely on the performance metrics to assess their models but also test them against evasion before deploying. To aid this, we have published our adversarial URL dataset (https://bit.ly/2DjvZVP) which can be used by practitioners to assess the robustness of their MLPU systems.
Our work provide following recommendation to the Internet users.
(1) We recommend users should thoroughly examine a URL before clicking it to avoid becoming a victim. (2) We also suggest that people should use multiple services (different blacklists, WHOIS) before visiting or registering a new URL. (3) Lastly, we encourage users to report any suspicious URL to help the research community to fight against the phishing campaigns.
Our work has the following threats to validity.
(1) The source codes for traditional ML models proposed by prior studies were unavailable. Therefore, we tried to replicate these MLPU systems by choosing our hyper-parameters. As such, our experimental setup may not precisely map to these baseline models. We tried to use large vocabulary sizes for n-gram features and optimal hyper-parameters to keep our deployment aligned with these baseline models and reported their performance in our settings. (2) External validity exists in our dataset used for training the models. While we used a large dataset obtained from various sources, we cannot generalize our findings to industry or open-source solution using different features and classifiers. For testing these systems and promoting future research, our code and adversarial URL dataset are available on this link: https://bit.ly/2DjvZVP. (3) In this work, we have also tested two popular online tools, Google SafeBrowsing (GSB) [33] and VirusTotal [84] . Although, one may argue that these online services may work on the content, third-party and blacklist cues of the website instead of mere URL. Nevertheless, we have treated them as black-box intending to investigate the flexibility of these services to detect adversarial phishing URLs that are created by adding minor (character and word level) changes to known legitimate URLs.
In this study, we have generated adversarial URLs in an offline, large-scale and controlled environment; hence third-based, distance-based and content-based features are not perceivable for our generated URLs. Moreover, we limited our work to test only the traditional ML and DNN models. In future, we want to investigate MLPU systems trained over other features and classifiers. Specifically, it would be interesting to study the behaviour of online learning methods against evasion attacks to get a complete picture of the state-of-the-art MLPU system. Further, we envision to perform an empirical study to validate the human performance on detecting the generated adversarial URLs as it can help to investigate the user perspective on these URLs.