Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Windows Automation #16698

Merged
merged 1 commit into from
Aug 19, 2022
Merged

Adding Windows Automation #16698

merged 1 commit into from
Aug 19, 2022

Conversation

istairbn
Copy link
Contributor

This adds a simple automation script for Windows Installation - suitable for Ansible deployments etc.

Similar to the wrapping of the ERB script for Linux. 

Not sure if this is the best location for the script, but the alternative was an unattributed Gist!
@bcoles bcoles added the docs label Jun 20, 2022
Param(
$DownloadURL = "https://windows.metasploit.com/metasploitframework-latest.msi",
$DownloadLocation = "$env:APPDATA/Metasploit",
$InstallLocation = "C:\Tools",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's double check that the installer will work with this target location. See rapid7/metasploit-omnibus#144

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked and the target installation path is correct (C:\Tools).

@cdelafuente-r7 cdelafuente-r7 self-assigned this Jul 19, 2022
Copy link
Contributor

@cdelafuente-r7 cdelafuente-r7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @istairbn for your contribution! I tested and the PowerShell script works as expected. Before it lands, I just left a couple of minor comments for you to review, when you get a chance.

@@ -30,6 +30,33 @@ Download the [latest Windows installer](https://windows.metasploit.com/metasploi

If you downloaded Metasploit from us, there is no cause for alarm. We pride ourselves on offering the ability for our customers and followers to have the same toolset that the hackers have so that they can test systems more accurately. Because these (and the other exploits and tools in Metasploit) are identical or very similar to existing malicious toolsets, they can be used for nefarious purposes, and they are often flagged and automatically removed by antivirus programs, just like the malware they mimic.

## Windows Installation (Silent)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this could be included in the Installing Metasploit on Windows section?

Suggested change
## Windows Installation (Silent)
### Silent Installation

Param(
$DownloadURL = "https://windows.metasploit.com/metasploitframework-latest.msi",
$DownloadLocation = "$env:APPDATA/Metasploit",
$InstallLocation = "C:\Tools",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked and the target installation path is correct (C:\Tools).

@@ -30,6 +30,33 @@ Download the [latest Windows installer](https://windows.metasploit.com/metasploi

If you downloaded Metasploit from us, there is no cause for alarm. We pride ourselves on offering the ability for our customers and followers to have the same toolset that the hackers have so that they can test systems more accurately. Because these (and the other exploits and tools in Metasploit) are identical or very similar to existing malicious toolsets, they can be used for nefarious purposes, and they are often flagged and automatically removed by antivirus programs, just like the malware they mimic.

## Windows Installation (Silent)

The PowerShell below will download and install the framework, and is suitable for automated Windows deployments.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be interesting to add a line saying that the installer will be downloaded to $DownloadLocation and won't be deleted after the script has run.

@cdelafuente-r7
Copy link
Contributor

Hi @istairbn, this PR is almost good to go and just need some small updates, as I mentioned in my previous comments. Since these changes are minor, I can make them myself and land it. That said, I'll wait a couple of days before doing so, in case you have anything else to add.

@cdelafuente-r7 cdelafuente-r7 merged commit fbca81d into rapid7:master Aug 19, 2022
@cdelafuente-r7 cdelafuente-r7 added the rn-no-release-notes no release notes label Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants