Skip to content

Instantly share code, notes, and snippets.

View kiraitachi's full-sized avatar
🤖
From Z3R0 to H3R0

Adel de la Llave kiraitachi

🤖
From Z3R0 to H3R0
View GitHub Profile
@kiraitachi
kiraitachi / backup_raspberrypi.md
Created January 8, 2024 10:08 — forked from eliroca/backup_raspberrypi.md
Use ssh and dd to Remotely Backup a Raspberry Pi

You can make a backup of your pi and have the backup written to your regular PC all from the command line.

From your local machine, run the remote backup command:

ssh pi@xx.x.x.xx "sudo dd if=/dev/mmcblk0 bs=1M | gzip -" | dd of=/path/to/pibackup.gz

After 47min 21sec, in my case, got this as output:

30436+1 records in
30436+1 records out
31914983424 bytes (32 GB, 30 GiB) copied, 2830.89 s, 11.3 MB/s
@kiraitachi
kiraitachi / Firewalld GeoIP firewall script
Created November 21, 2022 00:04 — forked from Pandry/Firewalld GeoIP firewall script
Block countries IPs via Firewalld
#!/bin/bash
##
# Name: GeoIP Firewall script
# Author: Pandry
# Version: 0.1.1
# Description: This is a simple script that will set up a GeoIP firewall blocking all the zones excecpt the specified ones
# it is possible to add the whitelisted zones @ line 47
# Additional notes: Usage of [iprange](https://github.com/firehol/iprange) is suggested
# for best performances
@kiraitachi
kiraitachi / readme.md
Created September 8, 2020 19:20 — forked from benstr/readme.md
Gist Markdown Cheatsheet

#Heading 1 ##Heading 2 ###Heading 3 ####Heading 4 #####Heading 5 ######Heading 6


Paragraph

@kiraitachi
kiraitachi / elk.sh
Created July 1, 2019 12:17 — forked from dalmosantos/elk.sh
Bash Script to Install Elastic Search, Logstash and Kibana
#!/bin/bash
#title :createenvironment-elk.sh
#description :shell script to create environments (elasticsearch,logstash and kibana)
#date :2018-04-19
#usage :sudo ./elk.sh
#used version :6.2.4
#tested-version :1.2.0
#tested-distros :CentOS 7.4
# Checking whether user has enough permission to run this script
@kiraitachi
kiraitachi / EternalBlue y DoublePulsar.md
Last active February 14, 2019 14:19
Metasploit MS17-010 exploiting with Merlin.

1. Comprueba si eres vulnerable para MS17-010

Para verificar que no se trataba de un falso positivo procedemos a utilizar un módulo de metasploit cuyo objetivo es testear que realmente este servidor es vulnerable. Se trata del módulo “auxiliary/scanner/smb/smb_ms17_010”.

Para lanzarlo correctamente, tenemos que configurar las distintas opciones que nos proporciona este módulo, como rhosts en el que pondremos la dirección IP del servidor que queremos testear y rport (por defecto 445).

Metasploit

Como podemos comprobar en la imagen, no se trata de un falso positivo, sino que efectivamente estamos ante un host, a priori, VULNERABLE.

@kiraitachi
kiraitachi / SyncForkMaster.md
Last active March 12, 2019 22:36
Sync Forks with Master Repo

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream