I have a mobile application where users give advertise, other users view and accept it. Recently, I began to notice that bots started to give their own advertisements. I have moderators but there a so much advertisements that it is impossible to check everything (another challenge, is that bargain happens instantly, in realtime). It is classical REST API. I googled a lot and to my surprise can't find any open source solution that protects from illegal bot activities. How do you tackle such cases? Is it possible to eliminate it at all or I can only make their life more difficult taking some measures?
How to tackle bots in REST APIs
2.2k Views Asked by Olav At
2
There are 2 best solutions below
Related Questions in ANDROID
- Creating global Class holder
- Flutter + Dart: Editing name of a tab shows up a black screen
- android-pdf-viewer Received status code 401 from server: Unauthorized
- Sdk 34 WRITE_EXTERNAL_STORAGE not working
- ussd reader in Recket Native module
- Incorrect display of LinearGradientBrush in IOS
- The Binary Version Of its metadata is 1.8.0, expected Version is 1.6.0 build error
- I can't make TextInput to auto expand properly in Android
- Creating multiple instances of a class with different initializing values in Flutter
- How to create a lottie animation
- making android analyze with coverity sast tool
- Flutter plugin development android src not opening after opening example
- I initialize my ViewModel in the Activity with several fragments as tabs, but the fragments(tabs) return null for the updated livedata
- Node.js Server + Socket.IO + Android Mobile Applicatoin XHR Polling Error...?
- How I can use the shared preferences class?
Related Questions in IOS
- URLSession requesting JSON array from server not working
- Incorrect display of LinearGradientBrush in IOS
- Module not found when building flutter app for IOS
- How to share metadata of an audio url file to a WhatsApp conversation with friends
- Occasional crash at NSURLSessionDataTask dataTaskWithRequest:completionHandler:
- Expo Deep linking on iOS is not working (because of Google sign-in?)
- On iOS, the keyboard does not offer a 6-character SMS code
- Hi, there is an error happened when I build my flutter app, after I'm installing firebase packages occurs that error
- The copy/paste functionalities don't work only on iOS in the Flutter app
- Hide LiveActivityIntent Button from Shortcuts App
- While Running Github Actions Pipeline: No Signing Certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID
- Actionable notification api call not working in background
- Accessibility : Full keyboard access with scroll view in swiftui
- There is a problem with the request entity - You are not allowed to create 'iOS' profile with App ID 'XXXX'
- I am getting "binding has not yet been initialized" error when trying to connect firebase with flutter
Related Questions in BOTS
- Bot.load_Extension is returning this error for disnake and discord.py library both
- Download files (spec. images) with telegram bot (python-telegram-bot)
- "If" condition with numbers doesnt working
- Deploying telegram bot
- Function call Reverts from Smart Contract without a reason unniswap V3
- Pyrogram: telegram API returns 400: INPUT_FILTER_INVALID after search_messages() request
- Java music bot not playing music
- JDA Lavaplayer bot doesn't work without changing .jar file
- How can a bot find out that a reaction emoji was left in a Telegram channel post? telebot python
- Telegram Bot "START" Button issue on history clean up on iOS devices
- how do i communicate 2 bots in webot using emitter and reciever i need creative idea to implement a specified motion
- Discord bot can't send messages from the server but sends messages from dm
- how to edit a message by id using telegraf.js
- issue with Twitter API :
- i need help making a reaction time test bot to impress my friends XD. for the website https://skoonova.com/tests/reactiontime
Related Questions in MOBILE-SECURITY
- Where can I securely store audio in flutter so that I can use it again later?
- Trying to call different class's variable but java reflection does not work
- Android : Failed to attach: unable to connect to remote frida-server: closed
- Prevent/disable 3rd party keyboards for WkWebView web views
- Frida: Change value of method calling enum
- Publish the APK in Google play store with "V4" signature
- In flutter, which is more secure using platform functions/ dependency or dart dependency?
- How to secure captured or downloaded media files in react native application
- Can we retrieve the iphone user pass code on a jailbroken device?
- Why does Apple recommend to store passwords, secrets, and keys in iOS Keychain when apps are sandboxed?
- Risks in shortcutting OAuth/OIDC?
- Android App Root detection method was bypassed by focusing specifically on the rootbeer library being used
- What would happen if my iOS distribution certificate is compromised?
- Pdf report issue on mobSF
- How to tackle bots in REST APIs
Related Questions in API-SECURITY
- Swashbuckle/Swagger UI - Adding security definition for APIkey
- API resource security with Asgardeo scope in Ballerina
- Client side securing token vulnerability circular dilemma
- Enhance the security of ASP.NET Core Web API unauthorized get endpoint
- How to perform validation before decoding the raw JSON?
- Multiple HTTPS security schemes for different endpoints in the same API?
- Managing remotely-generated API keys with Ansible
- Confirm API is called by known application
- Preventing to send requests from different devices
- Server / X-Powered-By headers not available in runtime
- How to protect my RESR Api calls in Flutter?
- SubscriptionKeyInvalid in Azure API Management for an endpoint in a product that does not require subscription?
- How to encrypt and decrypt all API trequest and response in SAP hybris?
- Stripe Data Security
- Should rest APIs with insensitive data be protected
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
OPEN SOURCE BOT DETECTION
If you search Github for
bot detectionyou will land on this page https://github.com/topics/bot-detection?q=bot+detection&unscoped_q=bot+detection, that at this moment contains 7 results, that aren't very relevant, but if you remove the query string, and use https://github.com/topics/bot-detection you get 36 results, where some may be relevant depending on your backend language. You can also search using the termsbrowser detection,crawler detection,device detection, etc.Some of this repos rely on the
user-agentand/or in the IP address to detect the bot, and this approach is easily bypassed, because theuser-agentheader is easy to spoof and nowadays the attackers are using bot farms to rotate the ips, thus making it very hard to block them.But should you use one of this repos? Why not, it's one more layer of defense, and at least you block the less sophisticated bots that don't run from a bot farm.
The Difference Between WHO and WHAT is Accessing the API Server
Before we dive in how you can tackle the problem I want to first clear a misconception that is usual among developers of any seniority level, the difference between Who vs What is accessing the API server.
I recommend you to read the article Why Does Your Mobile App Need An Api Key? where I go in detail about the difference between Who and What is accessing your API server, but for your convenience I will extract here the main takes from it:
So I want you to think about the Who as the user your API server will be able to Authenticate and Authorize access to the data, and think about the What as the software making that request in behalf of the user, that in your case are the bots.
THE API SERVER DEFENSES
You can make the life of an attacker harder by applying defense in depth, by adding as many layers of defense as you can afford, and is required by law for your use case.
WAF - Web Application Firewall:
The effectiveness, against APIs is weak, because it was designed more specifically for web apps that don't rely on API's, but still able to offer some degree of protection.
UBA - User Behavior Analytics:
A good example of a UBA solution is Recaptcha by Google, specially the reCAPTCHA V3:
When you use recaptcha V3 in a mobile app your API server can then verify the score for that request, but bear in mind that it only makes it more difficult to bypass, because if you search Google for bypass recaptcha V3 you will see a lot of solutions being offered as a service for attackers.
Lock the API server to the mobile app
It's possible for the API server to have a high degree of confidence that the request is indeed from your mobile app, and not from a bot by using the Mobile App Attestation concept, and I invite you to read my reply to the question How to secure an API REST for mobile app?, specifically the section A Possible Better Solution.
DO YOU WANT TO GO THE EXTRA MILE?
In any response to a security question I always like to reference the amazing work from the OWASP foundation.
For Mobile Apps
OWASP Mobile Security Project - Top 10 risks
OWASP - Mobile Security Testing Guide:
For APIS
OWASP API Security Top 10