lab updates

This commit is contained in:
Z. Cliffe Schreuders
2018-12-06 15:16:24 +00:00
parent 8ae094d73b
commit 1cbdd32145
8 changed files with 82 additions and 4 deletions

View File

@@ -41,6 +41,7 @@ DOCUMENTATION_DIR = "#{ROOT_DIR}/documentation/yard/doc"
# Path to resources
WORDLISTS_DIR = "#{ROOT_DIR}/lib/resources/wordlists"
LINELISTS_DIR = "#{ROOT_DIR}/lib/resources/linelists"
IMAGES_DIR = "#{ROOT_DIR}/lib/resources/images"
# Path to build puppet modules
@@ -74,4 +75,4 @@ RETRIES_LIMIT = 10
# Version number of SecGen
# e.g. [release state (0 = alpha, 3 = final release)].[Major bug fix].[Minor bug fix].[Cosmetic or other features]
VERSION_NUMBER = '0.0.1.1'
VERSION_NUMBER = '0.0.1.1'

View File

@@ -0,0 +1,7 @@
All your base are belong to us!
You've been hacked!
Hahaha... Your security is not so good.
Mess with the best, die like the rest.
Hack the planet!
When I was a child, I spake as a child, I understood as a child, I thought as a child: but when I became a man, I put away childish things
Your server is powned!

View File

@@ -0,0 +1,3 @@
Welcome to the server!
Greetings! Welcome to the server.
G-day mate!

View File

@@ -0,0 +1,32 @@
#!/usr/bin/ruby
require_relative '../../../../../lib/objects/local_string_generator.rb'
class LineGenerator < StringGenerator
def initialize
super
self.line_list = []
self.module_name = 'Random Word Generator'
end
def get_options_array
super + [['--linelist', GetoptLong::OPTIONAL_ARGUMENT]]
end
def process_options(opt, arg)
super
case opt
when '--linelist'
self.line_list << arg;
end
end
def generate
# read all the lines, and select one at random
line = File.readlines("#{LINELISTS_DIR}/#{self.linelist.sample.chomp}").sample.chomp
# strip out everything except alphanumeric and basic punctuation (no ' or ")
self.outputs << line.gsub(/[^\w !.,]/, '')
end
end
LineGenerator.new.run

View File

@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<generator xmlns="http://www.github/cliffe/SecGen/generator"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.github/cliffe/SecGen/generator">
<name>Random Line Generator</name>
<author>Z. Cliffe Schreuders</author>
<module_license>MIT</module_license>
<description>Returns a line from a list of lines.</description>
<type>string_generator</type>
<type>random_line_generator</type>
<type>local_calculation</type>
<platform>linux</platform>
<platform>windows</platform>
<read_fact>linelist</read_fact>
<default_input into="linelist">
<value>server_greetings</value>
</default_input>
<output_type>generated_strings</output_type>
</generator>

View File

@@ -19,8 +19,11 @@
<input into_datastore="IP_addresses">
<!-- desktop -->
<value>172.16.0.2</value>
<!-- hackerbot -->
<value>172.16.0.3</value>
<!-- compromised -->
<value>172.16.0.4</value>
</input>
@@ -41,10 +44,18 @@
<value>true</value>
</input>
<input into="leaked_filenames">
<value></value>
<value>u_r_powned-hme</value>
<value>.a_hidden_flag-hme</value>
<value>a_flag-hme</value>
</input>
<input into="strings_to_leak">
<value></value>
<generator type="random_line_generator">
<input into="linelist">
<value>powned_messages</value>
</input>
</generator>
<generator type="flag_generator" />
<generator type="flag_generator" />
</input>
</generator>
<generator type="account">
@@ -160,7 +171,7 @@
</input>
</vulnerability>
<!-- has to be defined before accounts -->
<!-- rootkit has to be defined before accounts are created -->
<utility module_path=".*alias_rootkit"/>
<utility module_path=".*parameterised_accounts">