This commit is contained in:
Z. Cliffe Schreuders
2022-04-27 11:22:22 +01:00
parent 4f18d6e236
commit 6c5f6fdb04
5 changed files with 141 additions and 2 deletions

View File

@@ -114,7 +114,7 @@ public class MailReader implements AutoCloseable {
System.out.println("Running Spreadsheet");
new Thread(() -> {
try {
Process p = Runtime.getRuntime().exec("xvfb-run libroffice \"" + attachment.getAbsolutePath() + "\"");
Process p = Runtime.getRuntime().exec("xvfb-run libreoffice \"" + attachment.getAbsolutePath() + "\"");
// Run process for 30 seconds
p.wait(TimeUnit.SECONDS.toMillis(30));
if (p.isAlive()) p.destroy();

View File

@@ -8,7 +8,8 @@ class phish_victim_bot::install {
$passwords = $secgen_parameters['passwords']
$phish_victim_bot_configs = $secgen_parameters['phish_victim_bot_configs']
ensure_packages(['openjdk-11-jre', 'openjdk-11-jdk', 'zip' ])
ensure_packages(['openjdk-11-jre', 'openjdk-11-jdk', 'zip','libreoffice-writer','libreoffice-calc','xvfb'])
user { 'guest':
ensure => present,
@@ -30,7 +31,18 @@ class phish_victim_bot::install {
group => $username,
mode => '0600',
content => $phish_victim_bot_configs[$index],
} ->
file { [ "/home/$username/.config/", "/home/$username/.config/libreoffice/", "/home/$username/.config/libreoffice/4/", "/home/$username/.config/libreoffice/4/user/"]:
ensure => 'directory',
} ->
file { "/home/$username/.config/libreoffice/4/user/registrymodifications.xcu":
ensure => present,
owner => $username,
group => $username,
mode => '0600',
source => 'puppet:///modules/phish_victim_bot/libreoffice-macros-registrymodifications.xcu',
}
# run on each boot via cron
cron { "$username-mail":
command => "sleep 60 && cd /home/$username && java -cp /opt/mailreader/mail.jar:/opt/mailreader/activation-1.1-rev-1.jar:/opt/mailreader/ MailReader &",

View File

@@ -172,6 +172,7 @@ reject_all=false</value>
<utility module_path=".*/handy_cli_tools"/>
<utility module_path=".*/nmap"/>
<utility module_path=".*/thunderbird"/>
<utility module_path=".*/libreoffice"/>
<!-- TODO user a normal user, and pass accounts to thunderbird -->
<network type="private_network" >