Monthly archives for February, 2016

Improving cheap DVR camera systems

dvr camera

Did you purchase a cheap DVR camera system off ebay or the likes and want to do more with the videos it’s saving? You definitely need one that has FTP upload support. If someone breaks into your place after they notice you have cameras they certainly will steal or destroy it. So let’s go ahead […]

Fail2ban hax


Intro For those who are not aware, fail2ban is a reactive tool that triggers actions when events occur. The most common uses are failed login attempts resulting in a firewall block. Today I’ll show you a handful of tricks I’ve used to help protect my systems. Permanent banning Step 1. Inside action.d/iptables-multiport.conf we will be changing […]

Timestamp vmstat

Timestamp vmstat

Here’s a script I wrote to timestamp vmstat for when you want to let vmstat run for extended periods of time #!/bin/bash if [ “$1” == “-h” ]; then echo “usage $0 [delay in seconds]”; exit; fi if [ $# == “1” ]; then delay=$1 else delay=1 fi #print every XX lines print=30 i=0 while […]

Nginx missing commands


All of us living in the debian based world (ubuntu) have grown accustomed to a2ensite/a2dissite/etc scripts that come with apache to help manage your vhosts. Nginx was sadly left out of these cool commands so I’ve decided to add them here. You can run this script and it will add these beloved commands as “n2ensite” […]

Ultimate Birthday Email(s)

Ultimate Birthday Email(s)

Once upon a time my evil side decided to email someone Happy Birthday… From the whole company. We have an LDAP directory containing everyone’s name and email but it can easily be retro fitted for Windows AD or a CSV file. I used the mutt progam to spoof the headers but there is another way using […]

Spoofing emails using netcat

Spoofing emails using netcat

There are a few legitimate times when you find a need to speak raw SMTP to send an email. Here’s some scripts I’ve used in the past to help with that task. Let’s start with #!/bin/sh sleep 1 echo HELO sleep 1 echo ‘MAIL FROM:<[email protected]>’ sleep 1 echo RCPT TO:$1 sleep 1 echo […]

Securing nginx


Many users of nginx do not realize how easy it is to add a WAF (Web Application Firewall) to nginx and how powerful this simple tool is. What is a WAF? A WAF is a layer of protection that lies between the user of your website and the service that is executing your website. That extra […]