Windows XP SP3 on oVirt -- needs VirtualBox base added

This commit is contained in:
Z. Cliffe Schreuders
2019-07-23 14:59:08 +01:00
parent d86a2a8a66
commit eee1a3725a
3 changed files with 47 additions and 8 deletions

View File

@@ -121,7 +121,7 @@ end
<% end %>
<% # Adds line that stops cloud-init from attempting to grab meta-data as eth0 is overwritten with provided networks.
# TODO: Remove when mutli-network vagrant-plugin issue is resolved
if (@options.has_key? :ovirtuser) && (@options.has_key? :ovirtpass) -%>
if (@options.has_key? :ovirtuser) && (@options.has_key? :ovirtpass) && @ovirt_base_template && @ovirt_base_template !~ /windows/ -%>
<%= system.name %>.vm.provision 'shell', inline: "echo 'datasource_list: [ None ] '> /etc/cloud/cloud.cfg.d/90_dpkg.cfg"
<% end -%>
@@ -140,9 +140,12 @@ end
<% case selected_module.module_type
when 'base' -%>
<% if (@options.has_key? :ovirtuser) && (@options.has_key? :ovirtpass) %> # TODO
<%= system.name %>.vm.hostname = '<%= "#{prefix}#{system.name}".tr('_', '-') %>'
<%= system.name %>.vm.box = 'ovirt4'
<%= system.name %>.vm.box_url = 'https://github.com/myoung34/vagrant-ovirt4/blob/master/example_box/dummy.box?raw=true'
<%# if selected_module.attributes['platform'].first.downcase != 'windows' %>
<%# gets stuck setting host name on Windows XP %>
<%= system.name %>.vm.hostname = '<%= "#{prefix}#{system.name}".tr('_', '-') %>'
<%# end %>
<%= system.name %>.vm.box = 'ovirt4'
<%= system.name %>.vm.box_url = 'https://github.com/myoung34/vagrant-ovirt4/blob/master/example_box/dummy.box?raw=true'
<% elsif (@options.has_key? :esxiuser) && (@options.has_key? :esxipass) %>
<%= system.name %>.vm.hostname = '<%= "#{prefix}#{system.name}".tr('_', '-') %>'
<%= system.name %>.vm.box = "<%= selected_module.module_path_name %>"
@@ -156,7 +159,7 @@ end
<%= system.name %>.vm.guest = :windows
<%= system.name %>.vm.network :forwarded_port, guest: 3389, host: 3389
<%= system.name %>.vm.network :forwarded_port, guest: 5985, host: 5985, id: "winrm", auto_correct: true
storage_server.vm.synced_folder '.', '/vagrant', disabled: true
<%= system.name %>.vm.synced_folder '.', '/vagrant', disabled: true
<% end %>
<% when 'network' -%>
<% # DHCP networking -%>
@@ -171,9 +174,9 @@ end
<% # Static networking -%>
<% else -%>
<% # Static oVirt networking -%>
<% if (@options.has_key? :ovirtuser) && (@options.has_key? :ovirtpass) -%>
<% if (@options.has_key? :ovirtuser) && (@options.has_key? :ovirtpass) && @ovirt_base_template && @ovirt_base_template !~ /windows/ -%>
<% interface = 'ens3' -%>
<% if @ovirt_base_template and @ovirt_base_template =~ /kali|debian_desktop_kde|debian_wheezy_server/ -%>
<% if @ovirt_base_template =~ /kali|debian_desktop_kde|debian_wheezy_server/ -%>
<% interface = 'eth0' -%>
<% end -%>
# use some shell scripting to identify the name of the network interface (eth0/ens3/...), and set the IP address statically
@@ -182,7 +185,7 @@ end
<% # Below string is used within testing, do not delete. -%>
# ip_address_for_<%= system.name %>=<%= resolve_network(selected_module)%>
<% # Static Virtualbox networking -%>
<% else -%>
<% else # not windows or not ovirt -%>
<%= system.name %>.vm.network :<%= selected_module.attributes['type'].first %>, ip: "<%= resolve_network(selected_module)%>"
<% # Below string is used within testing, do not delete. -%>
# ip_address_for_<%= system.name %>=<%= resolve_network(selected_module)%>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0"?>
<base xmlns="http://www.github/cliffe/SecGen/base"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.github/cliffe/SecGen/base">
<name>Windows XP SP2, WinRM and Puppet: OVIRT ONLY</name>
<author>Z. Cliffe Schreuders</author>
<module_license>GPLv3</module_license>
<description>Windows XP SP3 with WinRM and Puppet. CURRENTLY ONLY WORKS WITH OVIRT.</description>
<cpu_word_size>64-bit</cpu_word_size>
<type>desktop</type>
<platform>windows</platform>
<distro>XP SP3</distro>
<url>http://TODO</url>
<esxi_url></esxi_url>
<ovirt_template>windows_xp_sp3_vagrant_20190723</ovirt_template>
<software_license>various</software_license>
</base>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<scenario xmlns="http://www.github/cliffe/SecGen/scenario"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.github/cliffe/SecGen/scenario">
<!-- an example remote storage system, with a remotely exploitable vulnerability that can then be escalated to root -->
<system>
<system_name>windows</system_name>
<base platform="windows" name=".*XP SP2.*"/>
<network type="private_network" range="dhcp"/>
</system>
</scenario>