Skip to content

Instantly share code, notes, and snippets.

View robertobarreda's full-sized avatar

Roberto Barreda robertobarreda

View GitHub Profile
@robertobarreda
robertobarreda / Vagrantfile
Created July 7, 2020 10:06
JEDI SI - CTF juice shop
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "debian/buster64"
config.vm.network "forwarded_port", guest: 3000, host: 3000
# config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.provider "virtualbox" do |vb|
vb.memory = "256"
end
@robertobarreda
robertobarreda / wireguard-install.sh
Last active July 7, 2020 10:21
wireguard-install.sh
#!/bin/bash
function addClient() {
# Load params
source /etc/wireguard/params
if [[ $SERVER_PUB_IP =~ .*:.* ]]; then
echo "IPv6 Detected"
ENDPOINT="[$SERVER_PUB_IP]:$SERVER_PORT"
else
@robertobarreda
robertobarreda / access.log
Last active February 3, 2020 21:21
PAC 4 (forensics)
91.237.86.89 - - [21/Aug/2013:15:39:34 +0200] "GET /login.php HTTP/1.1" 200 291 "-" "Opera/9.80 (Macintosh; Intel Mac OS X 10.6.7; U; en) Presto/2.8.131 Version/11.10"
87.217.164.200 - - [21/Aug/2013:15:39:35 +0200] "GET /login.php HTTP/1.1" 200 291 "-" "Mozilla/5.0 (Linux; U; Android 4.0.2; en-us; Galaxy Nexus Build/ICL53F) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30"
176.97.248.131 - - [21/Aug/2013:15:39:38 +0200] "GET /login.php HTTP/1.1" 200 291 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.16 SUSE/10.0.626.0 (KHTML, like Gecko) Chrome/10.0.626.0 Safari/534.16"
78.109.24.225 - - [21/Aug/2013:15:39:40 +0200] "GET /login.php HTTP/1.1" 200 291 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16"
195.88.28.66 - - [21/Aug/2013:15:39:42 +0200] "GET /login.php HTTP/1.1" 200 291 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_7_0; en-US) AppleWebKit/534.21 (KHTML, like Gecko) Chrome/11.0.678.0
@robertobarreda
robertobarreda / 24022007.txt
Last active February 3, 2020 21:23
JEDI SI PAC2 (information gathering)
This file has been truncated, but you can view the full file.
Date flow start Duration Proto Src IP Addr:Port Dst IP Addr:Port Packets Bytes Flows
2007-02-24 04:54:54.917 42.682 UDP 84.77.114.176:57024 -> 10.16.54.6:19522 2 58 1
2007-02-24 04:55:06.552 15.202 UDP 84.77.114.176:57024 -> 10.16.54.6:18278 2 58 1
2007-02-24 04:54:54.806 13.998 UDP 84.77.114.176:57024 -> 10.16.54.6:31991 2 58 1
2007-02-24 04:54:52.434 96.322 UDP 89.106.22.3:54606 -> 10.16.54.6:38662 166 4814 1
2007-02-24 04:55:03.714 72.352 UDP 84.77.114.176:57024 -> 10.16.54.6:34016 2 58 1
2007-02-24 04:54:34.830 91.019 UDP 213.144.110.130:3656 -> 10.16.54.6:4027 160 4640 1
2007-02-24 04:54:54.941 80.638 UDP 84.77.114.176:57024 -> 10.16.54.6:34197 2 58 1
2007-02-24 04:52:22.421 232.040 UDP 207.150.178.78:1225 -> 10.16.54.6:44569 213 6177 1
2007-02-24 04:53:04.149 160.7
@robertobarreda
robertobarreda / Vagrantfile
Last active July 3, 2020 07:16
JEDI SI PAC3 (Web Vulnerabilities)
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "debian/buster64"
config.vm.network "forwarded_port", guest: 9090, host: 9090
# config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.provider "virtualbox" do |vb|
vb.memory = "256"
end
@robertobarreda
robertobarreda / Vagrantfile
Last active June 27, 2020 15:18
JEDI SI PAC1 (system security)
Vagrant.configure("2") do |config|
config.vm.box = "debian/buster64"
# config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.provider "virtualbox" do |vb|
vb.memory = "256"
end
config.vm.define :proxy, primary: true do |proxy|
proxy.vm.hostname = "proxy"
@robertobarreda
robertobarreda / tdigest.py
Last active September 29, 2015 12:41
Efficient percentile estimation of streaming or distributed data - https://github.com/CamDavidsonPilon/tdigest
from __future__ import print_function
from random import choice
from bintrees import FastRBTree as RBTree
import pyudorandom
from itertools import chain
class Centroid(object):
def __init__(self, mean, count):
@robertobarreda
robertobarreda / count_min_sketch.py
Created July 22, 2015 13:17
CountMinSketch is an implementation of the count min sketch algorithm that probabilistically counts string frequencies.
from __future__ import division
from xxhash import xxh32
import numpy as np
DTYPE = np.int64
class CountMinSketch(object):
@robertobarreda
robertobarreda / quantile.py
Last active December 28, 2021 13:02
Python Implementation of Graham Cormode and S. Muthukrishnan's Effective Computation of Biased Quantiles over Data Streams in ICDE’05 (https://github.com/matttproud/python_quantile_estimation)
#!/usr/bin/python
"""
Copyright 2013 matt.proud@gmail.com (Matt T. Proud)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/* crc64.c -- compute CRC-64
* Copyright (C) 2013 Mark Adler
* Version 1.4 16 Dec 2013 Mark Adler
*/
/*
This software is provided 'as-is', without any express or implied
warranty. In no event will the author be held liable for any damages
arising from the use of this software.