From e97bfa75536e23748eb7acf3da8d89c3fc6aee77 Mon Sep 17 00:00:00 2001 From: "Z. Cliffe Schreuders" Date: Thu, 4 Jan 2018 12:43:56 +0000 Subject: [PATCH] lab update --- .../hacker_vs_hackerbot_2/templates/intro.md.erb | 2 +- .../templates/live_analysis_1.xml.erb | 7 ++++++- .../unix/hackerbot/files/opt_hackerbot/hackerbot.rb | 3 +++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/generators/structured_content/hackerbot_config/hacker_vs_hackerbot_2/templates/intro.md.erb b/modules/generators/structured_content/hackerbot_config/hacker_vs_hackerbot_2/templates/intro.md.erb index 473052729..59b1e3048 100644 --- a/modules/generators/structured_content/hackerbot_config/hacker_vs_hackerbot_2/templates/intro.md.erb +++ b/modules/generators/structured_content/hackerbot_config/hacker_vs_hackerbot_2/templates/intro.md.erb @@ -10,7 +10,7 @@ In the unlikely event you experience technical issues with our infrastructure du * If a VM looses its IP addresses (particularly the IDS server), simply run `sudo ifconfig eth1 *IP_ADDRESS*`, where `*IP_ADDRESS*` is the expected IP address (listed in the section below). -* If you experience any technical issues, which you believe to be outside your control, let us know before you leave the room. However, keep in mind we won't point you in the right direction of the answers during the test. +* If you experience any technical issues, which you believe to be outside your control, let us know before you leave the room. However, keep in mind we won't give hints for the actual test challenges. ## Getting started ### VMs in this lab diff --git a/modules/generators/structured_content/hackerbot_config/hacker_vs_hackerbot_2/templates/live_analysis_1.xml.erb b/modules/generators/structured_content/hackerbot_config/hacker_vs_hackerbot_2/templates/live_analysis_1.xml.erb index 8cffe9d2b..00918991c 100644 --- a/modules/generators/structured_content/hackerbot_config/hacker_vs_hackerbot_2/templates/live_analysis_1.xml.erb +++ b/modules/generators/structured_content/hackerbot_config/hacker_vs_hackerbot_2/templates/live_analysis_1.xml.erb @@ -1,6 +1,6 @@ <% $rand_port_live = rand(65535) %> - sshpass -p <%= $root_password %> ssh -oStrictHostKeyChecking=no root@<%= $web_server_ip %> 'setsid nc -l -p <%= $rand_port_live %> &' & sleep 3; killall -9 ssh; echo 'OK' + sshpass -p <%= $root_password %> ssh -oStrictHostKeyChecking=no root@<%= $web_server_ip %> 'setsid nc -l -p <%= $rand_port_live %> & sleep 1' & sleep 3; killall -9 ssh; echo 'OK' false @@ -12,6 +12,11 @@ Ok, answer this. + + OK.. + Ok, answer this. + + Ok... diff --git a/modules/utilities/unix/hackerbot/files/opt_hackerbot/hackerbot.rb b/modules/utilities/unix/hackerbot/files/opt_hackerbot/hackerbot.rb index 47e9961d4..62c67fd02 100644 --- a/modules/utilities/unix/hackerbot/files/opt_hackerbot/hackerbot.rb +++ b/modules/utilities/unix/hackerbot/files/opt_hackerbot/hackerbot.rb @@ -67,6 +67,9 @@ def read_bots (irc_server_ip_address) begin doc = Nokogiri::XML(File.read(file)) + if doc.errors.any? + Print.err doc.errors + end rescue Print.err "Failed to read hackerbot file (#{file})" print "Failed to read hackerbot file (#{file})"