mirror of
https://github.com/cliffe/SecGen.git
synced 2026-02-21 11:18:06 +00:00
Initial changes to directory structure
This commit is contained in:
1
modules/modules
Normal file
1
modules/modules
Normal file
@@ -0,0 +1 @@
|
||||
Vulnerabilities, Services, Users, Bases and Networks will go in here
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
include vsftpdbackdoor::install
|
||||
@@ -0,0 +1,46 @@
|
||||
#copies and unpacks vsftpd_234_backdoor saves it to usr/local/sbin and executes it for startup
|
||||
class vsftpdbackdoor::install {
|
||||
exec { 'unzip-vsftpd':
|
||||
command => 'tar xzf vsftpd-2.3.4.tar.gz && mv vsftpd-2.3.4 /home/vagrant/vsftpd-2.3.4',
|
||||
path => '/bin',
|
||||
cwd => "/mount/files/shell",
|
||||
creates => "/home/vagrant/vsftpd-2.3.4/vsftpd",
|
||||
notify => Exec['make-vsftpd']
|
||||
}
|
||||
|
||||
exec { 'make-vsftpd':
|
||||
command => '/usr/bin/make',
|
||||
cwd => "/home/vagrant/vsftpd-2.3.4",
|
||||
creates => "/home/vagrant/vsftpd-2.3.4/vsftpd",
|
||||
notify => Exec['copy-vsftpd'],
|
||||
require => Exec["unzip-vsftpd"],
|
||||
}
|
||||
|
||||
|
||||
exec { 'copy-vsftpd':
|
||||
command => '/mount/files/shell/copyvsftpd.sh',
|
||||
cwd => "/home/vagrant/vsftpd-2.3.4",
|
||||
creates => "/usr/local/sbin/vsftpd",
|
||||
notify => User['ftp'],
|
||||
require => Exec["make-vsftpd"],
|
||||
}
|
||||
|
||||
user { 'ftp':
|
||||
ensure => present,
|
||||
uid => '507',
|
||||
gid => 'root',
|
||||
shell => '/bin/zsh',
|
||||
home => '/var/ftp',
|
||||
notify => Exec['start-vsftpd'],
|
||||
require => Exec["copy-vsftpd"],
|
||||
managehome => true,
|
||||
}
|
||||
|
||||
exec { 'start-vsftpd':
|
||||
command => '/mount/files/shell/startvsftpd.sh',
|
||||
require => User["ftp"],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
13
modules/vulnerabilities/unix/ftp/vsftpd_234_backdoor/scripts/copyvsftpd.sh
Executable file
13
modules/vulnerabilities/unix/ftp/vsftpd_234_backdoor/scripts/copyvsftpd.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
sudo mkdir -p /usr/share/empty/
|
||||
|
||||
sudo mkdir -p /var/ftp/
|
||||
|
||||
sudo chown root.root /var/ftp
|
||||
sudo chmod og-w /var/ftp
|
||||
|
||||
sudo cp vsftpd /usr/local/sbin/vsftpd
|
||||
sudo cp vsftpd.conf.5 /usr/local/man/man5
|
||||
sudo cp vsftpd.8 /usr/local/man/man8
|
||||
|
||||
sudo cp vsftpd.conf /etc
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
sudo /usr/local/sbin/vsftpd &
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<vulnerability
|
||||
type="ftp"
|
||||
cve=""
|
||||
privilege="user"
|
||||
access="remote"
|
||||
details="ftpbackdoor smiley face backdoor exploit"
|
||||
platform="unix">
|
||||
<puppets>
|
||||
<puppet>install.pp</puppet>
|
||||
<puppet>ftpbackdoor.pp</puppet>
|
||||
</puppets>
|
||||
<files>
|
||||
<file>vsftpd-2.3.4.tar.gz</file>
|
||||
</files>
|
||||
<scripts>
|
||||
<script>copyvsftpd.sh</script>
|
||||
<script>startvsftpd.sh</script>
|
||||
</scripts>
|
||||
</vulnerability>
|
||||
@@ -0,0 +1,24 @@
|
||||
# Defaults for distcc initscript
|
||||
# sourced by /etc/init.d/distcc
|
||||
|
||||
#
|
||||
# should distcc be started on boot?
|
||||
#
|
||||
STARTDISTCC="true"
|
||||
|
||||
#STARTDISTCC="false"
|
||||
|
||||
#
|
||||
# Which networks/hosts should be allowed to connect to the daemon?
|
||||
# You can list multiple hosts/networks separated by spaces.
|
||||
# Networks have to be in CIDR notation, f.e. 192.168.1.0/24
|
||||
# Hosts are represented by a single IP Adress
|
||||
#
|
||||
# ALLOWEDNETS="127.0.0.1"
|
||||
|
||||
|
||||
ALLOWEDNETS="172.16.0.0/16 192.168.0.0/16 10.0.0.0/8"
|
||||
#
|
||||
# Which interface should distccd listen on?
|
||||
|
||||
LISTENER=""
|
||||
@@ -0,0 +1,23 @@
|
||||
class distcc::config {
|
||||
|
||||
package { 'distcc':
|
||||
ensure => installed
|
||||
}
|
||||
|
||||
|
||||
file { '/etc/default/distcc':
|
||||
require => Package['distcc'],
|
||||
ensure => present,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0777',
|
||||
content => template('../data/distcc.erb')
|
||||
}
|
||||
|
||||
|
||||
service { 'distcc':
|
||||
ensure => running,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<vulnerability
|
||||
type="distcc"
|
||||
cve="CVE-2004-2687"
|
||||
privilege="user"
|
||||
access="remote"
|
||||
details="distcc can be exploited by exploit/unix/misc/distcc_exec"
|
||||
platform="unix">
|
||||
<puppets>
|
||||
<puppet>distcc.pp</puppet>
|
||||
</puppets>
|
||||
<files>
|
||||
<file>distcc.erb</file>
|
||||
</files>
|
||||
<scripts>
|
||||
</scripts>
|
||||
</vulnerability>
|
||||
Reference in New Issue
Block a user