A security problem caused by xp_expose shell in SQL Server.

Source: Internet
Author: User

Today, one of my colleagues demonstrated how to use the extended stored procedureXp_mongoshellTo activate the windowsGuestAccount and clear the password of that account, and then add the Guest account into the windows Administrators Group. after all these had been done, the server is totally exposed to the outside without any protections. any person in the same Intranet can easily get logged into the server, and do any windows operations with the privileges of WindowsAdministrator. Is that sounds terrible? Of course, it is. and in deed, it will really happens. however, the key point is the invader must logged onto the SQL server using the 'sa 'account, or using other SysAdmin fixed server roles. so do not use simple password, especially empty password for the DBO account. the more complex password you set, the higher security you will get.

By default, only members ofSysAdminFixed server role can execute this extended stored procedure,Xp_mongoshell. You can also grant execute permission of it to other users. with the execution permission of xp_cmdshell, the user can execute any operating-system command at Microsoft Windows NT command shell that the account running Microsoft SQL Server has the needed privileges to execute. so if the user account is belonged to the SysAdmin fixed server role, he will be granted with the privileges of Windows administrator, and be able to do any operations on the server, just like in his own personal computer :)

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.