mirror of
https://github.com/cliffe/SecGen.git
synced 2026-02-21 11:18:06 +00:00
vulnerabilities/vsftpd_234_backdoor: now uses organisations
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
class vsftpd_234_backdoor::config {
|
||||
|
||||
$json_inputs = base64('decode', $::base64_inputs)
|
||||
$secgen_parameters = parsejson($json_inputs)
|
||||
$raw_org = $secgen_parameters['organisation']
|
||||
if $raw_org and $raw_org[0] and $raw_org[0] != '' {
|
||||
$organisation = parsejson($raw_org[0])
|
||||
} else {
|
||||
$organisation = ''
|
||||
}
|
||||
|
||||
# Config files + manuals
|
||||
file { ['/usr/local/man/man5/vsftpd.conf.5']:
|
||||
require => File['/usr/local/src/vsftpd-2.3.4/Makefile'],
|
||||
|
||||
@@ -20,11 +20,8 @@
|
||||
<read_fact>ftpd_banner</read_fact>
|
||||
<read_fact>port</read_fact>
|
||||
|
||||
<!-- Team project selectors -->
|
||||
<read_fact>business_name</read_fact>
|
||||
<!--TODO: Remove below + match only on business_name? Currently does nothing.-->
|
||||
<read_fact>business_domain</read_fact>
|
||||
<read_fact>person</read_fact>
|
||||
<!-- No organisation by default, overrides other values if provided through scenario. -->
|
||||
<read_fact>organisation</read_fact>
|
||||
|
||||
<default_input into="anonymous_ftp">
|
||||
<value>false</value>
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
$port = $secgen_parameters['port'].first
|
||||
$raw_anonymous_ftp = $secgen_parameters['anonymous_ftp'].first
|
||||
$anonymous_ftp = $raw_anonymous_ftp ? 'YES' : 'NO'
|
||||
$ftpd_banner = $secgen_parameters['ftpd_banner'].first
|
||||
|
||||
if $secgen_parameters['business_name']
|
||||
$business_name = $secgen_parameters['business_name'].first
|
||||
$ftpd_banner = "Welcome to the #{$business_name} FTP server!"
|
||||
if @organisation and @organisation != ''
|
||||
$ftpd_banner = "Welcome to the #{@organisation['business_name']} FTP server!"
|
||||
else
|
||||
$ftpd_banner = $secgen_parameters['ftpd_banner'].first
|
||||
end
|
||||
%>
|
||||
# Example config file /etc/vsftpd.conf
|
||||
|
||||
Reference in New Issue
Block a user