Skip to content

Instantly share code, notes, and snippets.

View enonethreezed's full-sized avatar

n13z enonethreezed

View GitHub Profile
@enonethreezed
enonethreezed / rsyslogpipe_axfr.sh
Last active October 21, 2017 05:53
This script will read from rsyslog pipe and block any IP (if desired) that does an unauthorized AXFR petition.
#!/bin/bash
somepipe=/var/log/rsyslog.pipe
while true
do
if read line <$somepipe
then
if grep -i --line-buffered -P '^(?=.*named)(?=.*cache)(?=.*denied)' $line;
then
@enonethreezed
enonethreezed / setup_rsyslogpipe.sh
Last active October 21, 2017 07:18
Change rsyslog of Ubuntu 14 to last package from Adiscom. Create a pipe using ompipe plugin.
sudo add-apt-repository ppa:adiscon/v8-stable
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade # Force rsyslog update
# On a new terminal
logger Testing syslog interaction with new version && sudo tail -c 10000 /var/log/syslog
# Use the ompipe plugin to redirect everything and begin our tests, adding this to the end of file:
## rsyslog to fifo
@enonethreezed
enonethreezed / macfinder.sh
Last active July 14, 2021 15:34
Search MAC from ieee last data
#!/bin/sh
echo > oui.txt
if [ -z "$*" ]; then
echo "Usage: mac.sh 00:00:00"
exit
fi
wget -t 0 -c http://standards.ieee.org/develop/regauth/oui/oui.txt -O oui.txt
MAC=`echo $1|sed s/\:/\-/g`
grep -A 5 ${MAC^^} oui.txt
@enonethreezed
enonethreezed / axis_ftp_enable_telnet.rb
Last active September 27, 2023 18:54
Axis Camera remote enable Telnet via FTP
#!/usr/bin/env ruby
# This script takes advantage of a feature from this Technical Note:
# https://www.axis.com/en/techsup/cam_servers/tech_notes/telnet_support.htm
# and a default pair of user/password unchanged
# If the reboot command is not enabled as ftp command
# you must wait until some kind of camera reboot
require 'net/ftp'
@enonethreezed
enonethreezed / AnalisisDNS.py
Last active January 11, 2019 09:09
Offending domains detector
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from scapy.all import *
import sys
import calendar
import time
import syslog
def capturaDNS(paquete):
@enonethreezed
enonethreezed / fuzzer.bash
Created February 20, 2019 11:35
Bash TCP port Fuzzer
#!/bin/bash
# SIMPLE FUZZER made for a bash only CTF
# To fuzz UDP port change /dev/tcp for /dev/udp
if [ $# -lt 3 ]
then
echo "Usage: bash fuzzer.bash IP PORT SIZE"
exit
fi
@enonethreezed
enonethreezed / msf-2019.sh
Last active April 7, 2019 11:58
Metasploit GIT install
#!/bin/bash
## keep in mind this is only for RBENV
## https://www.darkoperator.com/installing-metasploit-in-ubunt
## APT things
sudo apt-get update
sudo apt-get y upgrade
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get -y install oracle-java8-installer
sudo apt-get -y install build-essential libreadline-dev libssl-dev libpq5 libpq-dev libreadline5 libsqlite3-dev libpcap-dev git-core autoconf postgresql pgadmin3 curl zlib1g-dev libxml2-dev libxslt1-dev libyaml-dev curl zlib1g-dev gawk bison libffi-dev libgdbm-dev libncurses5-dev libtool sqlite3 libgmp-dev gnupg2 dirmngr
## RBENV
import sys
from string import digits, ascii_uppercase, ascii_lowercase
from itertools import product
palabras = digits + ascii_uppercase + ascii_lowercase
dimension=int(sys.argv[1])
for combinacion in product(palabras, repeat=dimension):
print ''.join(combinacion)
#!/usr/bin/env python
# CSV HEADER DATA FROM DRILLDOWN (REPORT FROM RESILIENT)
# _time,Company,dest,IP,Country,request,User Agent,Response Code,Response Description,http_referer
# Tested:
# Python 3.7.5
import sys
import csv
import os
import urllib3