diff --git a/lib/resources/wordlists/www_buster_filename b/lib/resources/wordlists/www_buster_filename
new file mode 100644
index 000000000..27bd10a1c
--- /dev/null
+++ b/lib/resources/wordlists/www_buster_filename
@@ -0,0 +1,4 @@
+TODO
+todo
+notes
+readme
diff --git a/modules/vulnerabilities/unix/webapp/bludit_upload_images_exec/bludit_upload_images_exec.pp b/modules/vulnerabilities/unix/webapp/bludit_upload_images_exec/bludit_upload_images_exec.pp
new file mode 100644
index 000000000..5264bd602
--- /dev/null
+++ b/modules/vulnerabilities/unix/webapp/bludit_upload_images_exec/bludit_upload_images_exec.pp
@@ -0,0 +1,9 @@
+# require bludit_upload_images_exec::install
+# require bludit_upload_images_exec::apache
+# require bludit_upload_images_exec::configure
+contain bludit_upload_images_exec::install
+contain bludit_upload_images_exec::apache
+contain bludit_upload_images_exec::configure
+Class['bludit_upload_images_exec::install'] ->
+Class['bludit_upload_images_exec::apache'] ->
+Class['bludit_upload_images_exec::configure']
diff --git a/modules/vulnerabilities/unix/webapp/bludit_upload_images_exec/files/bludit-3-9-2.zip b/modules/vulnerabilities/unix/webapp/bludit_upload_images_exec/files/bludit-3-9-2.zip
new file mode 100644
index 000000000..1e6c7ab73
Binary files /dev/null and b/modules/vulnerabilities/unix/webapp/bludit_upload_images_exec/files/bludit-3-9-2.zip differ
diff --git a/modules/vulnerabilities/unix/webapp/bludit_upload_images_exec/manifests/apache.pp b/modules/vulnerabilities/unix/webapp/bludit_upload_images_exec/manifests/apache.pp
new file mode 100644
index 000000000..6d243e332
--- /dev/null
+++ b/modules/vulnerabilities/unix/webapp/bludit_upload_images_exec/manifests/apache.pp
@@ -0,0 +1,31 @@
+class bludit_upload_images_exec::apache {
+ $secgen_parameters = secgen_functions::get_parameters($::base64_inputs_file)
+ $port = $secgen_parameters['port'][0]
+ $docroot = '/var/www/bludit-3-9-2'
+
+ Exec { path => ['/bin', '/usr/bin', '/usr/local/bin', '/sbin', '/usr/sbin'] }
+
+ ensure_resource('tidy','gl remove default site', {'path'=>'/etc/apache2/sites-enabled/000-default.conf'})
+
+ class { '::apache':
+ default_vhost => false,
+ default_mods => ['rewrite'], # php5 via separate module
+ overwrite_ports => false,
+ mpm_module => 'prefork'
+ } ->
+
+ ::apache::vhost { 'www-bludit':
+ port => $port,
+ docroot => $docroot,
+ } ->
+
+
+ # restart apache
+ exec { 'restart-apache-bludit':
+ command => 'service apache2 restart',
+ logoutput => true
+ } ->
+ exec { 'wait-apache-bludit':
+ command => 'sleep 4',
+ }
+}
diff --git a/modules/vulnerabilities/unix/webapp/bludit_upload_images_exec/manifests/configure.pp b/modules/vulnerabilities/unix/webapp/bludit_upload_images_exec/manifests/configure.pp
new file mode 100644
index 000000000..82a2e4078
--- /dev/null
+++ b/modules/vulnerabilities/unix/webapp/bludit_upload_images_exec/manifests/configure.pp
@@ -0,0 +1,88 @@
+class bludit_upload_images_exec::configure {
+ $secgen_parameters = secgen_functions::get_parameters($::base64_inputs_file)
+ $leaked_filenames = $secgen_parameters['leaked_filenames']
+ $strings_to_leak = $secgen_parameters['strings_to_leak']
+ $known_username = $secgen_parameters['known_username'][0]
+ $known_password = $secgen_parameters['known_password'][0]
+ $strings_to_pre_leak = $secgen_parameters['strings_to_pre_leak']
+ $web_pre_leak_filename = $secgen_parameters['web_pre_leak_filename'][0]
+ # $images_to_leak = $secgen_parameters['images_to_leak']
+
+ # differenitaion in website content generation
+ $raw_org = $secgen_parameters['organisation'][0]
+ if $raw_org and $raw_org != '' {
+ $organisation = parsejson($raw_org)
+ }
+
+ if $organisation and $organisation != '' {
+ $business_name = $organisation['business_name']
+ $business_motto = $organisation['business_motto']
+ $manager_profile = $organisation['manager']
+ $business_address = $organisation['business_address']
+ $office_telephone = $organisation['office_telephone']
+ $office_email = $organisation['office_email']
+ $industry = $organisation['industry']
+ $product_name = $organisation['product_name']
+ $employees = $organisation['employees']
+ $intro_paragraph = $organisation['intro_paragraph']
+ }
+
+ if $strings_to_pre_leak.length != 0 {
+ file{ "/var/www/bludit-3-9-2/$web_pre_leak_filename":
+ ensure => file,
+ content => template('bludit_upload_images_exec/pre_leak.erb')
+ }
+ }
+
+
+ Exec { path => ['/bin', '/usr/bin', '/usr/local/bin', '/sbin', '/usr/sbin'] }
+
+ # automate the install
+ exec { 'set-admin-password-bludit':
+ command => "curl -d 'username=$known_username&password=$known_password' http://localhost/install.php",
+ provider => 'shell',
+ logoutput => true
+ } ->
+
+ # manually place website contents via templates
+ file{ "/var/www/bludit-3-9-2/bl-content/databases/site.php":
+ ensure => file,
+ content => template('bludit_upload_images_exec/site.php.erb')
+ } ->
+ file{ "/var/www/bludit-3-9-2/bl-content/databases/pages.php":
+ ensure => file,
+ content => template('bludit_upload_images_exec/pages.php.erb')
+ } ->
+ file{ "/var/www/bludit-3-9-2/bl-content/pages/about/index.txt":
+ ensure => file,
+ content => template('bludit_upload_images_exec/about.erb')
+ } ->
+ file{ "/var/www/bludit-3-9-2/bl-content/databases/plugins/about/db.php":
+ ensure => file,
+ content => template('bludit_upload_images_exec/about_sidebar.php.erb')
+ } ->
+ file{ "/var/www/bludit-3-9-2/bl-content/pages/what-we-do/":
+ ensure => directory,
+ } ->
+ file{ "/var/www/bludit-3-9-2/bl-content/pages/what-we-do/index.txt":
+ ensure => file,
+ content => template('bludit_upload_images_exec/what-we-do.erb')
+ } ->
+ # the user that is created on install gets called admin, even when specifying another name, this fixes that
+ exec { 'fix-admin-username-bludit':
+ command => "sed -i 's/\"admin\":/\"$known_username\":/g' /var/www/bludit-3-9-2/bl-content/databases/users.php",
+ provider => 'shell',
+ logoutput => true
+ }
+
+ ::secgen_functions::leak_files { 'bludit-flag-leak':
+ storage_directory => '/var/www/bludit-3-9-2/bl-content/tmp',
+ leaked_filenames => $leaked_filenames,
+ strings_to_leak => $strings_to_leak,
+ owner => 'www-data',
+ mode => '0750',
+ leaked_from => 'bludit_upload_images_exec',
+ }
+
+
+}
diff --git a/modules/vulnerabilities/unix/webapp/bludit_upload_images_exec/manifests/install.pp b/modules/vulnerabilities/unix/webapp/bludit_upload_images_exec/manifests/install.pp
new file mode 100644
index 000000000..3092c7ff3
--- /dev/null
+++ b/modules/vulnerabilities/unix/webapp/bludit_upload_images_exec/manifests/install.pp
@@ -0,0 +1,27 @@
+class bludit_upload_images_exec::install {
+ # sets the default paths to use
+ Exec { path => ['/bin', '/usr/bin', '/usr/local/bin', '/sbin', '/usr/sbin'] }
+
+ ensure_packages(['php-xml','php-gd','php.mbstring','php-json'])
+ case $operatingsystemrelease {
+ /^(9|10).*/: { # do 9.x stretch stuff
+ ensure_packages('php5.6-gd')
+ }
+ }
+
+ # copy and unzip archive
+ $archive = 'bludit-3-9-2.zip'
+ file { "/usr/local/src/$archive":
+ ensure => file,
+ source => "puppet:///modules/bludit_upload_images_exec/$archive",
+ } ->
+ exec { 'unpack-bludit':
+ cwd => '/usr/local/src',
+ command => "unzip $archive -d /var/www",
+ } ->
+ exec { 'chown-bludit':
+ command => "chown www-data. /var/www -R",
+ }
+
+
+}
diff --git a/modules/vulnerabilities/unix/webapp/bludit_upload_images_exec/secgen_metadata.xml b/modules/vulnerabilities/unix/webapp/bludit_upload_images_exec/secgen_metadata.xml
new file mode 100644
index 000000000..7d6e8fc27
--- /dev/null
+++ b/modules/vulnerabilities/unix/webapp/bludit_upload_images_exec/secgen_metadata.xml
@@ -0,0 +1,104 @@
+
+
+ <%# intro paragraph from the organisation JSON for more differentiation %> + <% @intro_paragraph.each { |intro_paragraph| -%> + <%= intro_paragraph %> + <% } -%> +
+Phone: <%= @manager_profile['phone_number'] %>
Email: <%= @manager_profile['email_address'] %>
++ <%= @business_name %> are the best at what we do. +
++ <%# intro paragraph from the organisation JSON for more differentiation %> + <% @intro_paragraph.each { |intro_paragraph| -%> + <%= intro_paragraph %> + <% } -%> +
diff --git a/scenarios/ctf/feeling_blu.xml b/scenarios/ctf/feeling_blu.xml new file mode 100644 index 000000000..4b83b032a --- /dev/null +++ b/scenarios/ctf/feeling_blu.xml @@ -0,0 +1,83 @@ + + +