Skip to content

Instantly share code, notes, and snippets.

@githubfoam
githubfoam / Vagrant box manual ubuntu
Created August 14, 2018 12:33
Vagrant box manual ubuntu
------------------------------------------------------------------------------------------
#Create first a ubuntu virtualbox VM then convert to a vagrant box
------------------------------------------------------------------------------------------
Create a new virtual machine with the following settings:
Memory Size: 1024MB (to taste)
New Virtual Disk: [Type: VMDK, Size: 40 GB]
Disable floppy
Disable audio
Disable USB
system-processor-1x
@githubfoam
githubfoam / LXD cheat sheet
Last active October 12, 2022 10:44
LXD cheat sheet
----------------------------------------------------------------------------------------------------------------
#LXD on ubuntu
#https://www.digitalocean.com/community/tutorials/how-to-set-up-and-use-lxd-on-ubuntu-16-04
sudo usermod --append --groups lxd vagrant
sudo apt-get update -y
sudo apt-get install zfsutils-linux -y
sudo lxd init
lxc list
lxc launch ubuntu:x webserver
lxc launch images:ubuntu/trusty myTrustyContainer -> download image and run container from downloaded image
@githubfoam
githubfoam / pentest cheat sheet
Last active October 6, 2026 02:59
pentest cheat sheet
----------------------------------------------------------------------------------------------------
OWASP Top Ten
https://owasp.org/www-project-top-ten/
The CWE Top 25
https://www.sans.org/top25-software-errors/
2022 CWE Top 25 Most Dangerous Software Weaknesses
https://cwe.mitre.org/top25/archive/2022/2022_cwe_top25.html
@githubfoam
githubfoam / hexdump cheat sheet
Created June 21, 2018 05:22
hexdump cheat sheet
hexdump -v -s 446 -n 64 /home/burbon/VirtualBox\ VMs/kali2017/Snapshots/2017-10-11T21-26-16-325521000Z.sav
/home/burbon/VirtualBox\ VMs/kali2017/kali2017.vdi
hexdump -s 446 -n 64 -v -e '1/1 " %02X"
hexdump -s 446 -n 64 -v -e '1/1 "%02x" 3/1 " %3d" 1/1 " %02x" 3/1 " %3d" 2/4 " %9d" "\n"' /home/burbon/VirtualBox\ VMs/kali2017/kali2017.vdi
hexdump -s 446 -n 64 -v -e '1/1 "%02x" 3/1 " %3u" 1/1 " %02x" 3/1 " %3u" 1/8 “%x" "\n"' /home/burbon/VirtualBox\ VMs/kali2017/kali2017.vdi
hexdump -s 446 -n 64 -v -e ‘1/1 ” %02X”‘ /home/burbon/VirtualBox\ VMs/kali2017/kali2017.vdi
sudo dd if=/home/burbon/VirtualBox\ VMs/kali2017/kali2017.vdi bs=512 count=1 | hexdump -C
sudo dd if=/dev/sda1 bs=512 count=1 of=mbr_sda1.bin
@githubfoam
githubfoam / windows_administrator_daily_tasks
Last active August 12, 2025 07:12
windows_administrator_daily_tasks
==========================================================================================================
problem:
The action can't be completed because the folder or a file in it is open in
another program
Close the folder or file and try again.
fix:
Option 1 – Use Resource Monitor (built-in)
@githubfoam
githubfoam / Fedora (Single Node) Kubernetes
Created June 20, 2018 09:48
Fedora (Single Node) Kubernetes
Fedora (Single Node)
The Kubernetes package provides a few services: kube-apiserver, kube-scheduler, kube-controller-manager, kubelet, kube-proxy.
These services are managed by systemd and the configuration resides in a central location: /etc/kubernetes
We will break the services up between the hosts.
https://kubernetes.io/docs/getting-started-guides/fedora/fedora_manual_config/
#fed-master, the Kubernetes master
#This host will run the kube-apiserver, kube-controller-manager, and kube-scheduler
#the master will also run etcd (not needed if etcd runs on a different host but this guide assumes that etcd and Kubernetes master run on the same host)
#fed-node will be the node and run kubelet, proxy and docker.
@githubfoam
githubfoam / Install Bamboo
Created June 20, 2018 09:31
Install Bamboo
#Install Bamboo 6.2 Ubuntu
sudo apt-get install default-jdk
echo $JAVA_HOME
#Bamboo runs as the user it is invoked under and can potentially be abused.create a dedicated user to run Bamboo in Linux
sudo /usr/sbin/useradd --create-home --home-dir /usr/local/bamboo --shell /bin/bash bamboo
sudo su - bamboo
#Create the installation directory <Bamboo installation directory> Extract the downloaded file
@githubfoam
githubfoam / contiki + cooja install
Created June 20, 2018 09:27
contiki + cooja install
#source code install 32x
wget https://github.com/contiki-os/contiki/archive/3.0.zip
arc
mv contiki-3.0 contiki
sudo apt-get install build-essential binutils-msp430 gcc-msp430 msp430-libc msp430mcu mspdebug gcc-arm-none-eabi gdb-arm-none-eabi openjdk-8-jdk openjdk-8-jre ant libncurses5-dev
#mspsim directory is empty.
cd contiki/tools/cooja/mspsim
git clone https://github.com/contiki-os/mspsim
@githubfoam
githubfoam / foren6 installation
Created June 20, 2018 09:24
foren6 installation
sudo apt-get install libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc libusb-1.0-0-dev
git clone https://github.com/cetic/foren6.git
cd foren6
make
sudo make install
#source code install 64x
sudo apt-get install libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc libusb-1.0-0-dev
git clone https://github.com/cetic/foren6.git
cd foren6
@githubfoam
githubfoam / CheckpointGW R77.30 Graylog Syslog Integration
Last active June 20, 2018 09:17
CheckpointGW R77.30 Graylog Syslog Integration
#Log in expert mode
# echo $FWDIR
/opt/CPsuite-R77/fw1
# ls -l /opt/CPsuite-R77/fw1/log/
#vi /etc/rc.d/init.d/cpboot
fw log -f -t -n -l $FWDIR/fw1/log/fw.adtlog|logger -p local5.info -t CP_FireWALL &
fw log -f -t -n -l $FWDIR/fw1/log/fw.log|logger -p local5.info -t CP_FireWALL &
fw log -f -t -n -l $FWDIR/fw1/log/fwui.log|logger -p local5.info -t CP_FireWALL &
reboot