Page 1 of 1 1
Topic Options
#85497 - 2002-04-10 01:39 AM LsaLookupNames
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Shawn or anyone else, is there a way to use COM via Kixtart to call something like LsaLookupNames?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#85498 - 2002-04-10 01:56 AM Re: LsaLookupNames
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Hey Howard, that lsaLookupNames() is one hell of an API call isn't it ? I think depending on what you had in mind, the closest you could get would be to build some kind of ADSI / ADsSecurity duet. What did you have in mind ?

-Shawn

Top
#85499 - 2002-04-10 02:12 AM Re: LsaLookupNames
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
I do a great deal of coding in Perl that target security objects. Many of the calls like LsaLookupName, LsaLookupSids, and other Lanman type calls are available to me in Perl through the use of Modules such as the Lanman. I wanted to determine if any of this functionality could be called via COM or if Kixtart could use rundll to invoke a call from a DLL.

In short, I wanted to exploit the basic Lanman functionality in the OS without the need to install ADSI or other add-on utility like ADsSecurity.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#85500 - 2002-04-10 02:21 AM Re: LsaLookupNames
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
As an example, the other thread where 'comjf' wanted to find the builtin\administrator account. the ADSI solution of cycling through all users trying to match the RID is very inefficient. My Perl program that can rename and reset the builtin\administrator account without knowing the account (it is different in other languages or could have been renamed) uses GetUserGroupFromRID($Computer, DOMAIN_USER_RID_ADMIN, $Account)). Making a call like this is far more efficient than looking through 20,000 accounts.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#85501 - 2002-04-10 02:38 AM Re: LsaLookupNames
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
To my knowledge, there are no built-in-NT-off-the-shelf kinda thingies to do this. The little playing I've done with RunDLL has left (me) very disappointed. I mean - it might be great for kicking off some quick-and-dirty API call, but if you wanted to read serious information back into your script ... forget it !

I've seen third-party ActiveX controls that provide an interface to dynamically bind to exported DLL functions. Even allows one to "map" the input parm types, all that. Kinda like RunDLL but much better. But again, this involves the installation of a third party snapin!

The only other option (I) can think of is reskit utils. Are there any cmdline proggies that provides a LookupNames type function ?

-Shawn

Top
#85502 - 2002-04-10 02:40 AM Re: LsaLookupNames
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Oh well. Checkout the program I emailed you. Let me know if you have a need for anything like it.

[ 10 April 2002, 02:42: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#85503 - 2002-04-10 02:42 AM Re: LsaLookupNames
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
GotIt()!

-Shawn

[ 10 April 2002, 02:58: Message edited by: Shawn ]

Top
#85504 - 2002-04-10 03:56 AM Re: LsaLookupNames
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
That worked a treat !


F:\>renameadmin \\tassie Administrator xyz123

Utility: RenameAdmin.exe
Written by: Howard A. Bullock (habullock@comcast.net)

Copyright 2002

Renames and sets the password of the local 'administrator' account on the
specified computer without knowing the original account name. Requires
administrator permissions on the target computer.

LogFile = F:\RENAMEADMIN.EXE.log

2002.04.09_23.43.36 Name & Password Set (\\tassie, Administrator3, {'name' =
> Administrator, 'password' => xyz123})


Flawless !

-Shawn

[ 10 April 2002, 05:45: Message edited by: Shawn ]

Top
#85505 - 2002-04-10 07:07 AM Re: LsaLookupNames
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
nice sounding prog...
just comes to my mind the exe I had to write to make new users "user have to change password on next login" turn to on.
heh, messed with that one allmost a month just because of the lack of information, but, it's the same on almost everything. if you have the info or knowledge, you are allready halfway trough...

yeah
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 565 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.057 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org