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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/metasploit-framework.wiki/Nightly-Installers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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


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.

```
[CmdletBinding()]
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).

$LogLocation = "$DownloadLocation/install.log"
)

If(! (Test-Path $DownloadLocation) ){
New-Item -Path $DownloadLocation -ItemType Directory
}

If(! (Test-Path $InstallLocation) ){
New-Item -Path $InstallLocation -ItemType Directory
}

$Installer = "$DownloadLocation/metasploit.msi"

Invoke-WebRequest -UseBasicParsing -Uri $DownloadURL -OutFile $Installer

& $Installer /q /log $LogLocation INSTALLLOCATION="$InstallLocation"
```

## Improving these installers

Feel free to review and help improve [the source code for our installers](https://github.com/rapid7/metasploit-omnibus).