Skip to content

Instantly share code, notes, and snippets.

View zyuzuguldu's full-sized avatar
πŸ›°οΈ
Hijacking

zahid zyuzuguldu

πŸ›°οΈ
Hijacking
View GitHub Profile
@zyuzuguldu
zyuzuguldu / syncrepos.sh
Created November 5, 2016 09:33 — forked from brianredbeard/syncrepos.sh
Reposync - A better tool than mrepo. Use this to sync down all channels a RHEL system is subscribed to and turn them into locally exposed yum repositories.
#!/bin/bash
# This tool can be used to sync down Red Hat based packages from RHN using only Red Hat shipped tools
# Brian "Red Beard" Harrington <[email protected]>
# To satisfy the pre-reqs for this script install the following two rpms:
# yum-utils
# createrepo
download_dir="/var/www/html/RHN"
/usr/bin/reposync --gpgcheck -m --download-metadata -l -p ${download_dir}/ >> /var/log/reposync.log 2>&1
@zyuzuguldu
zyuzuguldu / infra-secret-management-overview.md
Created March 18, 2017 19:01 — forked from maxvt/infra-secret-management-overview.md
Infrastructure Secret Management Software Overview

Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.

This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.

There is a companion feature matrix of various tools. Comments are welcome in the same manner.

@zyuzuguldu
zyuzuguldu / tuning_storm_trident.asciidoc
Created April 6, 2017 09:16 — forked from mrflip/tuning_storm_trident.asciidoc
Notes on Storm+Trident tuning

Tuning Storm+Trident

Tuning a dataflow system is easy:

The First Rule of Dataflow Tuning:
* Ensure each stage is always ready to accept records, and
* Deliver each processed record promptly to its destination
@zyuzuguldu
zyuzuguldu / RELK.sh
Created April 19, 2017 08:46 — forked from adionditsak/RELK.sh
Install the ELK stack (with Redis) with one script for the central log server (CentOS 6.5).
#/bin/bash
##########################################################
### INTRODUCTION
##########################################################
: '
Install and configure R (Redis) + ELK server from scratch on CentOS 6.5.
* Logstash version 1.4.2
* Elasticsearch version 1.3.2
β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
*** Initial setup before Ambari setup ***
β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
OS checks:
yum install wget
@zyuzuguldu
zyuzuguldu / gist:57d48f97d1e8a025689e76720d5d9abb
Created November 12, 2018 19:09
TP-LINK T4U linux (debian) install
#!/bin/bash
wget https://github.com/abperiasamy/rtl8812AU_8821AU_linux/archive/master.zip
unzip rtl8812AU_8821AU_linux-master.zip -x rtl8812AU_8821AU_linux-master
cd rtl8812AU_8821AU_linux-master
make
sudo make install
sudo modprobe rtl8812au
sudo apt-get update
sudo apt-get install dkms
sudo cp -R . /usr/src/rtl8812AU_8821AU_linux-1.0

Faking DNS from userland

To give false DNS responses from userland we need to handle different type of syscalls : gethostbyname(), gethostbyname2(), getaddrinfo(), getnameinfo(), etc. To cover all these cases, and to prevent leaks to real dns servers, we will use two libraries : libresolv_wrapper and libnss_wrapper.

Installation

Install resolv_wrapper and nss_wrapper, either from sources or from your favorite Linux distribution.

@zyuzuguldu
zyuzuguldu / windows_hardening.cmd
Created April 20, 2019 15:05 — forked from jaredhaight/windows_hardening.cmd
Script to perform some hardening of Windows OS.
::
::#######################################################################
::
:: Change file associations to protect against common ransomware attacks
:: Note that if you legitimately use these extensions, like .bat, you will now need to execute them manually from cmd or powershell
:: Alternatively, you can right-click on them and hit 'Run as Administrator' but ensure it's a script you want to run :)
:: ---------------------
ftype htafile="%SystemRoot%\system32\NOTEPAD.EXE" "%1"
ftype WSHFile="%SystemRoot%\system32\NOTEPAD.EXE" "%1"
ftype batfile="%SystemRoot%\system32\NOTEPAD.EXE" "%1"
@zyuzuguldu
zyuzuguldu / reclaimWindows10.ps1
Created April 20, 2019 15:10 — forked from alirobe/reclaimWindows10.ps1
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <[email protected]>
# Modified by: alirobe <[email protected]> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
@zyuzuguldu
zyuzuguldu / pcap2wav
Created December 15, 2019 18:16 — forked from jayluxferro/pcap2wav
Convert raw PCAP files into a .wav file
#!/bin/bash
#
# pcap2wav
# Original Author: Michael Collins <[email protected]>
#Standard disclaimer: batteries not included, your mileage may vary...
# Updated by Avi Marcus <[email protected]>
#
# Accepts arg of pcap file w/only 2 RTP streams
# Creates a .<codec> file and a .wav file
# For codecs other than PCMA and PCMU the script calls fs_cli and does a little recording to create the wav file(s)