KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

Suggestion $System.Process & $System.Security.SecureStri
Goto page 1, 2  Next
 
Post new topic   Reply to topic    KiXforms Forum Index -> KiXforms.NET Discussion
View previous topic :: View next topic  
Author Message
apronk
KiXforms Regular
KiXforms Regular


Joined: 28 Jun 2006
Posts: 53
Location: The Netherlands

PostPosted: Fri Jan 04, 2008 9:04 am    Post subject: Suggestion $System.Process & $System.Security.SecureStri Reply with quote

Since KiXforms .Net utilizes .Net 2.0 I thought I'd bring up this old suggestion again Smile
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
View user's profile Send private message Visit poster's website
pearly
KiXforms Aficionado
KiXforms Aficionado


Joined: 27 Jan 2004
Posts: 332

PostPosted: Fri Jan 04, 2008 7:13 pm    Post subject: Reply with quote

apronk,

what does this do?

Code:
$Password = $System.Security.SecureString
Back to top
View user's profile Send private message
apronk
KiXforms Regular
KiXforms Regular


Joined: 28 Jun 2006
Posts: 53
Location: The Netherlands

PostPosted: Fri Jan 04, 2008 8:01 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
pearly
KiXforms Aficionado
KiXforms Aficionado


Joined: 27 Jan 2004
Posts: 332

PostPosted: Fri Jan 04, 2008 8:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
apronk
KiXforms Regular
KiXforms Regular


Joined: 28 Jun 2006
Posts: 53
Location: The Netherlands

PostPosted: Fri Jan 04, 2008 8:49 pm    Post subject: Reply with quote

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 Smile 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 Wink

_________________
Achieve inner peace through outer violence.
Back to top
View user's profile Send private message Visit poster's website
pearly
KiXforms Aficionado
KiXforms Aficionado


Joined: 27 Jan 2004
Posts: 332

PostPosted: Fri Jan 04, 2008 9:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
Jochen
KiXforms Devotee
KiXforms Devotee


Joined: 05 Mar 2003
Posts: 1204
Location: Stuttgart, Germany

PostPosted: Sun Jan 06, 2008 1:34 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Sat Jan 12, 2008 5:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
apronk
KiXforms Regular
KiXforms Regular


Joined: 28 Jun 2006
Posts: 53
Location: The Netherlands

PostPosted: Sun Jan 13, 2008 9:16 am    Post subject: Reply with quote

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 Smile

_________________
Achieve inner peace through outer violence.
Back to top
View user's profile Send private message Visit poster's website
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Wed Jan 16, 2008 4:18 pm    Post subject: Reply with quote

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
View user's profile Send private message
apronk
KiXforms Regular
KiXforms Regular


Joined: 28 Jun 2006
Posts: 53
Location: The Netherlands

PostPosted: Thu Jan 17, 2008 8:00 am    Post subject: Reply with quote

New laptop is always a nice present Smile
_________________
Achieve inner peace through outer violence.
Back to top
View user's profile Send private message Visit poster's website
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Mon Feb 11, 2008 5:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
apronk
KiXforms Regular
KiXforms Regular


Joined: 28 Jun 2006
Posts: 53
Location: The Netherlands

PostPosted: Tue Feb 12, 2008 8:23 am    Post subject: Reply with quote

I just took a quick look, maybe the answer lies in System.Security.SecureString.Permissions where you can set the attribute to "RequestMinimum"
This http://www.derkeiler.com/Newsgroups/microsoft.public.dotnet.security/2006-07/msg00026.html might give some insights.

_________________
Achieve inner peace through outer violence.
Back to top
View user's profile Send private message Visit poster's website
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Tue Feb 12, 2008 7:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
apronk
KiXforms Regular
KiXforms Regular


Joined: 28 Jun 2006
Posts: 53
Location: The Netherlands

PostPosted: Wed Feb 13, 2008 10:39 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> KiXforms.NET Discussion All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group