cudeso / misp2sentinel

MISP to Sentinel integration
MIT License
58 stars 18 forks source link

Heavy slowdown when executing script #4

Closed Parasdeepkohli closed 1 year ago

Parasdeepkohli commented 1 year ago

Hi,

I was successfully able to configure the application on the same Ubuntu 18.04 server as my MISP instance. But when I try to push ~110k indicators to Microsoft Graph Security, the script always slows down halfway through.

For example, from 0 to ~50k indicators, the script takes 6-8 seconds per 100 indicators. But after that, it takes over 500 seconds per 100 indicators. Is there any way to diagnose the cause of this slowdown, and if so, can it be fixed?

cudeso commented 1 year ago

There are a couple of things to look into

Parasdeepkohli commented 1 year ago

Hi Cudesco,

Sorry for the late reply. Swamped with work and no time to do some testing. Okay, so I tried troubleshooting the first 3 points you mentioned and I observed the following:

Looks like I will have to check whether a gateway / proxy is causing rate limiting. While writing this comment, the script is trying to push it's largest batch of indicators yet: 360,000+. It has successfully processed about 170,000 of them and is chugging along at a speed of 100 indicators per 60 seconds. It started off nice and zippy at 1.5s though. Strange behavior. Will keep you posted!

cudeso commented 1 year ago

Can you check with the new Upload Indicators API? The integration takes into account the throttling set by Microsoft (100indicators/request; 100 requests per minute). Latest commits include the documentation and fixes.

cudeso commented 1 year ago

Closing, pending feedback