Home > Mobile >  How to check if a url is malicious within the code?
How to check if a url is malicious within the code?

Time:11-23

I would like to take a url input from a user, and serve that url to all other users in some context. I will show this url to users within my website as a link with a message of More Details. I am aware that when you point the cursor to the link, it shows the url and give or take it can be understood whether it is real or malicious, but 99.9% of the people won't think about such thing and will just click it right away.

So my question is, can I detect whether the inputted link is real or malicious, and if so how, and if not so, what can I do to at least improve the security to some extent? I am using frontend Reactjs , backend Nodejs, and multiple AWS Resources for data and API management.

CodePudding user response:

As far as I am aware, there's nothing specific that can be done on the AWS side to achieve this since this is specific to your backend implementation.

I am no expert on security, but maybe using VirusTotal API to check if a given URL is malicious? There are limits on the allowed number of requests. Also, as stated:

The public API is a free service, available for any website or application that is free to consumers. The API must not be used in commercial products or services

If you want to commercialize your service, you may get banned from using VirusTotal if you do not go with the paid route.

Maybe there are alternative solutions that are free for commercial use. But using such a service is your only route if you want to delegate URL security checks to a third-party service since AWS does not offer anything similar.

  • Related