Skip to content

Instantly share code, notes, and snippets.

@shaheemirza
shaheemirza / base64_finder.sh
Last active August 29, 2015 14:27 — forked from danreb/base64_finder.sh
Find all PHP code with base64_decode - useful to find suspected hacker files
find /home/HOMEDIR/public_html \( -name "*.php" \) -type f -print0 | xargs -0 grep --binary-files=without-match -ir "base64_decode\s*("
@shaheemirza
shaheemirza / debian-gfs.sh
Created October 5, 2015 09:24 — forked from cloudrck/debian-gfs.sh
Debian 8 Jessie GlusterFS Install and Configuration
#!/bin/bash
set -e
# Debian 8 'Jessie' GlusterFS Install
#########
#ToDo:
# * Change guid/suid of mount
# * Give option for cluster type
# * Change variables via command line read
########

Building a grsec-patched Linux kernel for Debian 8 and DigitalOcean

It's possible to run a custom (instead of hypervisor-managed) kernel for use with Debian 8.x on a DigitalOcean droplet.

We'll build one with grsecurity, "an extensive security enhancement to the Linux kernel that defends against a wide range of security threats through intelligent access control, memory corruption-based exploit prevention, and a host of other system hardening".

Note: The stable patches for Linux 3.14.x and 3.2.x are not publicly available anymore, so we'll be applying the free 4.2.x (test) patch. The URLs and filenames in this document may become outdated, so fetch the latest from grsecurity.net and kernel.org.

Install dependencies:

@shaheemirza
shaheemirza / vps.sh
Created December 1, 2015 10:05 — forked from zipizap/vps.sh
#PROLOGUE: all this should be run as root, otherwise stated
#update && upgrade:
apt-get update && apt-get upgrade -y
#create a new user
adduser user_x
#create group admin (funny enough, it does not exist, although its accounted in the /etc/sudoers file):
addgroup --system admin
@shaheemirza
shaheemirza / logstash_suricata_eve.conf
Created December 15, 2015 06:50 — forked from regit/logstash_suricata_eve.conf
A sample Logstash configuration for Suricata JSON output.
input {
file {
path => [ "/usr/local/var/log/suricata/eve.json" ]
codec => json
}
}
filter {
if [src_ip] {
geoip {
@shaheemirza
shaheemirza / README.md
Created December 19, 2015 12:39 — forked from mashdot/README.md
Bacula concurrent jobs multiple storage devices client labeled pools debian installation configuration.
Time-stamp: <2012-03-30 Fri 16:56 README.md>
Author....: 'Mash (Thomas Herbert)

TOSHINE-BACULA

Bacula concurrent jobs multiple storage devices client labeled pools Debian installation and configuration.
Please see http://toshine.org/etc for full article.

Bacula Debian Installation.

@shaheemirza
shaheemirza / nginx.conf
Created April 1, 2016 11:12 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@shaheemirza
shaheemirza / no_watermark.py
Created April 28, 2016 11:16
Reqursivelly removing the watermarks of it-ebooks.info's downloaded eBooks
import re
import os
import shutil
import argparse
from os import path
from sys import stderr
#
# Author: Daxda
# Date: 02.04.2014
@shaheemirza
shaheemirza / 1MyClusInstall.md
Created May 16, 2016 10:54 — forked from htcang/1MyClusInstall.md
MySQL Cluster Installation

Machine 1: Management Node + SQL Node

IP: 192.168.0.151

  1. Install prequisition
yum install perl
@shaheemirza
shaheemirza / mysql_replication_autostart.sh
Created May 24, 2016 07:29 — forked from nicomak/mysql_replication_autostart.sh
This script automates the process of starting a Mysql Replication on 1 master node and N slave nodes.
#!/bin/bash
#title : mysql_replication_autostart.sh
#description : This script automates the process of starting a Mysql Replication on 1 master node and N slave nodes.
#author : nicomak
#date : 20160308
#version : 0.1
#usage : bash mysql_replication_autostart.sh
#bash_version : 4.3.11(1)-release
#=============================================================================