Quttera’s Web Malware Scanner adds www.oracle.com to their blacklist.

Yesterday I was notified that www.blog.paranoidpenguin.net had been labeled as a malicious site by the Quttera malware scanner. I was taken aback by this as I spend a great deal of time monitoring my services. Curious to see what the malware scanner had flagged on my site I headed over to Quttera.com to have a look at my “scorecard”.

Quttera - Reference to blacklisted domain www.oracle.com
Quttera – detected reference to malicious blacklisted domain www.oracle.com

The result was rather interesting, my site was classified as malicious due to a reference to a blacklisted domain. The blacklisted domain in question was www.oracle.com, home of Larry Ellison’s software giant. Was this some comment on the current state of Java these days, or was something else amiss.

Thankfully Oracle must have called Quttera and gotten some assistance on removing most of the malware from their site, as of today, the domain is no longer blacklisted. Another explanation though would be a false positive from Quttera’s scanner. Still, I would like to believe that there is some sort of manual approval procedure before blacklisting a top 500 domain and subsequently flagging every site linking to it as malicious.

Unfortunately the results from Quttera’s engine will be cached and included in other online reputation services, so this is a gift that will keep on giving for a while.

As proof of the mishap, here is an archived copy of Quttera’s classification for Oracle, as seen on archive.org: www.oracle.com rating

Who is Quttera:
Quttera offers SaaS based malware detection solution to identify unknown and ‘zero-day’ threats on websites and to provide real-time warning for businesses and organizations. Technology is unique and its core is combined from artificial intelligence, multi-layered identification engines, scoring layers and other non-signature based approaches to web malware detection.
Source: linkedin.com

Quote of the day:
To err is human, but to really foul things up you need a computer.
Paul R. Ehrlich

Arch Linux – A stop job is running for MariaDB database server

The message in question as shown below made its appearance while I was trying to shut down my laptop. The job went on for about a minute before completing its task.

A stop job is running for MariaDB database server
A stop job is running for MariaDB database server

Thinking Arch had finally thrown med a curveball, I booted up the machine to have a look at the systemd journal.

# View logs by service:
journalctl -u mysqld.service

# Output
- mysqld.service: State 'stop-sigterm' timed out. Killing.
- mysqld.service: Main process exited, code=killed
...
- mysqld[5894]: 150718 12:20:54 [Warning] mysqld: Disk is full writing './mysql-bin.~rec~' (Errcode: 28 "No space left on device")....

So yeah, the “Disk is full” warning did not require me to be sysadmin of the year to decipher. By looking at the file system I could confirm that / was using 100% of available space. To find out where all the space had gone, I issued the command:

du -Pshx /* 2>/dev/null

# Output
..
20K     /tmp
5.8G    /usr
13G     /var

13G under /var doesn’t seem right. That can’t be all logs…
Let’s see whats taking up most of the space:

du -Sh /var | sort -rh | head -n 5 

# Output
11G     /var/cache/pacman/pkg
2.0G    /var/log/journal/43a7d67b84eb4c05bc77f4ab75096597
174M    /var/tmp/kdecache-master
112M    /var/lib/mysql
58M     /var/tmp/kdecache-master/http

Arghh!
To quote the pacman section of the Arch wiki:

pacman stores its downloaded packages in /var/cache/pacman/pkg/ and does not remove the old or uninstalled versions automatically, therefore it is necessary to deliberately clean up that folder periodically to prevent such folder to grow indefinitely in size.

In short, I had unknowingly kept a years worth of  package updates on disk, which in turn had accumulated to 11G and eventually hit the roof.

Following the book by using the paccache command (instead of deleting everything) freed up some much needed space.

paccache - delete packages from the cache
paccache deleting packages from the cache


I was actually aware of this “feature” but had forgotten all about it. I wont be making the same mistake again as filling up / will eventually cause serious harm to the system.

How to connect to a MySQL database from LibreOffice using JDBC on Slackware Linux

The LibreOffice Base application gives us the opportunity to work with MySQL databases in a graphical interface. I especially find the “Query Design View” useful when working on larger MySQL databases.

This tutorial demonstrates how configure the MySQL Connector/J (which is the official JDBC driver for MySQL) on Slackware 14.1 x86_64.

Tested on:
Slackware 14.1 x86_64
Java Platform (JDK) 8u45
LibreOffice 4.4.3.2
mysql-connector-java-5.1.35 (JDBC)

Tl;dr

Get the compressed highlights from Youtube: https://youtu.be/Cm_p9tji8Vo

Prerequisites

On Slackware it’s necessary to comment out the SKIP=”–skip-networking” directive from MariaDB which is enabled by default.

vi /etc/rc.d/rc.mysqld
# SKIP="--skip-networking"
/etc/rc.d/rc.mysqld restart

Failure to do so will result in the following error message when using the JDBC driver:

SQL Status: 08S01
Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server

Install the JDBC driver

Get the required software from the following locations:
Download Connector/J
Java SE Downloads
MySQL Mirrors

# Download the JDBC driver from a MySQL mirror
wget -q ftp://mirrors.dotsrc.org/mysql/Downloads/Connector-J/mysql-connector-java-5.1.35.tar.gz

# Download the JDBC driver checksum file
wget -q ftp://mirrors.dotsrc.org/mysql/Downloads/Connector-J/mysql-connector-java-5.1.35.tar.gz.md5

# Verify the integrity of the downloaded file
md5sum -c mysql-connector-java-5.1.35.tar.gz.md5

# Extract only the JAR file without its parent folder
tar -zxf mysql-connector-java-5.1.35.tar.gz mysql-connector-java-5.1.35/mysql-connector-java-5.1.35-bin.jar --strip-components=1

# Move the JAR file to the extensions folder
mv mysql-connector-java-5.1.35-bin.jar /usr/lib64/java/jre/lib/ext/

# Delete the files we no longer need
rm mysql-connector-java-5.1.35.tar*

Configure the JDBC driver for use with LibreOffice

Make sure that LibreOffice is using a java runtime environment. Navigate to “Options” => “Advanced” and verify the configuration.

Start the Base application and choose the option to connect to an existing database by selecting the JDBC driver.

Specify the datasource and driver class on the following format:
DataSource URL: mysql://host/db_name_here
JDBC Driver class: com.mysql.jdbc.Driver
Click on “Test class” to verify that the driver is working.

Finally, configure user authentication against the chosen database. Fill in your username and tick the “Password required” field. Click on “Test connection” to verify your credentials.

The process in pictures: