Rss

  • linkedin

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: https://github.com/jryberg/notify-via-pushover

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: https://code.google.com/p/kippo/

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: http://naemon.org

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

Done!
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

Done!

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

newaliases

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

smtpd

Done!

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.

http://openbsd.org/orders.html

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
from:

http://openbsd.org/lyrics.html

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:

http://openbsd.org/images/cdaudio2.gif

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.

http://openbsd.org/books.html#book9

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: http://technet.microsoft.com/en-us/security/bulletin/ms12-020

—  Johan Ryberg

How to compile Reaver under Ubuntu 12.04 (and aircrack-ng)

This is a quick how-to compile and install Reaver under Ubuntu 12.04

Steps:

  1. download source
  2. install required libraries and tools
  3. download and build aircrack-ng
  4. compile and install
  5. run =)

Download Source

First you need to download the latest source from http://code.google.com/p/reaver-wps/

wget http://reaver-wps.googlecode.com/files/reaver-1.4.tar.gz

Extract the tarball

tar -xzvf reaver-1.4.tar.gz

Install Required Libraries and Tools

Before you can build Reaver you need pcaplib and later on aircrack-ng (iw) to run Reaver

sudo apt-get install libpcap-dev sqlite3 libsqlite3-dev libpcap0.8-dev

Compile and Install

Build Reaver

cd reaver-1.4
cd src
./configure
make

Install Reaver

sudo make install

Download aircrack-ng source and build it

Since Ubuntu 12.04 aircrack-ng is not longer in the repository but you can still download it from source and compile it. It’s only one little tweak that need to be done since it will not build without the following errors.

johan@ubuntu-lab:~/aircrack-ng-1.1$ make
make -C src all
make[1]: Entering directory /home/johan/aircrack-ng-1.1/src'
make -C osdep
make[2]: Entering directory
/home/johan/aircrack-ng-1.1/src/osdep’
Building for Linux
make[3]: Entering directory /home/johan/aircrack-ng-1.1/src/osdep'
gcc -g -W -Wall -Werror -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0  -fPIC -I..    -c -o osdep.o osdep.c
gcc -g -W -Wall -Werror -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0  -fPIC -I..    -c -o network.o network.c
gcc -g -W -Wall -Werror -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0  -fPIC -I..    -c -o linux.o linux.c
linux.c: In function ‘is_ndiswrapper’:
linux.c:165:17: error: variable ‘unused’ set but not used [-Werror=unused-but-set-variable]
linux.c: In function ‘linux_set_rate’:
linux.c:334:22: error: variable ‘unused’ set but not used [-Werror=unused-but-set-variable]
linux.c: In function ‘linux_set_channel’:
linux.c:807:22: error: variable ‘unused’ set but not used [-Werror=unused-but-set-variable]
linux.c: In function ‘linux_set_freq’:
linux.c:896:22: error: variable ‘unused’ set but not used [-Werror=unused-but-set-variable]
linux.c: In function ‘set_monitor’:
linux.c:1022:22: error: variable ‘unused’ set but not used [-Werror=unused-but-set-variable]
linux.c: In function ‘do_linux_open’:
linux.c:1366:12: error: variable ‘unused_str’ set but not used [-Werror=unused-but-set-variable]
linux.c:1352:15: error: variable ‘unused’ set but not used [-Werror=unused-but-set-variable]
linux.c: In function ‘get_battery_state’:
linux.c:1982:35: error: variable ‘current’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[3]: *** [linux.o] Error 1
make[3]: Leaving directory
/home/johan/aircrack-ng-1.1/src/osdep’
make[2]: *** [all] Error 2
make[2]: Leaving directory /home/johan/aircrack-ng-1.1/src/osdep'
make[1]: *** [osd] Error 2
make[1]: Leaving directory
/home/johan/aircrack-ng-1.1/src’
make: *** [all] Error 2

This is how to build aircrack-ng under Ubuntu 12.04

sudo apt-get install build-essential
sudo apt-get install libssl-dev
wget http://download.aircrack-ng.org/aircrack-ng-1.1.tar.gz
tar -zxvf aircrack-ng-1.1.tar.gz
cd aircrack-ng-1.1

Edit common.mak with vi as example

vi common.mak

Find the following row

CFLAGS          ?= -g -W -Wall -Werror -O3

Remove “-Werror” so that it looks like this

CFLAGS          ?= -g -W -Wall -O3

Save the file, build and install

make
sudo make install

Run

Reaver is now installed and ready to use. You will first need to put the wifi adapter info monitor mode before you can start and the most easiest way is to use airmon-ng (part of aircrack-ng) that you just installed.

First put your adapter info monitor mode, in my case it’s wlan0

sudo airmon-ng start wlan0

Run Reaver

sudo reaver -i mon0 -b 00:00:00:00:00:00

Replace MAC 00:00:00:00:00:00 with the actual AP:s MAC address to crack

— Johan Ryberg