-
Notifications
You must be signed in to change notification settings - Fork 14k
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
Adding Windows Automation #16698
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
``` | ||
[CmdletBinding()] | ||
Param( | ||
$DownloadURL = "https://windows.metasploit.com/metasploitframework-latest.msi", | ||
$DownloadLocation = "$env:APPDATA/Metasploit", | ||
$InstallLocation = "C:\Tools", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I checked and the target installation path is correct ( |
||
$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). |
There was a problem hiding this comment.
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?