{"id":20445892,"url":"https://github.com/rapid7/metasploit-baseline-builder","last_synced_at":"2025-04-13T00:44:34.446Z","repository":{"id":54803829,"uuid":"97618993","full_name":"rapid7/metasploit-baseline-builder","owner":"rapid7","description":"Created by Jeffrey Martin via the GitHub Connector","archived":false,"fork":false,"pushed_at":"2025-02-13T14:50:25.000Z","size":891,"stargazers_count":26,"open_issues_count":7,"forks_count":19,"subscribers_count":55,"default_branch":"master","last_synced_at":"2025-04-13T00:44:31.110Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rapid7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-18T16:08:32.000Z","updated_at":"2025-02-13T14:50:28.000Z","dependencies_parsed_at":"2024-02-28T15:41:43.619Z","dependency_job_id":"01c12106-1784-4112-827e-85988759ee83","html_url":"https://github.com/rapid7/metasploit-baseline-builder","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapid7%2Fmetasploit-baseline-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapid7%2Fmetasploit-baseline-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapid7%2Fmetasploit-baseline-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapid7%2Fmetasploit-baseline-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rapid7","download_url":"https://codeload.github.com/rapid7/metasploit-baseline-builder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650419,"owners_count":21139672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T10:15:37.374Z","updated_at":"2025-04-13T00:44:34.427Z","avatar_url":"https://github.com/rapid7.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# metasploit-baseline-builder\n## Purpose\nThis project provides baseline virtual machines for creation of testing environments requiring primarily windows based targets.\n\n## Pre-Requisites\nPrior to usage of the utility provided here the following must be obtained or configured:\n\n* A virtualization platform (i.e. VMWare Fusion, VMWare Workstation, VirtualBox)\n* Packer (https://www.packer.io/) version \u003e= 1.9.4\n* Installation media for the desired operating systems.\n* Python \u003e= 2.7.11\n* You may need to install the VMware plugin for Packer: `packer plugins install github.com/hashicorp/vmware`\n\n## Installation\n```\npython -m pip install -r requirements.txt\n````\n\n## Usage\n### General\nObtain all required iso files listed in `iso_list.json` make them available\nat `\u003cinstall location\u003e/iso`\nTo build the msf_host be sure to init submodules\n```\ngit submodule init\ngit submodule update\n```\n\n\n### VMWare Fusion and Workstation\n```\npython build_baselines.py [options]\npython build_msf_host.py [options]\n```\n\n### VMWare ESXI (vsphere)\nCreate an `esxi_config.json` with the required parameters.\n```\n{\n  \"esxi_host\": \"\",\n  \"esxi_datastore\": \"\",\n  \"esxi_cache_datastore\": \"\",\n  \"esxi_username\": \"\",\n  \"esxi_password\": \"\",\n  \"esxi_network\": \"\"\n}\n```\n\n#### Configure the ESXI server:\nPurloined from [Nick Charlton's December 2016 writeup.](https://nickcharlton.net/posts/using-packer-esxi-6.html) Thank you! \n\n##### Enable SSH\n\nInside the web UI, navigate to “Manage”, then the “Services” tab. Find the entry called: “TSM-SSH”, and enable it.\n\nYou may wish to enable it to start up with the host by default. You can do this inside the “Actions” dropdown (it’s nested inside “Policy”).\n\n##### Enable “Guest IP Hack”\n\nRun the following command on the ESXi host:\n\n```\nesxcli system settings advanced set -o /Net/GuestIPHack -i 1\n```\n\nThis allows Packer to infer the guest IP from ESXi, without the VM needing to report it itself.\n\n##### Execute the build\n```\npython build_baselines.py [options]\npython build_msf_host.py [options]\n```\n\n## Docker Environment\nCreate a local user `jenkins` with UID=1001\n\n```\ndocker build -t rapid7/build:payload-lab -f docker/Dockerfile\n```\n\nTo execute the build process:\n```\ndocker run --rm=true --tty -u jenkins \\\n    --volume=${FULL_PATH_TO_WORKING_DIR}:/r7-source \\\n    --workdir=/r7-source/metasploit-baseline-builder rapid7/build:payload-lab \\\n    bash -l -c \"python build_baselines.py [options]\"\ndocker run --rm=true --tty -u jenkins \\\n    --volume=${FULL_PATH_TO_WORKING_DIR}:/r7-source \\\n    --workdir=/r7-source/metasploit-baseline-builder rapid7/build:payload-lab \\\n    bash -l -c \"python build_msf_host.py [options]\"\n```\n\n### Logging Output\nWhen executed output for each VM will have logs in \u003cWORKING_DIR\u003e/tmp/\u003cVM_NAME\u003e\n\n### It Did Not Work?\nCheck the output log files in each \u003cVM_NAME\u003e\n`ls -lrt metasploit-baseline-builder/*/output.log` will give the output logs in time order.  The most recent log is the one you should check.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapid7%2Fmetasploit-baseline-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frapid7%2Fmetasploit-baseline-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapid7%2Fmetasploit-baseline-builder/lists"}