Summary of SQLServerSA permissions-mysql tutorial

Source: Internet
Author: User
SQLServerSA permission summary classic Technology

SQL Server SA permission summary classic Technology

Required Tools: SQL Query Analyzer and SqlExec Sunx Version
   Part 1: 
Summary on how to remove xp_cmdshell to protect the system:
First, let's know the statement:
1. to remove the xp_cmdshell extension process, use the following statement:
If exists (select * from dbo. sysobjects where id = object_id (n' [dbo]. [xpcmdshell] ') and OBJECTPROPERTY (id, n' isextendedproc') = 1) exec sp_dropextendedproc n' [dbo]. [xp_cmdshell]'
2. to add the xp_cmdshell extension process, use the following statement:
Sp_addextendedproc xp_cmdshell, @ dllname = 'loglog70. dll'
Now let's look at the phenomenon:
After obtaining the SA permission, we remotely use Sqlexec to execute the cmd command, and the prompt SQL _ERROR is displayed. Therefore, xp_mongoshell may be removed.
  
Now let's take a look at the two methods to restore after xp_cmdshell is removed:
  
Method 1: use SQL Query Analyzer to connect to the other party and write data directly. it is quite convenient to sp_addextendedproc xp_mongoshell, @ dllname = 'loglog70. dll 'method 2: use SqlExec Sunx Version first fill in % s in the Format option of SqlExec Sunx Version, enter sp_addextendedproc 'XP _ javasshell' in the CMD option, 'xpsql70. dll 'or use sp_addextendedproc 'XP _ shortshell' and 'XP log70. dll 'in addition, use SqlExec Sunx Version to remove the xp_mongoshell method and select the same conditions when adding the method. then enter sp_dropextendedproc 'XP _ mongoshell'.
  
Part 2:
  
If the other party has deleted or renamed xplog70.dll, we will use the following method to continue our hack task:
The following suggestion indicates that the xplog70.dll is deleted or renamed.
Write sp_addextendedproc xp_mongoshell in the query analyzer, @ dllname = 'loglog70. dll ', and the system prompts that an object named 'XP _ mongoshell' already exists in the database.

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.