mirror of
https://github.com/cliffe/SecGen.git
synced 2026-02-22 03:38:01 +00:00
Task 18.1 - echo string challenge working over the network
This commit is contained in:
@@ -1,17 +1,19 @@
|
||||
require 'securerandom'
|
||||
require 'timeout'
|
||||
|
||||
$stdout.sync = true # Disable stdout caching (for challenges that can be run over the network)
|
||||
puts 'Prepare yourself. You need to work quickly for this challenge.'
|
||||
|
||||
sleep 2
|
||||
puts 'Echo the string back to me before the script times out. Try writing a script of your own to make it easier!'
|
||||
sleep 2
|
||||
puts 'Get ready, here we go...'
|
||||
sleep 2
|
||||
|
||||
# Generate random string
|
||||
string = [SecureRandom.base64(rand(20..40)), SecureRandom.hex(rand(20..40))].sample
|
||||
|
||||
puts string
|
||||
STDOUT.flush
|
||||
|
||||
begin
|
||||
Timeout.timeout 0.25 do
|
||||
|
||||
@@ -10,7 +10,13 @@
|
||||
<base platform="linux" type="server"/>
|
||||
|
||||
<!-- 1) Default uses an account and drops the challenge in the users home directory -->
|
||||
<vulnerability module_path=".*echo_string.*"/>
|
||||
<!--<vulnerability module_path=".*echo_string.*"/>-->
|
||||
|
||||
<vulnerability module_path=".*echo_string.*">
|
||||
<input into="port">
|
||||
<value>1337</value>
|
||||
</input>
|
||||
</vulnerability>
|
||||
|
||||
<network type="private_network" range="dhcp"/>
|
||||
</system>
|
||||
|
||||
Reference in New Issue
Block a user