mirror of
https://github.com/cliffe/SecGen.git
synced 2026-02-20 13:50:45 +00:00
lab updates
This commit is contained in:
@@ -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'
|
||||
|
||||
7
lib/resources/line_lists/powned_messages
Normal file
7
lib/resources/line_lists/powned_messages
Normal 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!
|
||||
3
lib/resources/line_lists/server_greetings
Normal file
3
lib/resources/line_lists/server_greetings
Normal file
@@ -0,0 +1,3 @@
|
||||
Welcome to the server!
|
||||
Greetings! Welcome to the server.
|
||||
G-day mate!
|
||||
@@ -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
|
||||
24
modules/generators/messages/random_line/secgen_metadata.xml
Normal file
24
modules/generators/messages/random_line/secgen_metadata.xml
Normal 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>
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user