Lädt...


🔧 How to optimize BitNinja for weak servers


Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to

BitNinja needs about 1 GB of free RAM to run on a server. Read on to find out how to bypass this limitation. However, be warned — if you over-compress it, some BitNinja modules may reboot too often and others may run slower. This will affect the server's resistance to threats.

Limit memory consumption

You can limit memory consumption for some modules.

Malware Detection: antivirus. Scans files on the server to detect and quarantine malware. No manual configuration is needed — the antivirus databases are automatically updated daily. The antivirus program is developed by the vendor in-house without borrowing any solutions from other companies.

How to configure RAM consumption for the antivirus program:

  1. Open the Configuration tab.
  2. Select the Malware Detection module.
  3. Set the desired value in the Memory limit in the MB field.
  4. Save the changes by clicking the Save button at the top of the interface.

Image description

Shogun — this module accepts and passes incidents to the right places. For example, from captcha to IPfilter.

How to configure RAM consumption for the Shogun module:

  1. Open the Configuration tab.
  2. Select Advanced modules → Shogun.
  3. Set the desired value in the Memory Limit for this Module field. The minimum threshold is 300 MB, the recommended value is 600 MB.
  4. Save the changes by clicking the Save button at the top of the interface.

Image description

Certificate Miner is a component of the protection present on the HTTPS module. The miners collect information about SSL certificates for the protection used on the HTTPS module (SSL Termination) to operate correctly.

How to configure RAM consumption for Certificate Miner:

Image description

  1. Open the Configuration tab.
  2. Select Advanced modules → Certificate miner.
  3. Set the desired value in the Memory limit for Certificate Miner (MB) field. The minimum threshold is 100 MB.
  4. Save the changes by clicking the Save button at the top of the interface.

Using cloud AI scanning instead of an agent

BitNinja scans files using its own agent or AI. By default, cloud AI scanning is disabled. You can enable it to reduce the load on the server. The quality and speed by which infected files are found will remain the same as with the agent.

BitNinja will not scan files on the server but will send the MD5 hash files to a central server where they will be processed to find viruses.

How to enable cloud AI scanning:

Image description

  1. Open the Configuration tab.
  2. Click Malware Detection.
  3. Turn on the toggle switches to enable the AI scanner feature and enable or disable the AI active scanner feature.
  4. Save the changes by clicking the Save button at the top of the interface.

Limit CPU resources for the BitNinija agent

The server must support Cgroup for you to configure CPU resources, i.e., RAM. First, check whether the server supports Cgroup, find the necessary files, or create them.

Cgroup is a group of Linux processes where you can adjust the CPU load. A Cgroup can be v1 or v2. In v1, resource limits for a process are set in separate hierarchies for each resource class. It is usually used in older versions of Linux-based distributions. v2 implements a single hierarchy, simplifying the constraint structure for processes, and is used by default in newer distributions.

How to check whether the server supports Cgroup:

1.Execute this command in the console:

grep cgroup /proc/filesystems

2.Check the response — if the OS supports Cgroup, the response will contain this information:

nodev cgroup

Or

nodev cgroup2

If Cgroup is supported (Cgroup V1). Check whether the files cpu.cfs_period_us or cpu.cfs_quota_us exist. If not, they need to be created. We’ll get to that in the 3rd point.

How to find the files in different operating systems:

  • In Debian: go to the /sys/fs/cgroup directory and run ls /sys/fs/cgroup or search in the file manager.

  • In CentOs or Redhat: go to the /sys/fs/cgroup/cpu* directory and run ls /sys/fs/cgroup or search in the file manager.

If Cgroup2 (Cgroup V2) is supported. Check if the file cgroup.controllers exists. To do so, execute the cat /sys/fs/cgroup/cgroup.controllers command or find the file using a file manager.

The output from the command may look like this but it differs depending on the OS: cpuset cpu io memory hugetlb pids rdma

3.Create files if they do not exist:

  • Create a configuration file in the grub.d directory with the echo "GRUB_CMDLINE_LINUX=systemd.unified_cgroup_hierarchy=false" | sudo tee /etc/default/grub.d/cgroup.cfg command
  • Update the configuration file with the sudo update-grub command
  • Restart the server with the sudo reboot command

How to limit RAM resources for the BitNinja agent:

  1. Open the Configuration tab.
  2. Select Advanced modules → System.
  3. Find the Resource usage line and set a value from 60 to 100. The higher the value, the more resources are available for BitNinja. If you change the resource usage, the antivirus may work slower.
  4. Save the changes by clicking the Save button at the top of the interface.
  5. Check the BitNinja agent log in the file /var/log/bitninja/main.log . There should be no errors related to the cgroup value in the file.

