Skip to content

Instantly share code, notes, and snippets.

View Kr0n0's full-sized avatar
🐧
Working from home

Carlos Crisóstomo Vals Kr0n0

🐧
Working from home
View GitHub Profile
@Kr0n0
Kr0n0 / delete_local_snapshots.sh
Created January 31, 2019 01:09
Delete local APFS Snapshots (OSX)
#!/bin/sh
for LISTA in $(tmutil listlocalsnapshots / | cut -d'.' -f 4);
do
sudo tmutil deletelocalsnapshots $LISTA
done
#!/bin/sh
# Pivoting with three hops between networks with triple tunnelling
#
# Map :
# Local machine -> Machine 1 -> Machine 2 -> Machine 3
# (Local) (Internet) (Intranet 1) (Intranet 2)
# :9999 <- :1111 <- :2222 <- :3333
# Local data port
#!/bin/sh
# Basic MacPorts maintenance
sudo port selfupdate ; \
sudo port upgrade outdated ; \
sudo port uninstall inactive ; \
sudo port uninstall leaves
@Kr0n0
Kr0n0 / nmap_ssh_proxychains.sh
Created January 9, 2019 06:21
Use NMap to scan a second machine using a SSH SOCKS4 proxy and Proxychains
#!/bin/sh
# Machine 1 - Pivoting machine with root access
IP_MACHINE_1=$1
# Machine 2 - Machine for nmap scanning using proxy
IP_MACHINE_2=$2
# 1. Create socks4 proxy with ssh on the first machine port 9000
ssh -D 9000 root@${IP_MACHINE_1}
# 2. Add the proxy to the proxychains conf
@Kr0n0
Kr0n0 / check_machines_up_ping.sh
Created January 9, 2019 06:16
Check which machines are up by pinging all the network
#!/bin/sh
IP_RANGE=192.168.1.
for i in $(seq 1 254); do (ping ${IP_RANGE}$i -c 1 -w 5 >/dev/null && echo "${IP_RANGE}$i" &) ;done
@Kr0n0
Kr0n0 / linuxprivchecker.py
Created April 23, 2017 11:32 — forked from sh1n0b1/linuxprivchecker.py
linuxprivchecker.py -- a Linux Privilege Escalation Check Script
#!/usr/env python
###############################################################################################################
## [Title]: linuxprivchecker.py -- a Linux Privilege Escalation Check Script
## [Author]: Mike Czumak (T_v3rn1x) -- @SecuritySift
##-------------------------------------------------------------------------------------------------------------
## [Details]:
## This script is intended to be executed locally on a Linux box to enumerate basic system info and
## search for common privilege escalation vectors such as world writable files, misconfigurations, clear-text
## passwords and applicable exploits.