DEV Community

sholm
sholm

Posted on

Basics of Bots

Intro

In this DEV post I will be covering the basics of internet bots.
From the difference of good to bad bots, but also the process they use to manipulate web applications for malicious purposes. Now of course to start we must discuss how these bots are made.

How Its Made

There are a variety of internet bots that each complete different tasks, a bot that searches through webpages for example is an essential part to keeping search engines working, but for every good bot there is a bad bot, like a key logger bot to steal passwords or a bot to send malicious traffic to a server. So what are the steps taken to create such code. Well there are three main components that a bot needs to do its respective job correctly.

  • App logic
    This is the code that the developer creates to tell the bot what to do when it comes across a specified situation, like a chatbot that recognizes user input and needs to send a message back.

  • Database
    This is where a collection of data for the bot is stored to know what actions to take or to store data that the bot will use later, for our chatbot example, storing data on Starwars if the user asks a Starwars related question, or keeping images of something to respond with if the user asks for say 'a picture of the millennium falcon'.

  • API
    An API solves a big problem for a lot of internet bots out there and that's external information. When a lot of functionality wants to be added to a bot like this, the best course of action is to use an API. this stores data that the developer doesn't have to create to add functionality like an amazon shopping list or YouTube search.

Now these components are the blueprint of a lot of internet bots out there but with the many use cases that bots can bring its hard to nail down one formula. especially with malicious bots, since %50 percent of all internet traffic are bots getting an accurate depiction of what percent of that is malicious is difficult, but we can still take a look at the key differences that make a good and malicious bot.

Good Vs Bad Bots

Since bots are just software that completes a specified task, there are a vast amount of internet bots being created all the time, with some people using these applications for illegal means that take advantage of the requests of a web application made to get sensitive information like credit card details, or Voice bots that attempt to bypass 2FA. Filtering out bad bot traffic to a web application is an extremely important task, with good and bad bots having similar functionality. The best approaches to the problem of bad bot traffic is to create a list that stores the information of the good bots to differentiate between the bad ones. Since good bots are usually upfront about there information and what they do, this is done with a simple .txt file that stores the name/data of what that bot is there for. but with the advent of AI malicious bots can be used just as effectively outside of web applications.

The Advent of AI

With AI being created and used more liberally throughout the internet the use of good but of course malicious bots have gotten more creative. From auto generated videos that get posted on YouTube in the thousands per month on a single channel, to the undetectability of cheating aimbot software that uses a third party camera to detect enemy players. The main reason that software like this has gotten so possible is because of how impossible from a technical standpoint it is to differentiate player to AI. Since bots are used for the automation of tasks good AI can be completely missed by an anti cheat or malicious bot txt file. With AI being such a new field in the access to the general public a solution for a counter measure hasn't been definitively decided yet.

Conclusion

The process of creating internet bots is a fairly easy task depending on the functionality of said bot. I hope this DEV post gave you a better idea of how to create a blueprint of that functionality and the importance of keeping bad bots away from your traffic. The sources I used are down below and I highly recommend them to continue of getting a brooder idea!

SOURCES THAT I USED AND YOU SHOULD TOO

How Is An Internet Bot Constructed
The Malicious Use of Artificial Intelligence
How To Manage Good Bots
What Is Bot Traffic

Top comments (1)

Collapse
 
ridaehamdani profile image
Ridae HAMDANI

I want to create a bot to responds to FAQ in my website but I do not know where to start any advice ?