IP Library Granted Patent US 12,438,912
Granted Patent B2
US 12,438,912 · App. 18/660,104 · Granted Oct 7, 2025

Phishing URL detection using transformers

Inventors: Jack Wilson Stokes, III (North Bend, WA); Pranav Ravindra Maneriker (Columbus, OH); Arunkumar Gururajan (Sammamish, WA); Diana Anca Carutasu (Bellevue, WA); Edir Vinicio Garcia Lazo (Seattle, WA)
Assignee: Microsoft Technology Licensing, LLC
H04L63/1483G06F40/284G06N3/045G06N3/08
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,438,912
App. No.
18/660,104
Granted
Oct 7, 2025
Kind
B2
Abstract

The technology described herein can identify phishing URLs using transformers. The technology tokenizes useful features from the subject URL. The useful features can include the text of the URL and other data associated with the URL, such as certificate data for the subject URL, a referrer URL, an IP address, etc. The technology may build a joint Byte Pair Encoding for the features. The token encoding may be processed through a transformer, resulting in a transformer output. The transformer output, which may be described as a token embedding, may be input to a classifier to determine whether the URL is a phishing URL. Additional or improved URL training data may be generated by permuting token order, by simulating a homoglyph attack, and by simulating a compound word attack.

Claims (37)

1. One or more computer storage media having computer-executable instructions embodied thereon that, when executed, by one or more processors, causes the one or more processors to perform a method comprising:

generating a set of Uniform Resource Locator (URL) tokens based on a URL;

generating a set of metadata tokens based on metadata associated with the URL;

generating a set of feature tokens based on the set of URL tokens, the set of metadata tokens, and a set of separator tokens by at least concatenating the set of URL tokens and the set of metadata tokens into the set of feature tokens including a first separator token from the set of separator tokens between a first metadata token of the set of metadata tokens and a second metadata token, wherein the first separator token indicates a type of metadata associated with the second metadata token;

providing the set of feature tokens as a single input vector to a transformer model;

obtaining an output of the transformer model including an embedding vector;

determining a decision statistic based on the embedding vector; and

as a result of the decision statistic indicating the URL is malicious, causing a remedial action to be performed, where the remedial action prevents a computing device from accessing the URL.

2. The media of claim 1 , wherein the set of feature tokens comprises a token string for a subject of the URL, a token string for source context data associated with the URL, a token string for a referring URL, a token string for destination context data, associated with the URL a token string for certificate context associated with the URL, and a token string for IP address associated with the URL separated using the separator tokens of the set of separator tokens.

3. The media of claim 1 , the first metadata token and the second metadata token are associated with different types of metadata.

4. The media of claim 1 , wherein the transformer model is trained using adversarial training to augment a training dataset.

5. The media of claim 1 , wherein the remedial action further comprises preventing the computing device from accessing the URL by at least redirecting the computing device to a second URL.

6. The media of claim 1 , wherein determining the decision statistic based on the embedding vector further comprises adding weight values to the output of the transformer model.

7. The media of claim 1 , wherein providing the set of feature tokens as the input to the transformer model further comprises generating a set of token encodings based on the set of feature tokens, the set of token encodings including word tokens and corresponding positions.

8. A method for comprising:

generating a set of feature tokens based on a set of Uniform Resource Locator (URL) tokens based on a URL, a set of metadata tokens based on metadata associated with the URL, and a set of separator tokens, wherein the set of feature tokens includes a first separator token between a first URL token and a first metadata token, where the first separator token indicates a type associated with the first metadata token;

providing the set of feature tokens as a single input vector to a transformer model;

obtaining an output of the transformer model; and

based on the output causing a remedial action to be performed, wherein the remedial action mitigates a risk associated with the URL.

9. The method of claim 8 , wherein generating the set of feature tokens further comprises including separator tokens of the set of separator tokens between URL tokens of the set of URL tokens and metadata tokens of the set of metadata tokens.

10. The method of claim 9 , wherein generating the set of feature tokens further comprises including the separator tokens of the set of separator tokens between the metadata tokens of the set of metadata tokens.

