From fda4eb4f383ffeaf038a5734d6a10a5a2e310517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Tue, 3 Sep 2024 01:51:44 +0200 Subject: napad now works --- iv/orodja/napad/config | 45 ++++++++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 13 deletions(-) (limited to 'iv/orodja/napad/config') diff --git a/iv/orodja/napad/config b/iv/orodja/napad/config index c71c9bd..dc165ce 100644 --- a/iv/orodja/napad/config +++ b/iv/orodja/napad/config @@ -4,14 +4,17 @@ # ========================== # ========= COMMON ========= -export FLAG_REGEX="^[A-Z0-9]{31}=$" export SUBMISSION_PORT=21502 # ========================== # ======= EXPLOIT.SH ======= +# This regex is used to grep -Eo flags from stdout of exploits before submitting them +export FLAG_REGEX_SEARCH="[A-Za-z0-9]{31}=" + # Where can exploit.sh find submission.py. Port is a common setting. -export SUBMISSION_HOST=k.4a.si +export SUBMISSION_HOST=localhost +### export SUBMISSION_HOST=k.4a.si # Must be precise, not less than round duration. Used to calculate round id. export ROUND_DURATION=120 @@ -20,41 +23,56 @@ export ROUND_DURATION=120 export GAME_START=2024-09-01T07:00:00 # Team numbers to attack -export GAME_TEAMS={0..42} +export GAME_TEAMS="2 69" +###export GAME_TEAMS={0..10} # Flag IDs URL -export game_flag_ids_url() +game_flag_ids_url() { - echo http://10.10.0.1:8081/flagIds?service=$1&team=$2&round=$3 + echo http://splet.4a.si/dir/flagids.txt + ### echo "http://10.10.0.1:8081/flagIds?service=$1&team=$2&round=$3" } export -f game_flag_ids_url # Target IP from ID -export game_target_ip() +game_target_ip() { - echo 10.60.$1.1 + echo 10.69.69.$1 + ### echo 10.60.$1.1 } export -f game_target_ip # NOP TEAM ID export GAME_NOP_TEAM=0 -# For how many rounds are flags valid at a time? -# It doesn't make sense for this to be less than 1. +# For how many non-current rounds are flags valid at a time? +# It doesn't make sense for this to be less than 0. +# Setting to 0 means only the current round is valid. export GAME_VALID_ROUNDS=5 # Function exploit.sh should call on errors. # Args: service team pwd usr@pc message # 1 2 3 4 5 -export exploit_error_handler() +exploit_error_handler() { - echo "[exploit.sh] ERROR $1" - notify-send "exploit.sh ERROR" "$5" --urgency critical + notify-send --version > /dev/null && notify-send "exploit.sh ERROR" "$5" --urgency critical } +export -f exploit_error_handler + +# Max exploit execution time +export EXPLOIT_TIMEOUT=5 # ========================== # ====== SUBMISSION.PY ===== +# This regex is used to verify flags before storing them +# It can be .*, no problem, just make sure you're then not sending invalid flags +# to submission TCP -- you shouldn't anyways, as submission expects flags neatly +# line by line, it will not clean up random bullshit. +# Don't just send exploit stdout to submission, use exploit.sh! +export FLAG_REGEX_MATCH="^[A-Z0-9]{31}=$" + +# Where to store flags -- sqlite3 db export SUBMISSION_DB=flags.db # How much flags to send in one request. @@ -64,7 +82,8 @@ export SUBMISSION_DB=flags.db export SUBMISSION_MAX_FLAGS=2560 # PUT request, ECSC 2024 AD style -export SUBMISSION_URL=http://10.10.0.1:8080/flags +export SUBMISSION_URL=http://z.4a.si/dir/submit.php +### export SUBMISSION_URL=http://10.10.0.1:8080/flags # How many seconds to delay after a successful submission. # With 15, we send at most 4 requests per minute out of 15 allowed. -- cgit v1.2.3