Check whether the MSSQL Stored Procedure is tampered

Source: Internet
Author: User

Use master

 
Go
 
-- Check whether xp_mongoshell is tampered
 
Select * from master .. syscomments where object_name (id) = xp_mongoshell and text <> xplog70.dll
 
Go
 
-- Check whether other stored procedures are tampered
 
Select object_name (id), * from master .. syscomments where object_name (id) in
 
 
(Xp_getfiledetails, xp_availablemedia, xp_dirtree, xp_fixeddrives, xp_s
Ubdirs,
Xp_fileexist, xp_get_tape_devices, sp_MSgetversion, xp_enumdsn, xp_regr
Ead, xp_regwrite, xp_regdeletevalue,
Xp_regaddmultistring, xp_regremovemultistring, xp_regenumkeys, xp_regenu
Mvalues, xp_regdeletekey, xp_instance_regread,
Xp_instance_regwrite, xp_instance_regdeletevalue, xp_instance_regaddmulti
String, xp_instance_regremovemultistring,
Xp_instance_regenumkeys, xp_instance_regenumvalues) and text <> Nxpstar. dll
Go
-- If xp_mongoshell is tampered, execute the following statement to change it back.
Drop procedure xp_cmdshell
Go
Exec sp_addextendedproc Nxp_cmdshell, Nxplog70.dll
Go
-- Then run the following statement to verify that xp_cmdshell is correct.
-- Xp_cmdshell dir c:

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.