šŸŽ£Phishing Sites Predictor Using ___________FastAPI____________

Tarun Tiwari
2 min readJul 25, 2020

--

(Deployment and Hosting a Machine Learning šŸ¤– Model Using FastAP)

Hello Folks šŸ™Œ,
A few weeks ago, I had this idea about what if we could detect a Phishing URL or a non-Phishing URL using some machine learning algorithm. There has been some research done on the topic so I thought that I should give it a go and implement something from scratch.
The first task was gathering data. I did some surfing and found some websites offering malicious links. I collected data from different-different sites and create this dataset.
You can see dataset from my Kaggle Profile here
In this article, Iā€™m only gonna show my Phishing sites prediction work, donā€™t worry you can see my notebook on Kaggle here

So letā€™s start with ā€¦

What is a phishing attack?

Phishing is a type of social engineering attack often used to steal user data, including login credentials and credit card numbers. It occurs when an attacker, masquerading as a trusted entity, dupes a victim into opening an email, instant message, or text message.

Phishing attack examples

A spoofed email ostensibly from myuniversity.edu is mass-distributed to as many faculty members as possible. The email claims that the userā€™s password is about to expire. Instructions are given to go to myuniversity.edu/renewal to renew their password within 24 hours.

Several things can occur by clicking the link. For example:

  1. The user is redirected to myuniversity.edurenewal.com, a bogus page appearing exactly like the real renewal page, where both new and existing passwords are requested. The attacker, monitoring the page, hijacks the original password to gain access to secured areas on the university network.

    2. The user is sent to the actual password renewal page. However, while being redirected, a malicious script activates in the background to hijack the userā€™s session cookie. This results in a reflected XSS attack, giving the perpetrator privileged access to the university network.

Now show you Phishing Sites Model Prediction using FastAPI

1)Prediction of Good URLā€™s

In this picture, I'm giving a good URL and my model is perfectly predicting ā€˜ā€™This is not a Phishing Siteā€

2) Prediction of Bad URLā€™s

In this picture, Iā€™m giving a Bad URL and my model is perfectly predicting ā€˜ā€™This is a Phishing Siteā€

For Complete Project visit my Github here

Interested isnā€™t it?

With the help of Machine learning and a good dataset, we can create such s great machine learning model like this. Thank YoušŸ™.

If you like my hard work, Please share this šŸ˜ƒ.

--

--