Skip to content

Instantly share code, notes, and snippets.

View shekkbuilder's full-sized avatar

shekk shekkbuilder

View GitHub Profile
@shekkbuilder
shekkbuilder / bash_cheatsheet.md
Created November 22, 2019 03:35 — forked from lee2sman/bash_cheatsheet.md
bash scripting cheatsheet

Bash scripting cheatsheet

  • by Lee2sman
  • Updated 2017-09-18

Bash shebang

  • #!/usr/bin/env bash for portability, or less good, #!/bin/bash

Commenting

@shekkbuilder
shekkbuilder / how_to_admin.txt
Created October 30, 2019 23:53
how to admin (not mine)
# cat notes/how_to_admin
This is what I tell people to do, who ask me "how do I learn to be a Linux sysadmin?".
1) Set up a KVM hypervisor.
2) Inside of that KVM hypervisor, install a Spacewalk server. Use CentOS 6 as the distro for all work below. (For bonus points, set up errata importation on the CentOS channels, so you can properly see security update advisory information.)
3) Create a VM to provide named and dhcpd service to your entire environment. Set up the dhcp daemon to use the Spacewalk server as the pxeboot machine (thus allowing you to use Cobbler to do unattended OS installs). Make sure that every forward zone you create has a reverse zone associated with it. Use something like "internal.virtnet" (but not ".local") as your internal DNS zone.
4) Use that Spacewalk server to automatically (without touching it) install a new pair of OS instances, with which you will then create a Master/Master pair of LDAP servers. Make sure they register with the Spacewalk server. Do not allow anonymous bind, do
@shekkbuilder
shekkbuilder / Debootstrap.md
Created November 19, 2018 21:46 — forked from raminfp/Debootstrap.md
How to build your kernel without compile kernel source with debootstrap?

Let's Start (Weekend Notes) ...

Install debootstrap :

$ apt-get install debootstrap

Minimal Debian distribution with debootstrap :

@shekkbuilder
shekkbuilder / mem-loader.asm
Created October 8, 2018 14:39 — forked from zznop/mem-loader.asm
Fun little loader shellcode that executes an ELF in-memory using an anonymous file descriptor (inspired by https://x-c3ll.github.io/posts/fileless-memfd_create/)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Copyright (C), zznop, zznop0x90@gmail.com
;;;
;;; This software may be modified and distributed under the terms
;;; of the MIT license. See the LICENSE file for details.
;;;
;;; DESCRIPTION
;;;
;;; This PoC shellcode is meant to be compiled as a blob and prepended to a ELF
@shekkbuilder
shekkbuilder / audit.rules
Created August 6, 2018 07:04 — forked from Neo23x0/audit.rules
Linux Auditd Best Practice Configuration
# ___ ___ __ __
# / | __ ______/ (_) /_____/ /
# / /| |/ / / / __ / / __/ __ /
# / ___ / /_/ / /_/ / / /_/ /_/ /
# /_/ |_\__,_/\__,_/_/\__/\__,_/
#
# Linux Audit Daemon - Best Practice Configuration
# /etc/audit/audit.rules
#
# Compiled by Florian Roth
@shekkbuilder
shekkbuilder / web-servers.md
Created June 28, 2018 05:31 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

Linux可執行文件ㄉ內容分析工具

NOTE: This is a working copy. This tutorial is unfinished and may contain inaccuracies.

I've written the title of this tutorial in Chinese, as I suspect that its contents may, at first glance, appear similarly incomprehensible to the audience.

However, just as I can sketch for you the following...

可執行文件 = (可 = can) + (執行 = execute) + (文件 = file) = executable (file)

Linux可執行文件ㄉ內容分析工具

NOTE: This is a working copy. This tutorial is unfinished and may contain inaccuracies.

I've written the title of this tutorial in Chinese, as I suspect that its contents may, at first glance, appear similarly incomprehensible to the audience.

However, just as I can sketch for you the following...

可執行文件 = (可 = can) + (執行 = execute) + (文件 = file) = executable (file)

@shekkbuilder
shekkbuilder / FirmAD.sh
Created February 28, 2018 01:51 — forked from cryptolok/FirmAD.sh
Firmware Automatic Dumping & Extraction Tool
#!/bin/bash
# this tool will automate firmware extraction and unpacking using FT232R-type adaptors (like BusPirate) and a SOIC clip placed on a chip to dump
# install the necessary software:
#$ sudo apt install flashrom binwalk || echo 'git clone?'
# pump up binwalk with additional packages and libraries
#$ bash <(curl -s https://raw.githubusercontent.com/devttys0/binwalk/master/deps.sh)
# place the clip on the chip, connect it to the adaptor, which sould be connected to your PC (with drivers installed) and launch the script:
# chip => clip => adaptor => PC => script