11. The method of claim 10 , wherein each separator token of the set of separator tokens indicates a different type of metadata associated within the metadata tokens that follows each separator token.

12. The method of claim 11 , wherein the first separator token indicates a referral URL and a second separator token of the set of separator tokens indicates a certificate authority.

13. The method of claim 8 , wherein the transformer model is a bidirectional encoder representation trained with URL training data.

14. The method of claim 8 , wherein providing the set of feature tokens as the single input vector to the transformer model further comprises generating a token encoding using a Byte Pair Encoding (BPE) model.

15. The method of claim 8 , comprising preventing a computing device from accessing the URL.

16. A system comprising:

one or more hardware processors; and

one or more computer-readable media having executable instructions embodied thereon, which, when executed by the one or more hardware processors, cause the one or more hardware processors to execute actions comprising:

generating a feature token encoding based on a set of Uniform Resource Locator (URL) tokens extracted from a URL, a set of metadata tokens extracted from metadata associated with the URL, and including a set of separator tokens between tokens of the feature token encoding, where separator tokens of the set of separator tokens indicate types of metadata that follow the separator tokens;

causing a transformer model to perform inferencing by at least providing as a single input vector to the transformer model the feature token encoding;

obtaining an output of the transformer model indicating a score associated with the URL; and

based on the score indicating the URL is malicious, causing a remedial action to be performed, where the remedial action limits access to the URL.

17. The system of claim 16 , wherein the actions further comprise determining the score by at least applying a set of weights to values included in an embedding vector including the output.

18. The system of claim 17 , wherein the transformer model is a bidirectional encoder representation.

19. The system of claim 16 , wherein the score is determined with a machine classifier comprising a single fully connected layer.

