Monday, December 19, 2011

Upgrading Sun-Java on Ubuntu 10.04

It is always good from a security point of view to have all your systems up and running in the most current state.  Go to this particular URL

Scan your browser by clicking on the check box.  There Qualys will tell you if there is any upgrade which is available.

Next go to this website

Linux (self-extracting file) filesize: 20.7 MB     - for 32 bit systems
Linux x64 * filesize: 20.3 MB                            - for 64 bit systems

Next move become root on a terminal by executing

$sudo su
Copy the binary over to the destination shown below
#cp /home/bala/Downloads/jre-6u30-linux-x64.bin /usr/lib/jvm/
#cd /usr/lib/jvm
Now make that file as executable
#chmod +x jre-6u30-linux-x64.bin
Now run that executable
Move the old soft link file which pointed to the old java
#mv java-6-sun java-6-sun_old
Remove the bin file.
#rm jre-6u30-linux-x64.bin
Rename the extracted file.
#mv jre1.6.0_30/ java-6-sun-
Create a new link to your extracted Java
#ln -s java-6-sun- java-6-sun
Now rename the old java plugin.
#mv /etc/alternatives/ /etc/alternatives/mozilla-javaplugin.so_old
Now create a new soft link to you new java
#ln -s /usr/lib/jvm/java-6-sun/lib/amd64/ /etc/alternatives/
# ll /usr/lib/mozilla/plugins/
lrwxrwxrwx 1 root root 39 2010-09-19 09:11 /usr/lib/mozilla/plugins/ -> /etc/alternatives/*
# ll /etc/alternatives/
lrwxrwxrwx 1 root root 45 2011-12-19 20:42 /etc/alternatives/ -> /usr/lib/jvm/java-6-sun/lib/amd64/*
# ll /usr/lib/mozilla/plugins/
lrwxrwxrwx 1 root root       39 2010-09-19 09:11 -> /etc/alternatives/*

If you have Newer version of firefox via ppa then one more step.

#ln -s /usr/lib/jvm/java-6-sun/lib/amd64/ /usr/lib/firefox-10.0.1/plugins/ 

Monday, December 12, 2011

Ubuntu Date & Time update via NTP

Command Line ntpdate

Ubuntu comes with ntpdate as standard, and will run it once at boot time to set up your time according to Ubuntu's NTP server. However, a system's clock is likely to drift considerably between reboots if the time between reboots is long. In that case it makes sense to correct the time occasionally. The easiest way to do this is to get cron to run it every day. With your favorite editor, create (needs sudo) a file /etc/cron.daily/ntpdate containing:
Make sure that you make this new file executable:
sudo chmod 755 /etc/cron.daily/ntpdate

SNORT Sig updates Including SED

Whenever I update Snort Rules, the five SID mentioned below gets additional ! before $DNS server which makes SNORT not to start.  All these SID are included inside emerging-current_events.rules.


so as a work around I have included sed "Serial Editor" along with my snort rules update script as shown below.

root@Bodhidarmar:/store/snort/rules# cat /var/scripts/

wget -q -O /store/snort/archive/snortrules-snapshot-xxxx.tar.gz -o /store/snort/rules/ -Q
echo "Now Running Serial Edit to change the Bang Dollar DNS to Dollar DNS in ET-current_event[DOT]rules"
sed s/\!\$DNS/$DNS/ /store/snort/rules/emerging-current_events.rules > /store/snort/rules/emerging-current_events.rules

Note I have reduced the Font size above as they needs to be on one single line.

Saturday, December 10, 2011

Snort Sensor Name

To get the name of the sensor which is logging a particular event we need to include  sensor_name=Bodhidarmar in the snort.conf file.

root@Bodhidarmar:/home/bala# grep sensor_name /etc/snort/snort.conf
output database: log, mysql, user=********** password=**************** dbnames=******* host=localhost sensor_name=Bodhidarmar

Friday, December 9, 2011


While starting adito if it refuses to start do as shown in the link :-)

Add these two lines:
To this file: /opt/adito-0.9.1/conf/wrapper.conf and service adito start should now work.

Thursday, December 8, 2011

Snort - fixing Error PortVar Lookup failed on '$FILE_DATA_PORTS'.

When we get the error "PortVar Lookup failed on '$FILE_DATA_PORTS'." on starting SNORT, this means to say that we need to declare the ports for '$FILE_DATA_PORTS' in our snort.conf file.


SNORT FQDN resolution

If we want BASE to do resolution of the IP addresses as shown below.

We need to edit base_config.php file under the document root.