Skip to content

Instantly share code, notes, and snippets.

@maugern
maugern / gist:5ca384f996c2403d3f62905cad635ed5
Last active September 1, 2023 08:41 — forked from Atavic/gist:c6413717d9c9798e2cd906e68d937361
windows 10 connection endpoints
Endpoints for Windows 10 Home
Destination Protocol Description
*.tlu.dl.delivery.mp.microsoft.com.c.footprint.net HTTP Enables connections to Windows Update.
*.wac.phicdn.net HTTP Used by the Verizon Content Delivery Network to perform Windows updates.
*.1.msftsrvcs.vo.llnwi.net HTTP Used for Windows Update downloads of apps and OS updates.
*.c-msedge.net HTTP Used by OfficeHub to get the metadata of Office apps.
*.delivery.dsp.mp.microsoft.com.nsatc.net TLSv1.2 Enables connections to Windows Update.
*.dscd.akamai.net HTTP Used to download content.
*.dspg.akamaiedge.net HTTP Used to check for updates to maps that have been downloaded for offline use.
@maugern
maugern / elf2shell.sh
Last active July 31, 2019 11:49
ELF to shellcode
#!/bin/bash
# Usage: elf2shell.sh a.out
GREEN='\033[1;32m'
RED='\033[1;31m'
YELLOW='\033[1;33m'
NC='\033[0m'
SHELLCODE=$(objdump -d $1 | grep '[0-9a-f]:'|grep -v 'file'|cut -f2 -d:|cut -f1-6 -d' '|tr -s ' '|tr '\t' ' '|sed 's/ $//g'|sed 's/ /\\\\x/g'|paste -d '' -s |sed 's/^/\"/'|sed 's/$/\"/g' | sed 's/\\\\/\\/g')
if [[ $SHELLCODE =~ ^\"(\\x[0-9a-fA-F]{2})+\"$ ]]; then
@maugern
maugern / minmax.sh
Last active November 9, 2018 11:56
Tic-Tac-Toe in bash
#!/bin/bash
# Nicolas Mauger, ESD17
# SHALL WE PLAY A GAME ?
PLUS_INFINITY=65536
MINUS_INFINITY=-65536
tab=( 0 0 0 0 0 0 0 0 0 )
@maugern
maugern / BofPattern.pl
Created May 22, 2018 13:55
Buffer Overflow Pattern genenerator written by Wireghoul (http://www.justanotherhacker.com)
#!/usr/bin/perl
# Buffer Overflow Pattern generator v 1.0
# Written by Wireghoul - http://www.justanotherhacker.com
use strict;
use warnings;
sub generate {
my $len=shift;
my $pattern='Aa0';
my $out = '';
@maugern
maugern / jrshell.jsp
Created April 24, 2018 10:37
Java servlet page to open a reverse shell. Try two way : in the jsp context and via tcp socket.
<%
/*
* Copyright (C) 2018 Nicolas Mauger - JSP payload
* Two way of reverse shell : in html and with TCP port.
*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <nicolas@mauger.cafe> wrote this file. As long as you retain this notice
* you can do whatever you want with this stuff. If we meet some day, and you
* think this stuff is worth it, you can buy me a beer in return. Nicolas.
@maugern
maugern / arp-watchdog.sh
Created April 14, 2018 12:55
arp-watchdog, an ARP tables guard.
#!/bin/bash
#
# arp-watchdog, an ARP tables guard create for CDAISI workshop
# Copyright (C) 2018, Nicolas Mauger <nicolas.mauger@etu.univ-valenciennes.fr>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
@maugern
maugern / synscan.py
Last active April 16, 2019 11:17
SYN scan with scapy
#!/usr/bin/env python3
# Nicolas Mauger
import argparse
from scapy.all import *
parser = argparse.ArgumentParser("Process some SYN scan", add_help="True")
# Optional args
@maugern
maugern / listarpresponse.py
Last active April 10, 2018 11:32
Sniffing ARP response
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from scapy.all import *
# Sniffing ARP response
counter = 0
def display_arp(packet):
@maugern
maugern / easy-iptables.sh
Last active March 29, 2018 15:40
Iptables configurator for idiots.
#!/bin/bash
#
# easy-iptables, iptables simplification for CDAISI workshop
# Copyright (C) 2018, Nicolas Mauger <nicolas.mauger@etu.univ-valenciennes.fr>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
@maugern
maugern / edt.py
Last active June 9, 2019 21:53
Fetch your calendar from the Valenciennes university website.
#!/usr/bin/env python3.6
#
# Navigation with selenium on Firefox in the Valenciennes university website.
# Copyright (C) 2018 Nicolas Mauger <nicolas.mauger@etu.univ-valenciennes.fr>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#