Skip to content

Instantly share code, notes, and snippets.

View msmagnanijr's full-sized avatar

Mauricio Magnani Jr msmagnanijr

  • Red Hat, Inc
  • Brazil
View GitHub Profile
@msmagnanijr
msmagnanijr / Blog: Installing Docker.md
Created January 17, 2023 19:09 — forked from sshushliapin/Blog: Installing Docker.md
Docker in PowerShell on Windows 10

Using Docker on Windows 10 (AU)

There are a lot of good reasons to use Docker. Right now, my reason is that I need to work with PowerShell on Linux, and with Windows 10 anniversary update, Windows containers now support Nano Server as well (which is the other logical place to test the new open source PowerShell).

Currently, Docker supports running Linux images or Windows images in their container service, but not both in the same server, so to get both, we need to first install Docker using the installer, (which handles dependencies like requiring Hyper-V and Containers) and then install the most recent version of the Windows service separately, and configure them to run together.

Start by installing the Linux Container server

Here's a full explanation, but you could just [run the whole script](#file-install-d

@msmagnanijr
msmagnanijr / README.md
Created August 2, 2022 13:38 — forked from squidpickles/README.md
Multi-platform (amd64 and arm) Kubernetes cluster

Multiplatform (amd64 and arm) Kubernetes cluster setup

The official guide for setting up Kubernetes using kubeadm works well for clusters of one architecture. But, the main problem that crops up is the kube-proxy image defaults to the architecture of the master node (where kubeadm was run in the first place).

This causes issues when arm nodes join the cluster, as they will try to execute the amd64 version of kube-proxy, and will fail.

It turns out that the pod running kube-proxy is configured using a DaemonSet. With a small edit to the configuration, it's possible to create multiple DaemonSets—one for each architecture.

Steps

Follow the instructions at https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/ for setting up the master node. I've been using Weave Net as the network plugin; it see

@msmagnanijr
msmagnanijr / docker-fedora-33-dns.md
Created February 7, 2022 18:04 — forked from RedRoserade/docker-fedora-33-dns.md
Working around Docker DNS issues on Fedora 33. Adapted from https://stackoverflow.com/a/60113249

Problem

Docker on Fedora 33 has issues with systemd-resolved. This causes DNS issues when, for example, connecting VPNs, because it'll use the wrong DNS server, especially if you have several configured. The one from systemd-resolved is ignored since it's a 127.0.0.X address.

This causes containers to not be able to resolve addresses on the private network (VPN).

Solution

Use dnsmasq to listen on docker0 and forward DNS requests to systemd-resolved running on 127.0.0.53.

@msmagnanijr
msmagnanijr / delete-git-recursively.sh
Created December 30, 2021 01:12 — forked from facelordgists/delete-git-recursively.sh
Recursively remove .git folders
( find . -type d -name ".git" && find . -name ".gitignore" && find . -name ".gitmodules" ) | xargs rm -rf
@msmagnanijr
msmagnanijr / enumit.py
Created November 24, 2021 01:59 — forked from phi10s/enumit.py
A simple, hacky python script to automate initial enumeration of hosts, for use by OSCP/general infosec students and in virtual labs. Some component scripts may be too loud and intrusive for use in actual pentests. Only use on hosts you own/have permission to test.
#!/usr/bin/python
import os
import sys
import subprocess
import random
import re
from time import sleep
import shlex
from ipaddress import ip_address
from termcolor import colored,cprint
@msmagnanijr
msmagnanijr / GoogleHackMasterList.txt
Created October 14, 2021 18:55 — forked from gabsoftware/GoogleHackMasterList.txt
The definitive super list for "Google Hacking".
admin account info" filetype:log
!Host=*.* intext:enc_UserPassword=* ext:pcf
"# -FrontPage-" ext:pwd inurl:(service | authors | administrators | users) "# -FrontPage-" inurl:service.pwd
"AutoCreate=TRUE password=*"
"http://*:*@www” domainname
"index of/" "ws_ftp.ini" "parent directory"
"liveice configuration file" ext:cfg -site:sourceforge.net
"parent directory" +proftpdpasswd
Duclassified" -site:duware.com "DUware All Rights reserved"
duclassmate" -site:duware.com
@msmagnanijr
msmagnanijr / windows_hardening.cmd
Created October 12, 2021 19:12 — forked from th3gundy/windows_hardening.cmd
Script to perform some hardening of Windows OS
:: Windows 10 Hardening Script
:: This is based mostly on my own personal research and testing. My objective is to secure/harden Windows 10 as much as possible while not impacting usability at all. (Think being able to run on this computer's of family members so secure them but not increase the chances of them having to call you to troubleshoot something related to it later on). References for virtually all settings can be found at the bottom. Just before the references section, you will always find several security settings commented out as they could lead to compatibility issues in common consumer setups but they're worth considering.
:: Obligatory 'views are my own'. :)
:: Thank you @jaredhaight for the Win Firewall config recommendations!
:: Thank you @ricardojba for the DLL Safe Order Search reg key!
:: Thank you @jessicaknotts for the help on testing Exploit Guard configs and checking privacy settings!
:: Best script I've found for Debloating Windows 10: https://github.com/Sycnex/Windows10Debloater
:
@msmagnanijr
msmagnanijr / tomcat_bruteforce.py
Created October 12, 2021 19:09 — forked from th3gundy/tomcat_bruteforce.py
Tomcat manager console bruteforce
"""
Tomcat bruteforce
Author: @itsecurityco
"""
import os
import sys
import getopt
import base64
import requests
@msmagnanijr
msmagnanijr / increase_root_fedora.md
Created June 11, 2021 00:00 — forked from 181192/increase_root_fedora.md
How to increase the root partition size on Fedora

How to increase the root partition size on Fedora

Boot up with an Fedora Live USB stick.

  1. Run vgs to check if there's any space:
$ sudo vgs
  VG     #PV #LV #SN Attr   VSize    VFree
  fedora   1   3   0 wz--n- <237.28g    0 
@msmagnanijr
msmagnanijr / Jenkinsfile.groovy
Created May 10, 2020 16:54 — forked from Faheetah/Jenkinsfile.groovy
Jenkinsfile idiosynchrasies with escaping and quotes
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER' // 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"' // 1
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"