Skip to content

Instantly share code, notes, and snippets.

View shekkbuilder's full-sized avatar

shekk shekkbuilder

View GitHub Profile
A Few Handy Queries
Below are some examples of situations you might find yourself in, and ways you can use RPM to get the information you need. Keep in mind that these are just examples. Don't be afraid to experiment!
Finding Config Files Based on a Program Name
You're setting up a new system, and you'd like to implement some system-wide aliases for people using the Bourne Again SHell, bash. The problem is you just can't remember the name of the system-wide initialization file used by bash, or where it resides:
# rpm -qcf /bin/bash
/etc/bashrc
#
@shekkbuilder
shekkbuilder / sysctl.conf
Last active August 29, 2015 14:26 — forked from kfox/sysctl.conf
Linux kernel tuning settings for large number of concurrent clients
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
@shekkbuilder
shekkbuilder / WTB.txt
Last active August 29, 2015 14:27 — forked from CHEF-KOCH/WTB.txt
Web Tracking Mechanisms
* Evercookie
* Supercookie (HSTS)
* Cookie syncing (Back-end database synchronization)
* Flash cookies
* Opt-In
* Opt-Out
* User ID detection
* Canvas Fingerprinting
* ETag Tracking
* WebRTC
@shekkbuilder
shekkbuilder / fiemap.py
Last active August 29, 2015 14:27 — forked from NicolasT/fiemap.py
"fiemap" ioctl bindings for Python
import array
import fcntl
import struct
import collections
# Public API
# From linux/fiemap.h
FIEMAP_FLAG_SYNC = 0x0001
FIEMAP_FLAG_XATTR = 0x0002
FIEMAP_FLAGS_COMPAT = FIEMAP_FLAG_SYNC | FIEMAP_FLAG_XATTR
@shekkbuilder
shekkbuilder / shellcode.c
Last active August 29, 2015 14:27 — forked from securitytube/shellcode.c
C Program to test shellcode
#include<stdio.h>
#include<string.h>
unsigned char code[] = \
"\x31\xc0\x50\x68\x6e\x2f\x73\x68\x68\x2f\x2f\x62\x69\x89\xe3\x50\x89\xe2\x53\x89\xe1\xb0\x0b\xcd\x80";
main()
{
printf("Shellcode Length: %d\n", strlen(code));
@shekkbuilder
shekkbuilder / generate-shellcode.py
Last active August 29, 2015 14:27 — forked from alterakey/generate-shellcode.py
Crude exploit tool (shellcode generator) for io.smashthestack.org (level<11)
#!/usr/bin/python
# io.smashthestack.org (level ~10) exploit tool
# alterakey <[email protected]>
import sys
import math
import re
import shutil
import tempfile
import subprocess
@shekkbuilder
shekkbuilder / ghosttest.c
Last active August 29, 2015 14:27 — forked from lirazsiri/ghosttest.c
GHOST vulnerability tested
/* ghosttest.c: GHOST vulnerability tester */
/* Credit: http://www.openwall.com/lists/oss-security/2015/01/27/9 */
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#define CANARY "in_the_coal_mine"
@shekkbuilder
shekkbuilder / gist:ac1d48f9991b33406660
Last active August 29, 2015 14:27 — forked from koelling/gist:ef9b2b9d0be6d6dbab63
CVE-2015-0235 (GHOST) test code
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#define CANARY "in_the_coal_mine"
struct {
char buffer[1024];
@shekkbuilder
shekkbuilder / fiemap.py
Last active August 29, 2015 14:27 — forked from NicolasT/fiemap.py
import array
import fcntl
import struct
import collections
# Public API
# From linux/fiemap.h
FIEMAP_FLAG_SYNC = 0x0001
FIEMAP_FLAG_XATTR = 0x0002
FIEMAP_FLAGS_COMPAT = FIEMAP_FLAG_SYNC | FIEMAP_FLAG_XATTR
@shekkbuilder
shekkbuilder / rsync_parallel.sh
Last active August 29, 2015 14:27 — forked from rcoup/rsync_parallel.sh
Parallel-ise an rsync transfer when you want multiple concurrent transfers happening,
#!/bin/bash
set -e
# Usage:
# rsync_parallel.sh [--parallel=N] [rsync args...]
#
# Options:
# --parallel=N Use N parallel processes for transfer. Defaults to 10.
#
# Notes: