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 / 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.
@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 / 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
#!/bin/sh
# Basic MacPorts maintenance
sudo port selfupdate ; \
sudo port upgrade outdated ; \
sudo port uninstall inactive ; \
sudo port uninstall leaves
#!/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
@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
#Descargamos el repo principal
git clone ${URL_REPO_PRINCIPAL}
#Añadimos el primer fork
git remote add ${REMOTE_NAME} ${URL_REPO_FORK}
#Descargamos los cambios del fork
git fetch ${REMOTE_NAME}
#Vemos los cambios
@Kr0n0
Kr0n0 / init.gcloud-init
Created March 12, 2019 03:38
Basic cloud-init for installing Google Cloud SDK, Tensorflow GPU Docker Image and KubeCTL
#cloud-config
write_files:
- path: /etc/apt/sources.list.d/google-cloud-sdk.list
content : deb http://packages.cloud.google.com/apt cloud-sdk-bionic main
runcmd:
- 'docker pull tensorflow/tensorflow:latest-gpu-py3 '
- 'curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -'
- 'apt-get update && apt-get install -y google-cloud-sdk kubectl'
- 'gcloud --quiet components update'
final_message: "Cloud-init finished."
#!/bin/sh
ffmpeg -i $1 -vf "select=gt(scene\,0.5), scale=640:360" -vsync vfr $1-%03d.png
@Kr0n0
Kr0n0 / frida_magist_selinux.sh
Created May 16, 2019 05:31
Magisk SELinux Policy for FRIDA without Permissive Mode
#!/system/xbin/busybox sh
# Enabling Magisk SELinux Policy for using FRIDA without permissive mode
# https://serializethoughts.com/2018/07/23/frida-magisk-and-selinux/
magiskpolicy --live "allow zygote magisk process *"
magiskpolicy --live "allow system_server magisk process *"
magiskpolicy --live "allow radio magisk process *"