diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2024-09-01 00:15:18 +0200 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2024-09-01 00:15:18 +0200 |
commit | b94bef6e820fec0ffde7971d3134d5738c1521d1 (patch) | |
tree | 2ae275e51629ae9979a7303f5605bb4988b30234 /iv/orodja/napad/exploit.sh | |
parent | hacker gets hacked, double fdput vuln (diff) | |
download | r-b94bef6e820fec0ffde7971d3134d5738c1521d1.tar r-b94bef6e820fec0ffde7971d3134d5738c1521d1.tar.gz r-b94bef6e820fec0ffde7971d3134d5738c1521d1.tar.bz2 r-b94bef6e820fec0ffde7971d3134d5738c1521d1.tar.lz r-b94bef6e820fec0ffde7971d3134d5738c1521d1.tar.xz r-b94bef6e820fec0ffde7971d3134d5738c1521d1.tar.zst r-b94bef6e820fec0ffde7971d3134d5738c1521d1.zip |
Diffstat (limited to 'iv/orodja/napad/exploit.sh')
-rwxr-xr-x | iv/orodja/napad/exploit.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/iv/orodja/napad/exploit.sh b/iv/orodja/napad/exploit.sh new file mode 100755 index 0000000..1111b00 --- /dev/null +++ b/iv/orodja/napad/exploit.sh @@ -0,0 +1,23 @@ +#!/bin/sh +if [ x$1 = x ] +then +echo >&2 <<EOF +No command. Subcommands: + $0 once <exploit> # runs an exploit once, print captured flags + $1 loop <exploit> # runs an exploit in a loop once per round +<exploit> is an executable file. Flags, grepped from stdout, are submitted. +It is called for every target. Args are target IP and flag IDs JSON object. + Example: <exploit> 10.1.2.3 '{"user": "root", "pass": "hunter2"}' +Flag IDs are also available in the environment as variables FLAG_ID_<key>: + {"user": "root", "pass": "hunter2"} will be in environment as vars + FLAG_ID_user=root and FLAG_ID_pass=hunter2 +In loop mode, exploit is first exec'd rapidly for still valid old rounds. +Max execution time is $EXPLOIT_TIMEOUT seconds (EXPLOIT_TIMEOUT in config) +Exploits are NOT executed in parallel. +Make sure that your system time is set CORRECTLY TO THE SECOND, it's used + to get the current round id. Current time: `date`. +Configuration values are also available in environment of exploits. +EOF + exit 1 +fi +set -xeuo pipefail |