docker-compose up- Find the UDP port that dnsmasq is listening on (
docker ps) - Send a DNS query.
dig @127.0.0.1 -p <dnsmasq port> A consul.service.consul(This works and resolves to 127.0.0.1)dig @127.0.0.1 -p <dnsmasq port> DS consul.service.consul(This does not work and times out in dig)
- Have a look at your consul and dnsmasq logs. You have now succesfully DoS'ed consul and dnsmasq DNS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Call as docker-intercept <container-name> <port-inside-container> <port-on-host> | |
| set -e | |
| container="$1" | |
| container_port="$2" | |
| host_port="$3" | |
| network_id="$(docker inspect "$container" | jq '.[0].NetworkSettings.Networks | to_entries | .[0].value.NetworkID' -r)" | |
| container_ip="$(docker inspect "$container" | jq '.[0].NetworkSettings.Networks | to_entries | .[0].value.IPAddress' -r)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -e | |
| data="$(curl -A "delay-notification/1.0 (irail@vbgn.be)" https://api.irail.be/connections/\?from\=$IRAIL_FROM\&to\=$IRAIL_TO\&format\=json\&time=$IRAIL_TIME)" | |
| connection="$(echo "$data" | jq '[.connection[] | select(has("vias") == false and .departure.left == "0")][0]')" # First one that goes straight through and has not left | |
| delay="$[ $(echo "$connection" | jq '.departure.delay' -r) / 60 ]" | |
| train_id="$(echo "$connection" | jq '.departure.vehicle' -r)" | |
| departure_time_unix="$(echo "$connection" | jq '(.departure.delay|tonumber) + (.departure.time|tonumber)' -r)" | |
| departure_time="$(date --date=@$departure_time_unix +%R)" | |
| canceled="$(echo "$connection" | jq '.departure.canceled' -r)" |
OlderNewer