{"id":14782,"date":"2022-11-10T22:58:47","date_gmt":"2022-11-10T19:58:47","guid":{"rendered":"https:\/\/kifarunix.com\/?p=14782"},"modified":"2024-03-09T23:16:35","modified_gmt":"2024-03-09T20:16:35","slug":"how-to-enable-and-configure-cortex-analyzers","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/how-to-enable-and-configure-cortex-analyzers\/","title":{"rendered":"How to Easily Enable and Configure Cortex Analyzers"},"content":{"rendered":"\n
Follow through this tutorial to learn how to enable and configure Cortex Analyzers. Cortex<\/a> is an opensource software created by TheHive that can be used by IT security personnel to manually or automatically (through Cortex REST APIs) analyze event\/incident observables and IOCs such as IP addresses, file, hashes, domain names, URLs, email addresses e.t.c. Analyzers allow analysts and security researchers to analyze such observables and IOCs at scale.<\/p>\n\n\n\n You can check our previous guide on how to install Cortex on Ubuntu;<\/p>\n\n\n\n Install Cortex on Ubuntu 22.04\/Ubuntu 20.04<\/a><\/p>\n\n\n\n Cortex ships with the support of various analyzers. Some that are free to use, some that requires special access or valid subscription or product license.<\/p>\n\n\n\n In this guide, we will just see how to enable and configure some of the analyzers to get you started.<\/p>\n\n\n\n To get started, login to Cortex as a specific organization admin for you to be able to access, enable and configure your organization analyzers.<\/p>\n\n\n\n Note that for you to create an organization and organization administrative user, you need to login as super-admin<\/strong> first.<\/p>\n\n\n\n The check the guide below on how to create an organization and admin user for that account;<\/p>\n\n\n\n Next, Create Cortex Organization and Organization administrator<\/a><\/p>\n\n\n\n You can view available analyzers by navigating to Organization > Analyzers<\/strong>.<\/p>\n\n\n\n From the above, you can see we have 217 available analyzers.<\/p>\n\n\n\n By default, Cortex is configured to get the list of analyzers from We will however install and host our analyzers on the Cortex server.<\/p>\n\n\n\n Hence, install required packages.<\/p>\n\n\n\n Note that you will need both Python 2 and Python 3 for compatibility of different analyzers.<\/p>\n\n\n\n Next, install Python setuptools;<\/p>\n\n\n\n Clone the Cortex-analyzers repository in the directory of your preferred directory;<\/p>\n\n\n\n Install Python requirements of each analyzer thereafter;<\/p>\n\n\n\n We will now our analyzers on our custom directory, They might be less than those you can obtain from the Now that you have locally installed Analyzers, configure Cortex to use these local analyzers.<\/p>\n\n\n\n Thus, change the urls from To something like;<\/p>\n\n\n\n Save and exit the file;<\/p>\n\n\n\n Restart Cortex;<\/p>\n\n\n\n You can tail the logs immediately to see if Cortex has found the new Analyzer worker list;<\/p>\n\n\n\n From the list of available analyzers above, you can see that none of the analyzer is enabled by default.<\/p>\n\n\n\n Some Analyzers requires some configurations such as API keys to be able to use them while some are just available for use out of the box without any further configuration.<\/p>\n\n\n\n You can get the requirements of each Analyzer on Cortex Analyzers page<\/a>.<\/p>\n\n\n\n As an example, let’s see how to enable AbuseIPDB Analyzer. Thus, from the Organization Analyzers, click +Enable<\/strong> against the analyzer;<\/p>\n\n\n\n The analyzer configuration pops up!<\/p>\n\n\n\n As you can see, you need an API key from AbuseIPDB<\/a> in order to be able to utilize this analyzer.<\/p>\n\n\n\n Thus, create an account on AbuseIPDB<\/a> (it has different plans from Free to Enterprise plans). Choose your subscription plan accordingly.<\/p>\n\n\n\n Once you have an account;<\/p>\n\n\n\n Copy the API key and paste it under the AbuseIPDB analyzer key configuration.<\/p>\n\n\n\n Once you paste the key, click Save.<\/p>\n\n\n\n The analyzer should now be showing like in the screenshot below;<\/p>\n\n\n\n You can enable other Cortex analyzers in the same way.<\/p>\n\n\n\n Once you enable an analyzer, click Analyzers menu at the top. You will now see enabled analyzers ready to do the analysis.<\/p>\n\n\n\n Each analyzer will show what observables it applies to. For example, AbuseIPDB is used to analyze IP addresses, domain names or network subnets for any abuse.<\/p>\n\n\n\n When you click on the > Run<\/strong> button, a wizard that let’s you enter the IP address or domain name to manually analyze pops up.<\/p>\n\n\n\n Similarly, you can click +New analysis<\/strong> to start a new analysis.<\/p>\n\n\n Click Start to analyze IP\/domain in question.<\/p>\n\n\n\n You analysis job should now run and be completed in a short while;<\/p>\n\n\n\n Click View<\/strong> to check the analysis report;<\/p>\n\n\n\nHow to Enable and Configure Cortex Analyzers<\/h2>\n\n\n\n
\n
\n
\n
\n
Login to Cortex as an Organization Admin<\/h3>\n\n\n\n
<\/figure>\n\n\n\n
Install and Host Cortex Analyzers Locally on the Host<\/h3>\n\n\n\n
<\/figure>\n\n\n\n
https:\/\/download.thehive-project.org\/analyzers.json<\/code><\/strong>;<\/p>\n\n\n\n
sudo vim \/etc\/cortex\/application.conf<\/code><\/pre>\n\n\n\n
## ANALYZERS\n#\nanalyzer {\n # analyzer location\n # url can be point to:\n # - directory where analyzers are installed\n # - json file containing the list of analyzer descriptions\n urls = [\n \"https:\/\/download.thehive-project.org\/analyzers.json\"\n<\/strong> #\"\/absolute\/path\/of\/analyzers\"\n ]\n\n # Sane defaults. Do not change unless you know what you are doing.\n fork-join-executor {\n # Min number of threads available for analysis.\n parallelism-min = 2\n # Parallelism (threads) ... ceil(available processors * factor).\n parallelism-factor = 2.0\n # Max number of threads available for analysis.\n parallelism-max = 4\n }\n}\n<\/code><\/pre>\n\n\n\n
sudo apt install -y --no-install-recommends python2.7-dev python3-pip \\\npython3-dev ssdeep libfuzzy-dev libfuzzy2 libimage-exiftool-perl libmagic1 \\\npython3-testresources build-essential git libssl-dev<\/code><\/pre>\n\n\n\n
sudo pip3 install -U pip setuptools<\/code><\/pre>\n\n\n\n
sudo pip install -U pip setuptools<\/code><\/pre>\n\n\n\n
sudo git clone https:\/\/github.com\/TheHive-Project\/Cortex-Analyzers \/opt\/cortex\/analyzers-responders<\/code><\/pre>\n\n\n\n
for i in `find \/opt\/cortex\/analyzers-responders -name 'requirements.txt'`; do sudo -H pip install -r $i; done && \\\nfor i in `find \/opt\/cortex\/analyzers-responders -name 'requirements.txt'`; do sudo -H pip3 install -r $i || true; done<\/code><\/pre>\n\n\n\n
\/opt\/cortex\/analyzers-responders\/analyzers\/<\/strong><\/code>.<\/p>\n\n\n\n
ls \/opt\/cortex\/analyzers-responders\/analyzers\/<\/code><\/pre>\n\n\n\n
AbuseIPDB Crowdsec EchoTrail GreyNoise KasperskyTIP NSRL Robtex TeamCymruMHR Verifalia\nAbuse_Finder Crtsh Elasticsearch HIBP LastInfoSec Nessus SEKOIAIntelligenceCenter ThreatGrid VirusTotal\nAnyRun CuckooSandbox EmailRep Hashdd LdapQuery OTXQuery SecurityTrails ThreatMiner Virusshare\nAutofocus CyberChef EmergingThreats Hippocampe MISP Onyphe SentinelOne ThreatResponse Vulners\nBackscatterIO CyberCrime-Tracker EmlParser Hunterio MISPWarningLists OpenCTI Shodan Threatcrowd WOT\nBitcoinAbuse Cyberprotect FalconSandbox HybridAnalysis Malpedia PaloAltoWildFire SinkDB Thunderstorm Yara\nC1fApp Cylance FileInfo IBMXForce Maltiverse PassiveTotal SoltraEdge TorBlutmagie Yeti\nCERTatPassiveDNS DNSDB FireEyeiSight IP-API MalwareBazaar Patrowl SophosIntelix TorProject Zscaler\nCIRCLHashlookup DNSLookingglass FireHOLBlocklists IPVoid MalwareClustering PayloadSecurity SpamAssassin Triage\nCIRCLPassiveDNS DNSSinkhole ForcepointWebsensePing IPinfo Malwares PhishTank SpamhausDBL URLhaus\nCIRCLPassiveSSL DShield Fortiguard IVRE MaxMind PhishingInitiative Splunk Umbrella\nCISMCAP Diario GRR Inoitsu MetaDefender ProofPoint StamusNetworks UnshortenLink\nCensys DomainMailSPFDMARC GoogleDNS IntezerCommunity MnemonicPDNS Pulsedive StaxxSearch Urlscan.io\nCheckPhish DomainTools GoogleSafebrowsing Investigate MsgParser RecordedFuture StopForumSpam VMRay\nClamAV DomainToolsIris GoogleVisionAPI JoeSandbox NERD RiskIQ TalosReputation Valhalla\n<\/code><\/pre>\n\n\n\n
https:\/\/download.thehive-project.org\/analyzers.json<\/code><\/strong>.<\/p>\n\n\n\n
https:\/\/download.thehive-project.org\/analyzers.json<\/code><\/strong> to the local file system path containing Analyzers;<\/p>\n\n\n\n
sudo vim \/etc\/cortex\/application.conf<\/code><\/pre>\n\n\n\n
analyzer {\n # analyzer location\n # url can be point to:\n # - directory where analyzers are installed\n # - json file containing the list of analyzer descriptions\n urls = [\n \"https:\/\/download.thehive-project.org\/analyzers.json\"<\/strong>\n #\"\/absolute\/path\/of\/responders\"\n ]<\/code><\/pre>\n\n\n\n
analyzer {\n # analyzer location\n # url can be point to:\n # - directory where analyzers are installed\n # - json file containing the list of analyzer descriptions\n urls = [\n #\"https:\/\/download.thehive-project.org\/analyzers.json\"\n \"\/opt\/cortex\/analyzers-responders\/analyzers\"\n<\/strong> ]<\/code><\/pre>\n\n\n\n
sudo systemctl restart cortex<\/code><\/pre>\n\n\n\n
sudo tail -f \/opt\/cortex\/logs\/application.log<\/code><\/pre>\n\n\n\n
Enable Cortex Analyzers<\/h3>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
\n
<\/figure><\/a><\/div>\n\n\n\n
<\/figure>\n\n\n\n
Using Enabled Cortex Analyzers<\/h3>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
<\/figure><\/div>\n\n\n
\n
<\/figure>\n\n\n\n