Syndicate content

Attack by ZmEu

Who is ZmEu?

An image showing ZmeuThe name Zmeu (no capital E) is the name of a fantastic creature of Romania. There are so many stories that there isn't a clear understanding of what it is... but it is human like, can spit fire and wants to marry young women.

If you're wondering, it is generally a bad guy.

ZmEu Attack

Today, I noticed a lot of traffic on one of my servers. Looking into what was happening, I immediately found out that an attacker was looking for a loophole in that system. That attack was being performed from China.

Setting up a Digital Ocean Droplet

When I create a new DigitalOcean droplet I have to run a few commands that I don't otherwise use very much at all so I was thinking that adding them here would make it easier to remember.

First if you setup an SSH key on DigitalOcean before you create the servlet, then you will be able to access the server root account with SSH.

ssh -l root <ip-address>

The shell then gives you the ability to create a user, because it is much safer to use a user under your name instead of just and only access the root account. However, you most certainly want to make that user part of the sudo ...

How to setup a Linux firewall

Introduction

If you setup a Linux box, you want to setup a firewall before you connect your computer to the Internet. If you are setting up a remote server, it should only have the SSH port open. Connect to it, setup the fire, then only install the other servers and open ports as required (and only ports that need to be connected from the outside.)

Any port that you open without the firewall already setup is at risk. You may want to install PHP and along will come a database which may open a port to the Internet. Something that you just don't want to happen.

Setup Firewall

To ...

Turning sites and modules on and off in Apache2

I always have to looks for the command line option to turn sites and modules on and off (really it is said to be enabled or disabled.)

The commands are as follow:

  • a2ensite -- enable one site
  • a2dissite -- disable one site
  • a2enmod -- enable one module
  • a2dismod -- disable one module

When you use one of the commands in the command line terminal without specifying which site or module to enable, then you are given a list of the sites or modules you can enable or disable. Note that the configuration files have to end with .conf for this mechanism to work as expected.

Solaris virtual consoles are password protected, how to remove the protection?

Solaris 11.2 (Open SunOS really) has virtual console a la Linux. This works great. You can use the Alt-F1 to Alt-F6 keys to instantly switch between 6 different consoles. I use that to have one console with an editor and another with my make and runtime tests.

Unfortunately, Solaris includes a lock which manes that each time you switch between a console, it hides the content and ask you for your password to unlock the console (that way you could have multiple users on the same computer, each using a different console and the system remains safe since people cannot just go to someone's ...

How do you get micro-seconds from the Linux stat(2) call?

A little while ago I noticed that I couldn't find documentation on how to get the modification time of a file in micro-seconds. The notorious stat() call returns st_mtime defined as a time_t in the documentation.

Well... The fact is that the structure is really composed of a timeval structure and not a time_t (that applies to all 3 time values: modification, last access, and last status change.) So in fact you can use the name of the field without the last letter and a sub-timeval field as in:

struct stat s;
seconds = s.st_mtim.tv_sec; // == s.st_mtime
microseconds = ...

Installing Solaris to compile your software

Now a day I like to install Solaris to check that my code compiles and generally runs under that OS.

I think that's a good way to prove that the code is multi-OS ready even if it is only for Unices.

OpenSolaris is free and can be downloaded from Oracle. The last URL I use was:

http://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html

The system, by default, comes with a directory named /usr/sfw which includes a really old version of gcc. It is possible, though, to move forward with a newer version of the compiler by installing a package. Under Solaris 11.2, this ...

Make Firefox NOT close when I close the last tab

I found it a pain to see the Firefox window gets closed when I click the close button of the last tab.

When I use that same feature in SeaMonkey, it does not close the main window, instead it makes the tab empty.

Today I thought that maybe they had a flag in there to decide whether the main window should be closed or not and indeed they have:

browser.tabs.closeWindowWithLastTab

So all you have to do is change this flag to 'false' (the default in FF being true now) and closing the last tab won't close the window!

To change your Firefox configuration use:  about:config

To ...

Convert XML tags and text to a String

Today I started testing a lot of my JavaScript / jQuery code from a website I am building for a customer. I got an error, at some point, saying:

SCRIPT5007: Unable to get property 'replace' of undefined or null reference

The error was in link with the 'replace' function being referenced on an innerHTML of an element. More specifically, one of those XML element (probably the top most one.)

The fact is that Internet Explorer does not support innerHTML in an XML document. Not to be too surprised about that, XML is not HTML so there is really no reason why innerHTML should be ...

Gnome Keyring stopped working...

At some point in time, I upgraded Ubuntu and my Gnome Keyring stopped working. So each time I do ssh I have to enter the password at the prompt and that's a bit annoying after a while (depends how much I access the servers, obviously.)

I read many threads ZERO of them gave me an answer I want to hear. All of them speak of things that do not make sense in that situation. So I tried to install a brand new clean 14.04 server + ubuntu-desktop and guess what... Gnome Keyring is installed and everything makes me think that is is correctly installed (I get the correct SSH_AUTH_SOCK value) and ...

Syndicate content

     

Terms of Site Index

Find the page/content you are looking for with our index.

  • debug

    When one of the early computers stopped working, it felt like the program was wrong. The fact was that a bug was crowling inside and generating electrical problems. Once the bug was removed and the computer fixed, the program worked again. Since then, a problem in a computer program is called a bug. The word de-bug means removing the bugs from the software program.

  • decipher
  • FireFox
  • flash
  • join