Carnivore - Predator
Formerly known as THC HackSuite, Carnivore - Predator stands at the forefront of cutting-edge cybersecurity tools, redefining the landscape of penetration testing with unparalleled innovation. Designed to empower ethical hackers, security professionals, and enthusiasts alike, Carnivore - Predator is the ultimate Pentest CMS that puts you in command.
current version: 0.7.0 - PREDATOR
home > documentation > tools > Maintenance Scan
In this article the maintenance scan tool will be discussed.
author: Remco Kouw
created: 16-Jun-2024
updated: 16-Jun-2024

Maintenance Scan Tool

In this documentation we will go through the functionality of the maintenance scan tool.

This tool is mostly used to detect anomalies in your Carnivore environment. There are a total of 10 options that you can enable or disable.

The scan always takes place on the index page of Carnivore and its outcome depends on the amount of features you have enabled on this configuration page.

  1. enable or disable maintenance scans: enable or disable maintenance scans on the index page
  2. filesize scan: scan for files that exceed a specified amount of size
  3. maximum filesize of data files in KB: allowed file size of data files in KB, note that you will only be notified when the file exceeds this size
  4. analyzes logfiles: find anomalies in log files
  5. checks if all required functions are there: searches the Functions folder and checks whether all necessary functions are present
  6. count the files in specific folders: make sure the amount of files doesn't exceed a certain number
  7. maximum files in dir before reporting: maximum amount of files in folders allowed, note that you will only be notified if this amount is exceeded
  8. global interval between a maintenance scan: minimum amount of seconds before another maintenance scan
  9. check for outdated apps and modules: searches for addons that ae no longer supported or have become obsolete
  10. spider keywords in files: this is the latest feature for Carnivore allowing you to add keywords to tools, apps and modules so you can find specific options through the new search tool

Expanding Maintenance Scan:

It's easy to create new features for the maintenance scanner. You can even execute modules if you want. By default there's an option for thc_ae and thc_xm modules in the maintenance scan.

The maintenance scanner requires four files to be created or edited and four more that are optional:

  1. Data/scan_types.php: contains properties for each scan option
  2. Includes/cc_xxx.php: these types of include files starting with cc_ are each responsible for a specific kind of action, cc stands for control center
  3. maintenance.php: control center index
  4. vars.php: settings for maintenance scan

As an example we will look how the filesize checker is integrated into Carnivore's control center:

In order to have maintenance scans take place the variable $_CONTEXT['allow_maintenance_scan'] in vars.php has to be set to true. The highlighted variable in the image is responsible for the file size check we're interested in right now. As you can see the option is on. If you want to add a new feature you will have to set it here in this file. In final releases you will also have to add the variable to the involved.php file that is used for resetting the environment. More on this can be found in this article.

  • [0]: key used for _GET requests to execute the proper action
  • label: basically the name of the action
  • file: name of the cc file in the Includes folder
  • enable_var: variable that tells whether to include this option during a scan, these can be found in the vars.php file
  • output_var: variable that will hold the output, in this example the variable $_CONTEXT['scandata']['filesizecheck'] will hold the output
  • error_notice: error when the option isn't enabled

This is the corresponding cc_filesize_check.php file which you can find in the Carnivore's Includes folder. As you can see basically you need the enable_var(allow_filesize_scan) and the output_var(filesizecheck). As always easiest is to just copy one of the cc files and then edit it to suit your needs.

Lastly you should also add a link to maintenance.php in Carnivore's root folder. In the link add a query ?type=x where the x is the key from the array used in the scan data file.

But wait, there's more. Some files are optional, but in some cases they are mandatory. If you want to be able to change the settings of a new feature you created or be able to process results, you need extra work. There are four files involved in this task. There's two javascript files and two json based php files you might need to edit.

  1. JSON/maintenance_run.php: used to take actions on generated results after a task was completed, such as deleting files
  2. JSON/maintenance_scan.php: handler for changing settings from the configuration form, this changes settings in the vars.php file
  3. Templates/[current_template]/js/maintenance_run.js: when clicked on a result link a json request will be send to the maintenance_run.php file
  4. Templates/[current_template]/js/maintenance_scan.js: generates a change settings form depending on the scan feature you selected

Known Issues:

N/A

Created by Remco Kouw: 2008-2024