• linkedin

How to switch back console to monitor during RDP session

Sometime it’s very annoying to leave the monitor console session locked after the machine has been remotely controlled using remote desktop (RDP). To switch back the current session to the monitor simply start a command prompt and execute the following command

If it does not work, try to use 0 (zero) instead of 1, or test with another number until it works or get the exact session id using the command “qwinsta” (Display information about Remote Desktop Services sessions) to get the ID. Your ID is found on the line with the “>” character.

— Johan Ryberg

Send Naemon / op5 / Nagios alerts to your phone with Pushover

Screenshot_2014-11-29-08-28-16I just published a tool I have been working on to very easy send push notifications from Naemon, op5, Nagios or Icinga as a few examples to your Android, iPad, iPhone or desktop using Pushover

You can find notify-via-pushover on my Github page:

Please feel free to give me feedback and feature request if you are missing something.

— Johan Ryberg

How to install Kippo SSH honeypot on OpenBSD 5.5 with chroot

This is a basic guide how to install Kippo SSH Honeypot on OpenBSD 5.5 using chroot.

Please remember that this might be dangerous since the hacker depending of the skill set might find a way to escape from the honeypot or tries to find other service that are related to you. Only run a honeypot if you know what you are doing since the offender might retaliate

More information about Kippo can be found here:

Don’t run Kippo as root and use ports above 1024 (non privileged ports). Use port forwarding if you want to listen on port 22

How to install Naemon 0.8.0 on CentOS 6.5

Naemon 0.8.0This is a guide how to install Naemon 0.8.0 on CentOS 6.5 64-bit system. 32-bit packages are also available, just change download links bellow.

Download precompiled packages, you will find/verify the links from Naemon homepage:

This instructions are created with CentOS minimal installation in mind, some packages may already exist if you have any other kind of installation.

Download wget

Download packages

Enable epel repository, required for both dependency (mod_fcgid), nrpe and nagios-plugins

Install mod_fcgid

Install Naemon

Disable SELinux, not supported by Thruk

Make it persistent

edit row: “SELINUX=enforcing”
replace with: “SELINUX=disabled”

Install nagios-plugins and NRPE agent, available via epel repository

Modify path to nagios plugins, edit /etc/naemon/resource.cfg

edit row: “$USER1$=/usr/lib64/naemon/plugins”
replace with: “$USER1$=/usr/lib64/nagios/plugins”

Start services (also after boot)

Installation complete, test your installation. Visit http://your-server/naemon/ and use default password admin/admin

Howto: build Naemon from source for Ubuntu 12.04

It’s quite straight forward to build Naemon from source with Ubuntu, all required softwares can be found as packages from the standard repository

Install dependencies

Get latest version of Naemon

Update source (meta package may not be updated)

Build Naemon

Create DEB

Install Naemon

Restart Apache

Change path to Nagios-plugins for Naemon

Find row: $USER1$=/usr/lib/naemon/plugins
Change to: $USER1$=/usr/lib/nagios/plugins

Reload config for Naemon

Browse to server/naemon and use admin/admin

Howto: build Naemon from source for CentOS 6.5

CentOS are a bit of tricky since a lot of packages are not available from standard repository. We needs to download a lot of components and build from source.

Build Naemon

Install dependencies for Naemon

Enable epel repository, we need this for nagios-plugins and mod_fcgid

Install nagios-plugins and mod_fcgid

Get latest version of Naemon

Ignore yui-compressor, are not available as a package

Update source (meta package may not be updated)

Create compiler configuration

Create RPM

Disable SELinux, not supported by Thruk

Make it persistent

edit row: “SELINUX=enforcing”
replace with: “SELINUX=disabled”

Install Naemon

Enable new services on boot and start them


Browse to server/naemon and use admin/admin

How to build monitoring-plugins for CentOS 6.5 for Naemon

This is a quick guide how to build monitoring-plugins (formerly known as nagios-plugins) on CentOS 6.5 (64-bit) for Naemon


smtpd instead of sendmail in OpenBSD

sendmail is in my opinion unessisary advanced and compicated for the most installations and there are a more simpler solution already in base for OpenBSD which is smtpd. This daemon is not active by default but it’s simple to change.

Stop sendmail

pkill sendmail

Edit /etc/mailer.conf and change to the following

sendmail       /usr/sbin/smtpctl

send-mail     /usr/sbin/smtpctl

mailq           /usr/sbin/smtpctl

makemap         /usr/libexec/smtpd/makemap

newaliases      /usr/libexec/smtpd/makemap

hoststat        /usr/libexec/sendmail/sendmail

purgestat       /usr/libexec/sendmail/sendmail

Rebuild aliases database


Make sure smtpd starts with the system and stop sendmail

echo “sendmail_flags=NO” >> /etc/rc.conf.local

echo “smtpd_flags=” >> /etc/rc.conf.local

Start smtpd



Modifiy /etc/mail/smtpd.conf for your system, it’s a dream in comparison to sendmail

—  Johan Ryberg

Preorder OpenBSD 5.1 today

Theo de Raadt announced today that it’s now possible to preorder OpenBSD 5.1 that will be released May 1 2012. As usual is the preorders delivered a few days before the release date.  It’s also important to buy since the money is used by the developers to keep the project running.

It is that time again.  I have just activated pre-orders for CDs,
tshirts, and posters for the 5.1 release — due May 1.

At the same time, I am making available the song that will come out
with the release (hmm, it is still moving out to the ftp mirrors at
the moment, but that is ok).  The song and details of it are linked

And there is something else.  Five years ago we made available an
Audio CD that contained 5 years of songs.  Well, we have made a new
audio CD since enough new songs have been made.  It is not very
expensive, so please consider buying this as well when you place any
order.  It has some rather nice liner notes.  Had some great fun
coming up with the cover for that CD:

I’d also like you remind you that Michael Lucas new “SSH Mastery” book
is also now available, in case anyone was waiting for the 5.1 release
to place one order.

Please consider purchasing these items and/or making a donation, since
this is a very important revenue source which keeps the project going.

— Johan Ryberg

Vulnerabilities in Remote Desktop Could Allow Remote Code Execution – Update is released

Microsoft just released a security bulletin MS12-02 where they stated that an attacker could execute code on the targeted machine via Remote Desktop (tcp port 3389) and it’s a critical vulnerability and the patch should be applied at once. If the computer by any reason can’t be updated it should be turned off at once.

More info:

—  Johan Ryberg