Successful secgen param tests

This commit is contained in:
JD
2023-03-20 19:44:14 +00:00
parent 0e66707b46
commit 78124171a6
2 changed files with 8 additions and 9 deletions

View File

@@ -4,17 +4,15 @@
class linuxki_rce::apache {
Exec { path => ['/bin', '/usr/bin', '/usr/local/bin', '/sbin', '/usr/sbin'] }
$port = '80' #$secgen_parameters['port'][0]
$secgen_parameters = secgen_functions::get_parameters($::base64_inputs_file)
$port = $secgen_parameters['port'][0]
file { '/etc/apache2/sites-enabled/000-default.conf':
file { '/etc/apache2/sites-available/000-default.conf':
ensure => absent,
}
class { '::apache':
default_vhost => false,
default_mods => ['rewrite'], # php5 via separate module
overwrite_ports => false,
mpm_module => 'prefork',
default_vhost => true,
}
-> ::apache::vhost { 'linuxki':
port => $port,
@@ -46,7 +44,6 @@ class linuxki_rce::apache {
exec { 'append-directories':
command => "grep -qE '<Directory (\/opt\/)>|<Directory (\/var\/www\/)>' /etc/apache2/apache2.conf && echo '' || echo \"${dirmatch}\" | sudo tee -a /etc/apache2/apache2.conf",
}
# restart apache
-> exec { 'restart-apache-linuxki':
command => 'service apache2 restart',
logoutput => true

View File

@@ -2,8 +2,10 @@
# LinuxKI configuration
#
class linuxki_rce::configure {
$leaked_filenames = ['flagtest'] ##$secgen_parameters['leaked_filenames']
$strings_to_leak = ['this is a list of strings that are secrets / flags','another secret'] ##$secgen_parameters['strings_to_leak']
$secgen_parameters = secgen_functions::get_parameters($::base64_inputs_file)
$leaked_filenames = $secgen_parameters['leaked_filenames']
$strings_to_leak = $secgen_parameters['strings_to_leak']
Exec { path => ['/bin', '/usr/bin', '/usr/local/bin', '/sbin', '/usr/sbin'] }