20. The system of claim 16 , wherein the feature token encoding includes at least one of: a token representing a subject of the URL, a token representing source metadata associated with the URL, a token representing a referring URL, a token representing destination metadata, a token representing a certificate authority, and a token representing an IP address associated with the URL.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 11, 2024
From: GARCIA LAZO, EDIR VINICIO; MANERIKER, PRANAV RAVINDRA; GURURAJAN, ARUNKUMAR; CARUTASU, DIANA ANCA; STOKES, JACK W., III
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 067960/0800 →
Continuity (3)
Continuation 17246352 · Apr 30, 2021
Provisional Application 63155157 · Mar 1, 2021
Related Publication 20240297900A1 · Sep 5, 2024
References Cited (55)
US 11093816B2 · Lu · 2021 [cited by applicant]
US 11762990B2 · Gururajan et al. · 2023 [cited by applicant]
US 12003535B2 · Stokes, III et al. · 2024 [cited by applicant]
US 20120158626A1 · Zhu · 2012 [cited by examiner]
US 20140033307A1 · Schmidtler · 2014 [cited by examiner]
US 20150032449A1 · Kingsbury et al. · 2015 [cited by applicant]
US 20150254566A1 · Chandramouli · 2015 [cited by examiner]
US 20160344770A1 · Verma · 2016 [cited by examiner]
US 20170046616A1 · Socher et al. · 2017 [cited by applicant]
US 20170147682A1 · Alaqeeli · 2017 [cited by applicant]
US 20170359368A1 · Hodgman · 2017 [cited by examiner]
US 20170372071A1 · Saxe · 2017 [cited by applicant]
US 20180075338A1 · Gokmen · 2018 [cited by applicant]
US 20180077120A1 · Baughman · 2018 [cited by applicant]
US 20180268023A1 · Korpusik et al. · 2018 [cited by applicant]
US 20180349477A1 · Jaech et al. · 2018 [cited by applicant]
US 20190171934A1 · Sites · 2019 [cited by examiner]
US 20190278909A1 · Saxe · 2019 [cited by examiner]
US 20190349399A1 · Liu · 2019 [cited by examiner]
US 20200067861A1 · Leddy · 2020 [cited by examiner]
US 20200314122A1 · Jones · 2020 [cited by examiner]
US 20200364338A1 · Ducau · 2020 [cited by examiner]
US 20200366712A1 · Onut · 2020 [cited by examiner]
US 20210165960A1 · Eisenschlos · 2021 [cited by examiner]
US 20210183484A1 · Shaib · 2021 [cited by applicant]
US 20210203692A1 · Nunes · 2021 [cited by examiner]
US 20210218754A1 · Zou · 2021 [cited by examiner]
US 20210234892A1 · Narayanaswamy · 2021 [cited by examiner]
US 20210390127A1 · Fox · 2021 [cited by applicant]
US 20220004642A1 · Pujar · 2022 [cited by examiner]
US 20220046057A1 · Kutt et al. · 2022 [cited by applicant]
US 20220121984A1 · Gupta · 2022 [cited by examiner]
US 20220129630A1 · Costa · 2022 [cited by examiner]
US 20220171943A1 · Keskar · 2022 [cited by examiner]
US 20220277141A1 · Nijkamp · 2022 [cited by examiner]
US 20230385409A1 · Gururajan · 2023 [cited by applicant]
US 20240171610A1 · Jones · 2024 [cited by applicant]
CN 110866117A · 2020 [cited by applicant]
EP 3716574A1 · 2020 [cited by examiner]
“Jacob Devlin, Ming-Wei Chang, Kenton Lee, Kristina Toutanova”, “BERT: Pre-Training of Deep Bidirectional Transformers for Language Understanding” May 24, 2019 (Year: 2019). [cited by examiner]
“Younghoo Lee”, “CATBERT: Context-Aware Tiny Bert for Detecting Social Engineering Emails” (Year: 2020). [cited by examiner]
Brown, et al., “Language Models are Few-Shot Learners”, In Repository of arXiv:2005.14165v4, Jul. 22, 2020, pp. 1-75. [cited by applicant]
Communication 71(3) Received for European Application No. 21723471.5, mailed on Jul. 4, 2024, 8 pages. [cited by applicant]
Hendler, et al., “AMSI-Based Detection of Malicious PowerShell Code Using Contextual Embeddings”, arXiv:1905.09538v2, Sep. 19, 2019, pp. 1-17. [cited by applicant]
Huang, et al., “Phishing URL Detection via CNN and Attention-Based Hierarchical RNN”, 18th IEEE International Conference on Trust, Security and Privacy in Computing and Communications/13th IEEE International Conference … [cited by applicant]
Non-Final Office Action mailed on Jun. 4, 2024, in U.S. Appl. No. 18/233,657, 26 pages. [cited by applicant]
Decision to grant a European patent pursuant to Article 97(1) Received for European Application No. 21723471.5, mailed on Oct. 17, 2024, 02 pages. [cited by applicant]
Final Office Action mailed on Sep. 16, 2024, in U.S. Appl. No. 18/233,657, 30 pages. [cited by applicant]
Le, et al., “ReST-Net: Diverse Activation Modules and Parallel Subnets-Based CNN for Spatial Image Steganalysis”, IEEE Signal Processing Letters, vol. 25, Issue No. 05Retrieved from the Internet URL:-https://ieeexplore.… [cited by applicant]
U.S. Appl. No. 63/006,482, filed Apr. 7, 2020. [cited by applicant]
U.S. Appl. No. 63/155,157, filed Mar. 1, 2021. [cited by applicant]
Notice of Allowance mailed on Mar. 12, 2025, in U.S. Appl. No. 18/233,657, 9 Pages. [cited by applicant]
First Examination Report Received for Indian Application No. 202217056573, mailed on Jun. 3, 2025, 9 pages. [cited by applicant]
Huang, et al., “Research on extraction model of malicious domain corpus based on context semantics”, Computer Engineering and Applications, Issue 09, Aug. 29, 2017, 20 pages. [cited by applicant]
Office Action Received for Chinese Application No. 202180026164.X, mailed on Jul. 30, 2025, 11 pages. (English Translation Provided). [cited by applicant]