{"id":2966,"date":"2019-05-19T23:00:05","date_gmt":"2019-05-19T20:00:05","guid":{"rendered":"https:\/\/kifarunix.com\/?p=2966"},"modified":"2024-03-11T22:52:38","modified_gmt":"2024-03-11T19:52:38","slug":"fix-alienvault-hids-events-displaying-0-0-0-0-as-ip-address","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/fix-alienvault-hids-events-displaying-0-0-0-0-as-ip-address\/","title":{"rendered":"Fix AlienVault HIDS Events Displaying 0.0.0.0 as IP Address"},"content":{"rendered":"\n<p>In this guide, we are going to show you how to fix AlienVault HIDS events displaying 0.0.0.0 as IP address. Are you running AlienVault OSSIM 5.7.1 and you are experiencing an issue where by it is not parsing events correctly and instead of displaying the actual hostnames or IP addresses as it is on the events, it displays 0.0.0.0?<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/05\/0.0.0.0.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1207\" height=\"464\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/05\/0.0.0.0-dst-src.png\" alt=\"Fix AlienVault HIDS Events Displaying 0.0.0.0 as IP Address\" class=\"wp-image-2996\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/05\/0.0.0.0-dst-src.png 1207w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/05\/0.0.0.0-dst-src-768x295.png 768w\" sizes=\"(max-width: 1207px) 100vw, 1207px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/05\/0.0.0.0_dst-src.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1079\" height=\"131\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/05\/0.0.0.0_dst-src.png\" alt=\"\" class=\"wp-image-2997\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/05\/0.0.0.0_dst-src.png 1079w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/05\/0.0.0.0_dst-src-768x93.png 768w\" sizes=\"(max-width: 1079px) 100vw, 1079px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Fixing AlienVault HIDS Events Displaying 0.0.0.0 as IP Address<\/h3>\n\n\n\n<p>The issue of AlienVault HIDS Events displaying 0.0.0.0 as IP address for either source or destination has been identified to be related to the ossim ossec plugin, <strong>\/etc\/ossim\/agent\/plugins\/ossec-single-line.cfg<\/strong> which fails to translate hostnames into IPv4 addresses. This is because this plugin do not contain the <strong>resolv()<\/strong> function hence a failed resolution results in a value of 0.0.0.0.<\/p>\n\n\n\n<p>Well, there has been a simple fix that has been identified to solve this issue. This involves customizing the <strong>ossec-single-line.cfg<\/strong> by adding the <strong>resolv()<\/strong> function as shown below.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Customize <strong>ossec-single-line.cfg<\/strong> Plugin<\/h4>\n\n\n\n<p>Before you can make changes to an existing <strong>ossec-single-line.cfg<\/strong> plugin, make a copy of it by appending the <strong>.local<\/strong> extension.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>cp \/etc\/ossim\/agent\/plugins\/ossec-single-line.cfg{,.local}<\/code><\/pre>\n\n\n\n<p>Next, open the the backup plugin you created above,the one with the <strong>.local<\/strong> extension, for editing and make the following changes.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vim \/etc\/ossim\/agent\/plugins\/ossec-single-line.cfg.local<\/code><\/pre>\n\n\n\n<p>Locate all the occurrences of <strong>src_ip={VARIABLE}<\/strong> and <strong>dst_ip={VARIABLE}<\/strong>, <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>...\nsrc_ip={$<strong>variable<\/strong>}\ndst_ip={$<strong>variable<\/strong>}\n...<\/code><\/pre>\n\n\n\n<p>For example;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>src_ip={$hostname}\ndst_ip={$hostname}<\/code><\/pre>\n\n\n\n<p>and replace them with <strong>src_ip={resolv(VARIABLE)}<\/strong> and <strong>dst_ip={resolv(VARIABLE)}<\/strong> such that they look like;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>...\nsrc_ip={<strong>resolv(<\/strong>$<strong>variable<\/strong>)}\ndst_ip={<strong>resolv(<\/strong>$<strong>variable<\/strong>)}\n...<\/code><\/pre>\n\n\n\n<p>You can simply run the command below to make the changes;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sed -i -e '\/src_ip=.*\\}\/ s\/\\S\\w*\/resolv(&amp;)\/4' -e '\/dst_ip=.*\\}\/ s\/\\S\\w*\/resolv(&amp;)\/4' \/etc\/ossim\/agent\/plugins\/ossec-single-line.cfg.local<\/code><\/pre>\n\n\n\n<p>After making the changes, the variable looks like, for example;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>src_ip={resolv($hostname)}\ndst_ip={resolv($hostname)}<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Apply the Changes<\/h4>\n\n\n\n<p>Once you have made the changes, you need to run the <strong>alienvault-reconfig<\/strong> or <strong>ossim-reconfig<\/strong> command to apply the changes.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>ossim-reconfig &amp;&amp; \/etc\/init.d\/ossim-agent restart<\/code><\/pre>\n\n\n\n<p>Your source  or destination addresses should now be fine. Navigate to the GUI and confirm the same.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1074\" height=\"206\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/05\/fixed-0.0.0.0.png\" alt=\"\" class=\"wp-image-2998\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/05\/fixed-0.0.0.0.png 1074w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/05\/fixed-0.0.0.0-768x147.png 768w\" sizes=\"(max-width: 1074px) 100vw, 1074px\" \/><\/figure>\n\n\n\n<p>Well, that is all on how to fix IP address showing as 0.0.0.0 on AlienVault HIDS events. We hope this was informative. Feel free to drop any comment.<\/p>\n\n\n\n<p>See other Alienvault ossim tutorials by following the links below;<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/nagios-snmp-monitoring-of-linux-hosts-on-alienvault-usm-ossim\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Nagios SNMP Monitoring of Linux Hosts on AlienVault USM\/OSSIM<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/how-to-configure-availability-monitoring-on-alienvault-usm-ossim\/\" target=\"_blank\">Configure Nagios Availability Monitoring on AlienVault USM\/OSSIM<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/how-to-install-and-configure-alienvault-hids-agent-on-a-windows-host\/\" target=\"_blank\">How to Install and Setup AlienVault HIDS Agent on a Windows Host<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/how-to-install-and-configure-ossec-agent-on-linux-host\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">How to Install and Configure AlienVault HIDs Agent on a Linux Host<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/how-to-add-assets-to-alienvault-ossim-server-for-monitoring\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Import Assets to AlienVault USM\/OSSIM using a CSV file<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/how-to-install-and-configure-alienvault-ossim-5-5-on-virtualbox\/\" target=\"_blank\">How to install and configure AlienVault OSSIM 5.5 on VirtualBox<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, we are going to show you how to fix AlienVault HIDS events displaying 0.0.0.0 as IP address. Are you running AlienVault OSSIM<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[72,103],"tags":[956,955,957],"class_list":["post-2966","post","type-post","status-publish","format-standard","hentry","category-monitoring","category-alienvault","tag-0-0-0-0","tag-alienvault-ossim","tag-hids-events","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/2966"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=2966"}],"version-history":[{"count":8,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/2966\/revisions"}],"predecessor-version":[{"id":21150,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/2966\/revisions\/21150"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=2966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=2966"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=2966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}