ActiveX control in a web page to create a user account

I'm wondering if there is a way to create a user account on a Windows XP machine that can be scripted from an ActiveX control on a web page. Specifically, I would like to know if there is a way to deploy an ActiveX control with computers (which I preconfigured and submitted) that would allow my webpage from that computer to be used to detect that the ActiveX control is present and allow automatic creation local (Windows XP) user accounts on the computer. Basically, think of it as a matter of pre-installing an ActiveX control (if needed) and providing a link on the desktop; the user gets the car and logs in (with administrator rights) and goes to the website,where my server determines what the corresponding user accounts it has, sends them back as HTML, and the ActiveX control creates the user accounts that I specify.

It seems like it should be possible, but at the same time there are obvious security flaws that could potentially be exploited. Access to these machines will be very limited, so security concerns are of less concern.

Does anyone know if this is possible? Could any of the built-in WMI components do something like this? Is this even valid for the XP security model? Or does it just open up a huge security hole that should be completely avoided?

0


source to share


2 answers


I don't think you could get the Windows Security Model, especially in IE, to allow this. You can do this with WMI using Win32_UserAccount in WMI, so your best bet is to use a PowerShell or VBScript script that asks for a web page to see what accounts should be created and then creates them. The user must be a local administrator. It's easier in PowerShell; if you get sample scripts from www.sapienpress.com/powershell.asp (at the bottom of the page, free), you will see an example of how to send a request to a URL and return the results as text. Then you can parse the text and create accounts accordingly.



+1


source


You have to set caspol security options to fulltrust (or custom set) either with url proof or compelling name proof.

Once you've made sure your control always gets fulltrust setting, there is no limit to what you can do with your control. Anything that can be done with a regular application will be accessible from the inline control. Of course Vista UAC and IE Protected Mode are going to be issues you should be looking at. For example. Protected Mode can be bypassed by adding your site to the Trusted Sites zone.



Edit: Ignore Vista specifics.

+1


source







All Articles