Skip to content

Instantly share code, notes, and snippets.

View nu11secur1ty's full-sized avatar
:octocat:
root@kali:~# 🐫Perl

nu11secur1ty nu11secur1ty

:octocat:
root@kali:~# 🐫Perl
View GitHub Profile
@nu11secur1ty
nu11secur1ty / install_nagios.sh
Last active February 4, 2016 00:39
Install Nagios 4.x on CentOs 6.5
#!/bin/bash
######################################
# copyright@nu11secur1ty #
######################################
# Stop iptables
/etc/init.d/iptables stop
yum install wget
cd ~
# you can change if you want!
@nu11secur1ty
nu11secur1ty / EPEL Repository CentOS 6.5.md
Last active March 1, 2016 08:13
Install & Enable EPEL Repository on CentOS 6.5

EPEL Repository on CentOS 6.5

Extra Packages for Enterprise Linux (EPEL)

#References:

https://fedoraproject.org/wiki/EPEL
http://www.shellhacks.com/en/Adding-EPEL-Repository-on-CentOS-RHEL
https://fedoraproject.org/keys
@nu11secur1ty
nu11secur1ty / chromedriver.sh
Created March 29, 2016 07:02 — forked from mikesmullin/chromedriver.sh
easily install chromedriver on linux/osx
sudo apt-get install unzip;
wget -O /tmp/chromedriver.zip http://chromedriver.googlecode.com/files/chromedriver_linux64_19.0.1068.0.zip && sudo unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/;
@nu11secur1ty
nu11secur1ty / Add remote host to nagios server.md
Last active March 29, 2016 15:47
Add remote host to nagios server

##Add remote host to Nagios server

###On Remote Host ####Pre-requisite #####Below listed package should be installed i.gcc ii. xinetd iii.openssl

#####Step 1

@nu11secur1ty
nu11secur1ty / create a self-signed SSL Certificate.md
Last active April 4, 2016 14:40
How to create a self-signed SSL Certificate

Overview

The following is an extremely simplified view of how SSL is implemented and what part the certificate plays in the entire process.

Normal web traffic is sent unencrypted over the Internet. That is, anyone with access to the right tools can snoop all of that traffic. Obviously, this can lead to problems, especially where security and privacy is necessary, such as in credit card data and bank transactions. The Secure Socket Layer is used to encrypt the data stream between the web server and the web client (the browser).

SSL makes use of what is known as asymmetric cryptography, commonly referred to as public key cryptography (PKI). With public key cryptography, two keys are created, one public, one private. Anything encrypted with either key can only be decrypted with its corresponding key. Thus if a message or data stream were encrypted with the server's private key, it can be decrypted only using its corresponding public key, ensuring that the data only could have come from the serve

@nu11secur1ty
nu11secur1ty / Bonding Interfaces.md
Last active April 6, 2016 13:10
Channel Bonding Interfaces CentOs 6

Warning:

The use of direct cable connections without network switches is not supported for bonding. 
The failover mechanisms described here will not work as expected without the presence of network switches. 
See the Red Hat Knowledgebase article Why is bonding in not supported with direct connection using crossover cables? for more information. 

Note:

The active-backup, balance-tlb and balance-alb modes do not require any specific configuration of the switch. 
Other bonding modes require configuring the switch to aggregate the links. 

Linux Runlevels Explained

A runlevel is one of the modes that a Unix -based operating system will run in. Each runlevel has a certain number of services stopped or started, giving the user control over the behavior of the machine. Conventionally, seven runlevels exist, numbered from zero to six.

After the Linux kernel has booted, the init program reads the /etc/inittab file to determine the behavior for each runlevel. Unless the user specifies another value as a kernel boot parameter, the system will attempt to enter (start) the default runlevel. Standard run levels for Red Hat based distributions Run Level Mode Action

0 Halt Shuts down system
@nu11secur1ty
nu11secur1ty / fstab.md
Last active April 11, 2016 14:55
fstab file on a typical Linux system.
# device-spec   mount-point     fs-type      options                                          dump pass
LABEL=/         /               ext4         defaults                                            1 1
/dev/sda6       none            swap         defaults                                            0 0
none            /dev/pts        devpts       gid=5,mode=620                                      0 0
none            /proc           proc         defaults                                            0 0
none            /dev/shm        tmpfs        defaults                                            0 0

# Removable media

#To create the logical volume, we will use:

lvcreate -L 3G -n lvstuff vgpool

The -L command designates the size of the logical volume, in this case 3 GB, and the -n command names the volume. Vgpool is referenced so that the lvcreate command knows what volume to get the space from.

#Format and Mount the Logical Volume One final step is to format the new logical volume with a file system.

@nu11secur1ty
nu11secur1ty / Logical Volume Management.md
Last active April 12, 2016 11:53
How to Manage and Use LVM (Logical Volume Management)

#How to View Current LVM Information The first thing you may need to do is check how your LVM is set up. The s and display commands work with physical volumes (pv), volume groups (vg), and logical volumes (lv) so it is a good place to start when trying to figure out the current settings.

The display command will format the information so it’s easier to understand than the s command. For each command you will see the name and path of the pv/vg and it should also give information about free and used space. The most important information will be the PV name and VG name. With those two pieces of information we can continue working on the LVM setup. #Creating a Logical Volume Logical volumes are the partitions that your operating system uses in LVM. To create a logical volume we first need to have a physical volume and volume group. Here are all of the steps necessary to create a new logical volume. #Create physical volume We will start from scratch with a brand new hard drive with no partitions or information on