<commit_before># Packer

## VMs for work and home

For some years I've maintained a couple of scripts to install and configure SIFT, [REMnux](https://remnux.org), Kali and Cuckoo with some addons that I like for each tool and distribution. To run the scripts I've had to install the base OS manually which resulted in subtle differences every time. It is easy to forget to change memory or disk size or miss a package that I use to install etc.

I've finally started to test [packer.io](https://www.packer.io/) and as always I found that this is a extremely useful tool I should have used much earlier. So far I've created scripts to build VMs based on Ubuntu, Debian and Kali.

### Debian

Available in the subdirectory **packer-debian** and has two make targets:

* cuckoo - debian-cuckoo.json - install [Debian](https://debian.org) and then run my script [cuckoo-tools](https://github.com/reuteras/cuckoo-tools) to install [Cuckoo Sandbox](https://www.cuckoosandbox.org).
* debian - debian.json - install a basic [Debian](https://debian.org) host.

### Ubuntu

Available in **packer-ubuntu** and has three targets:

* remnux - ubuntu-remnux-tools-remnux.json - install [REMnux](https://remnux.org) and some additions with my [remnux-tools](https://github.com/reuteras/remnux-tools) repo.
* sift - ubuntu-remnux-tools-sift.json - install [SIFT](https://digital-forensics.sans.org/community/downloads/) and some additions with my [remnux-tools](https://github.com/reuteras/remnux-tools) repo
* ubuntu - ubuntu.json - install a basic [Ubuntu](https://www.ubuntu.com/)

### Kali

* kali - kali.json - my script [kali-tools](https://github.com/reuteras/kali-tools) to do a very basic install of [Kali](https://www.kali.org).

### Manual steps

At the moment you have to add a usb controller manually.

## TODO

Create configurations for

* [Fedora](https://getfedora.org/)
* [CentOS](https://centos.org/)
* [Security Onion](https://securityonion.net/)
* [pfSense](https://pfsense.org/)
* [Windows 10](https://www.microsoft.com/en-us/windows) and [server](https://www.microsoft.com/en-us/cloud-platform/windows-server)

Other things to do:

* Better preseed.cfg files
* Use templates
* And much more :)

## Support

<a href="https://www.buymeacoffee.com/reuteras" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a><commit_msg>Update README for VMware Workstation.<commit_after># Packer

This repo contains scripts to build virtual machines on macOS with VMware Fusion and on Windows with VMware Workstation. At the moment I don't have a macOS machine with an Intel processor so those scripts are not tested.

## Instructions on Windows

Install VMware Workstation, [packer][pai] and git. My recommendation is to install git with the command **winget**. Run the following in a Windows Terminal:

    winget install Git.Git

You have to add *C:\Program Files\Git\bin* to the Path environment variable. 

Then start a new terminal and run:

    git clone https://github.com/reuteras/packer.git
    cd packer
    # Open and configure the default values
    <editor> defaults.ps1


### Images based on Ubuntu 20.04

Configuration for the images based on Ubuntu 20.04 is done in *packer/variables-ubuntu-2004.pkr.hcl* for images based on Ubuntu 20.04 LTS.

Images based on Ubuntu 20.04

- Ubuntu 20.04 default
- [REMnux][rem] installed via my repo [remnux-tools][ret]
- [SIFT][sif] installed via my repo [remnux-tools][ret]

### Images based on Ubuntu 22.04

Configuration for the images based on Ubuntu 22.04 is done in *packer/variables-ubuntu-2204.pkr.hcl* for images based on Ubuntu 22.04 LTS.

- Ubuntu 22.04 default
- Malcolm - Malcolm is not installed but my repo [malir][mal] is added to help with the installation.

## Instructions on macOS

### CentOS

- centos-7 - CentOS 7
- centos-8 - CentOS 8

### Debian

Available in the subdirectory **packer-debian** and has two make targets:

- debian - debian.json - install a basic [Debian][deb] host.

### Fedora

- fedora-34 - Fedora 34

### Kali

- kali - kali.json - my script [kali-tools][kat] to do a very basic install of [Kali][kal].

### Ubuntu

Available in **packer-ubuntu** and has three targets:

- remnux
- sift
- ubuntu

### Windows

[Windows 10][w10] and [server][wse].

- Windows 10

## FAQ

### Packer Build Error with VMware Workstation 16

If you have problems building with Packer with VMware Workstation 16 read the blog [post][pbe]. In short the solution is to the following steps.

- In Workstation go to Edit...Virtual Network Editor
- Click Change Settings
- Don’t change anything, just click OK

## TODO

Update the code and fix (among other things):

- Better preseed.cfg can cloud-init files
- Use templates

## Bugs

There will be bugs so please file a report when you find them.

## Support

<a href="https://www.buymeacoffee.com/reuteras" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>


    [deb]: https://debian.org
    [kal]: https://www.kali.org
    [kat]: https://github.com/reuteras/kali-tools
    [mal]: https://github.com/reuteras/malir
    [pai]: https://www.packer.io/downloads
    [pbe]: https://www.vgemba.net/vmware/Packer-Workstation-Error
    [rem]: https://remnux.org
    [sif]: https://digital-forensics.sans.org/community/downloads/
    [w10]: https://www.microsoft.com/en-us/windows
    [wse]: https://www.microsoft.com/en-us/cloud-platform/windows-server
{'fraction_non_alphanumeric': 0.1229669347631814, 'fraction_numerical': 0.014119749776586237, 'mean_word_length': 3.943462897526502, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 34, 'lorem ipsum': 0, 'www.': 13, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '158116', 'n_tokens_mistral': 1928, 'n_tokens_neox': 1745, 'n_words': 616}