Image description
According to the vendor, limiting CPU resources is safe for the server.

Which resources cannot be limited?

Modules for which RAM consumption cannot be changed:

  • WAF and HAproxy, which are used as a base on which the SSL-terminating module runs. If new connections take up a lot of resources to process but they are limited, the server may go down.

  • The internal BitNinja Dispatcher and BitNinja-mq modules, which are used to run the program. Their resources cannot be limited, because it may cause loss of settings or failure in incident handling.

In all other cases, if a module consumes more resources than the set limits, the module will stop working. Besides, if you specify low values in the settings, API requests to BitNinja may not work properly; the server may not respond to requests.

If you have any questions on how to optimize Bitninja, write to us at [email protected], we’re always ready to help.

This article was originally published on the ispmanager blog

...

🔧 How to optimize BitNinja for weak servers


📈 65.16 Punkte
🔧 Programmierung

🪟 Xbox and Palworld join hands to add dedicated servers, optimize the game


📈 19.97 Punkte
🪟 Windows Tipps

📰 DNS Servers | How to Secure DNS Servers from hacker attacks?


📈 15.6 Punkte
📰 IT Security Nachrichten

📰 DNS Servers | How to Secure DNS Servers from hacker attacks?


📈 15.6 Punkte
📰 IT Security Nachrichten

🔧 100 Days of Servers Distributions- Days 4 and 100 Day 4 Introduction to Web Servers


📈 15.6 Punkte
🔧 Programmierung

🔧 Turns servers into high-defense servers instantly by deploying Free WAF SafeLine


📈 15.6 Punkte
🔧 Programmierung

🐧 Squirrel Servers Manager new release (free / opensource) - Servers & containers management


📈 15.6 Punkte
🐧 Linux Tipps

🔧 Can computing servers and storage servers be merged?


📈 15.6 Punkte
🔧 Programmierung

🎥 It Took 3 Years to Take Down Servers #CobaltStrike #servers #cybercrime #infosecnews #podcastclips


📈 15.6 Punkte
🎥 IT Security Video

🐧 Squirrel Servers Manager now supports automations (free / opensource) - Servers & containers management


📈 15.6 Punkte
🐧 Linux Tipps

🔧 Squirrel Servers Manager (SSM)- A free, open-source project to manager all your servers


📈 15.6 Punkte
🔧 Programmierung

🕵️ A New Linux-based Botnet Targeting Vulnerabilities in Web Servers & Android Servers


📈 15.6 Punkte
🕵️ Hacking

📰 SSH Configuration on Nexpose Servers Allowed Weak Encryption Algorithms


📈 14.67 Punkte
📰 IT Security Nachrichten

📰 Chinese Cybercriminals Target High-Value Linux Servers With Weak Defenses: BlackBerry


📈 14.67 Punkte
📰 IT Security Nachrichten

📰 BlackBerry: Chinese cybercriminals target high-value Linux servers with weak defenses


📈 14.67 Punkte
📰 IT Security Nachrichten

🕵️ Ice Cold Apps Servers Ultimate 6.0.2(12) Network Services PHP Code Execution weak authentication


📈 14.67 Punkte
🕵️ Sicherheitslücken

📰 Large 'GoldBrute' RDP Botnet Hunts For Exposed Servers With Weak Passwords


📈 14.67 Punkte
📰 IT Security Nachrichten

🕵️ Hacker Compromised Several IoT Botnet C2 Servers and Taken Control Over Due to Weak Credentials


📈 14.67 Punkte
🕵️ Hacking

📰 Operation Prowli Profits On Weak IoT Devices, Servers


📈 14.67 Punkte
📰 IT Security Nachrichten

📰 4 ways 5G can optimize your work and personal life


📈 12.17 Punkte
📰 IT Nachrichten

🔧 Optimize Your Web3 DevOps with User Feedback Forms


📈 12.17 Punkte
🔧 Programmierung

🔧 A journey to optimize a SpringData SQL query with N+1s


📈 12.17 Punkte
🔧 Programmierung

🔧 Optimize React Components with useCallback()


📈 12.17 Punkte
🔧 Programmierung

🔧 Using Blockchain Tech to Optimize the Supply Chain


📈 12.17 Punkte
🔧 Programmierung

🔧 Kubernetes Namespace: How to Use It to Organize and Optimize Costs


📈 12.17 Punkte
🔧 Programmierung

🔧 Optimize for Android (Go edition): Lessons from Google apps - Part 1


📈 12.17 Punkte
🔧 Programmierung

matomo