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 > modules > How to use THC HostFortification
This article explains how to effectively make use of THC HostFortification.
author: Remco Kouw
created: 25-Apr-2024
updated: 17-Aug-2024

Introduction to THC HostFortification

This documentation provides a comprehensive guide to the functionality of the thc_hf module.

THC HostFortification is a versatile and configurable tool designed to identify potentially harmful server settings within your system. It performs pattern searches in server configuration files.

Interface Parameters

N/A

ModGlue Variables

  1. $_CONTEXT['thc_hf']['os_details']: (string) Raw string containing the operating system
  2. $_CONTEXT['thc_hf']['server_details']: (string) Raw string containing the server
  3. $_CONTEXT['thc_hf']['os']: (string) String containing the operating system (windows,linux...)
  4. $_CONTEXT['thc_hf']['server']: (string) String containing the operating system (apache,iis...)
  5. $_CONTEXT['thc_hf']['completed_successfully']: (boolean) If the value is true, results can be found in results
  6. $_CONTEXT['thc_hf']['platform']: (array) Settings containing all assessment files and possible server configuration file locations
  7. $_CONTEXT['thc_hf']['server_settings']: (array) Settings containing curent os and server assessment files and possible server configuration file locations
  8. $_CONTEXT['thc_hf']['files_found']: (array) Configuration file locations found
  9. $_CONTEXT['thc_hf']['files_required']: (integer) Amount of files required to run assessment
  10. $_CONTEXT['thc_hf']['results']: (array) Results of all security checks
  11. $_CONTEXT['thc_hf']['files_temp']: (string) Temporary file location to verify
  12. $_CONTEXT['thc_hf']['files_found_amount']: (integer) Amount of configuration file locations found
  13. $_CONTEXT['thc_hf']['configkey']: (string) Key to determine which assessment to run

Resource Settings

  • Time Limit: 0 (unlimited).
  • Memory Limit: PHP default.

Expanding THC HostFortification

You can increase the amount of patterns for OS and server detection. For this you need to create and edit files.
  1. servers.php: Contains the data file for each os and server combination. You can search through multiple configuration files if desired. In the code above this is the case for IIS. Two files are validated here, which are applicationHost.config and the web.config file.
    • validationfile: this is the file that contains the data that will be used to search for patterns, for each configuration file you need a different validation file
    • application_host_folder: this is an array containing all possible locations of the folder where the server configuration file could be found
    • application_host_filename: filename of the configuration file
    • xml: 0 if the application_host_filename file is in plain text, 1 if xml data is present
  2. determine.php: Determines the os and server. Note how the configkey is created, this will be used for acccessing the proper key in the assessment files in the plugins folder which will be discussed next.
  3. plugins/osserver.php: The first indice contains the description, the second is the pattern to search for. If the pattern isn't found or has a different setting than expected, this will be displayed as red text.

Dependencies

Proper permissions to access server configuration files.

Known Issues

N/A

Created by Remco Kouw: 2008-2024