View previous topic :: View next topic |
Author |
Message |
apronk KiXforms Regular

Joined: 28 Jun 2006 Posts: 53 Location: The Netherlands
|
Posted: Fri Jan 04, 2008 9:04 am Post subject: Suggestion $System.Process & $System.Security.SecureStri |
|
|
Since KiXforms .Net utilizes .Net 2.0 I thought I'd bring up this old suggestion again
And to show what this would do I'll demonstrate some code:
Code: |
Dim $Process, $PassWord, $i
$Process = $System.Process
$Process.StartInfo.UseShellExecute = 0
$Process.StartInfo.WorkingDirectory = "C:\"
$Process.StartInfo.FileName = "C:\test.exe"
$Process.StartInfo.Arguments = "--test"
$Process.StartInfo.Domain = @LDOMAIN
$Process.StartInfo.UserName = "Administrator"
$Password = $System.Security.SecureString
For $i = 1 To LEN("password")
$Password.AppendChar(SubStr("password",$i,1))
Next
$Process.StartInfo.Password = $Password
$Process.Start
|
_________________ Achieve inner peace through outer violence. |
|
Back to top |
|
 |
pearly KiXforms Aficionado


Joined: 27 Jan 2004 Posts: 332
|
Posted: Fri Jan 04, 2008 7:13 pm Post subject: |
|
|
apronk,
what does this do?
Code: | $Password = $System.Security.SecureString |
|
|
Back to top |
|
 |
apronk KiXforms Regular

Joined: 28 Jun 2006 Posts: 53 Location: The Netherlands
|
Posted: Fri Jan 04, 2008 8:01 pm Post subject: |
|
|
pearly wrote: | apronk,
what does this do?
Code: | $Password = $System.Security.SecureString |
|
Sets the $Password variable to a System.Security.SecureString.
Not quite sure what you're asking me here.
$System.Process only accept passwords build up by a SecureString _________________ Achieve inner peace through outer violence. |
|
Back to top |
|
 |
pearly KiXforms Aficionado


Joined: 27 Jan 2004 Posts: 332
|
Posted: Fri Jan 04, 2008 8:45 pm Post subject: |
|
|
I couldn't find $System.Security.SecureString in KiXforms.NET chm, but thanks for the link.
So with the code in your first post. We can use it to execute processes remotely? Does this include executables with interfaces? This kind of acts like psexec.exe? |
|
Back to top |
|
 |
apronk KiXforms Regular

Joined: 28 Jun 2006 Posts: 53 Location: The Netherlands
|
Posted: Fri Jan 04, 2008 8:49 pm Post subject: |
|
|
pearly wrote: | I couldn't find $System.Security.SecureString in KiXforms.NET chm, but thanks for the link.
So with the code in your first post. We can use it to execute processes remotely? Does this include executables with interfaces? This kind of acts like psexec.exe? |
No you can't find it in the chm as the topic says, I suggest implementing this into KiXforms .Net as it is standard in the .Net Framework v2.0 and up. And yes this way you can launch any kind of executable, it will act like runas.exe or psexec.exe runNas  _________________ Achieve inner peace through outer violence. |
|
Back to top |
|
 |
pearly KiXforms Aficionado


Joined: 27 Jan 2004 Posts: 332
|
Posted: Fri Jan 04, 2008 9:36 pm Post subject: |
|
|
I've had problems with psexec.exe where some .NET/C++ applications would not start properly. Hopefully this will resolve the issue! |
|
Back to top |
|
 |
Jochen KiXforms Devotee


Joined: 05 Mar 2003 Posts: 1204 Location: Stuttgart, Germany
|
Posted: Sun Jan 06, 2008 1:34 pm Post subject: |
|
|
This is not an issue, but more a kind of request for enhancehement of kf.net aimed in Shawns direction... _________________ Jochen
Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand. |
|
Back to top |
|
 |
Shawn KiXforms Developer


Joined: 22 Feb 2003 Posts: 1983 Location: Canada
|
Posted: Sat Jan 12, 2008 5:04 pm Post subject: |
|
|
Hey thats neat. So what would this do ? Run the task under the context of the userid provided ? Kinda like a runas ?
I like it - lets do it.
-Shawn |
|
Back to top |
|
 |
apronk KiXforms Regular

Joined: 28 Jun 2006 Posts: 53 Location: The Netherlands
|
Posted: Sun Jan 13, 2008 9:16 am Post subject: |
|
|
Shawn wrote: | Hey thats neat. So what would this do ? Run the task under the context of the userid provided ? Kinda like a runas ?
|
Exactly  _________________ Achieve inner peace through outer violence. |
|
Back to top |
|
 |
Shawn KiXforms Developer


Joined: 22 Feb 2003 Posts: 1983 Location: Canada
|
Posted: Wed Jan 16, 2008 4:18 pm Post subject: |
|
|
Be another day or two on this. Got a new laptop for xmas and kinda been re-building (out off commission) for a while ... Stay tuned. |
|
Back to top |
|
 |
apronk KiXforms Regular

Joined: 28 Jun 2006 Posts: 53 Location: The Netherlands
|
Posted: Thu Jan 17, 2008 8:00 am Post subject: |
|
|
New laptop is always a nice present  _________________ Achieve inner peace through outer violence. |
|
Back to top |
|
 |
Shawn KiXforms Developer


Joined: 22 Feb 2003 Posts: 1983 Location: Canada
|
Posted: Mon Feb 11, 2008 5:32 pm Post subject: |
|
|
Just by way of update. Support for this has been added to kf.net. Now the bad news - it doesn't work. It works when included into a stand-alone exe, but when implemented in a DLL (like kf.net is), some kind of security kicks in - and one gets access denied.
Will be researching - apronk (all), you able to find any knowledge on the web about this ... i'm going to start looking soon |
|
Back to top |
|
 |
apronk KiXforms Regular

Joined: 28 Jun 2006 Posts: 53 Location: The Netherlands
|
|
Back to top |
|
 |
Shawn KiXforms Developer


Joined: 22 Feb 2003 Posts: 1983 Location: Canada
|
Posted: Tue Feb 12, 2008 7:10 pm Post subject: |
|
|
k yeah, been researching this. looks like a ton of people are getting this "access denied" error. not looking good so far.
-Shawn |
|
Back to top |
|
 |
apronk KiXforms Regular

Joined: 28 Jun 2006 Posts: 53 Location: The Netherlands
|
Posted: Wed Feb 13, 2008 10:39 am Post subject: |
|
|
I should start taking a look on how to make dll's myself with VB .Net, see if I can reproduce the problem. Got any tips ? _________________ Achieve inner peace through outer violence. |
|
Back to top |
|
 |
|