Skip to content

Instantly share code, notes, and snippets.

@e1ectr0cut1e
Last active May 13, 2017 06:10
Show Gist options
  • Select an option

  • Save e1ectr0cut1e/2a9174ad7aed069a39aba90c0192c3bd to your computer and use it in GitHub Desktop.

Select an option

Save e1ectr0cut1e/2a9174ad7aed069a39aba90c0192c3bd to your computer and use it in GitHub Desktop.
Batch script to workaround ms17-010 SMB vulnerability https://technet.microsoft.com/en-us/library/security/ms17-010.aspx
@echo off
net session >nul 2>&1
if %errorLevel% == 0 (
sc.exe config lanmanworkstation depend= bowser/mrxsmb20/nsi
sc.exe config mrxsmb10 start= disabled
) else (
echo Please run with Administrator rights.>&2
)
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment