Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | RE: User group tool |
|---|---|
| Date: | Fri, 15 Sep 2006 07:57:20 -0400 |
Here is a Perl script that will find users in the local admins group
other than the Administrator and Domain Admins.. It reads machine names
from a text file named machines.txt and outputs to a file named
localadmins.txt.
************************************
use Win32::NetAdmin;
open (MACHINEFILE, "machines.txt");
@Machines=<MACHINEFILE>;
close (MACHINEFILE);
open (OUTFILE, ">localadmins.txt");
print OUTFILE "Local Administrators Audit\n";
foreach $Machine(@Machines){
chomp $Machine;
if (`ping -n 2 -l 1 -w 50 $Machine` =~ /Reply/){
Win32::NetAdmin::LocalGroupGetMembers($Machine,
'Administrators', \@admins) || die "$^E\n";
foreach $user(@admins){
unless ($user =~ /administrator|domain
admins/i){
print OUTFILE "$Machine\t$user\n";
}
}
}else {
print OUTFILE "$Machine\tDown or not found\n";
}
}
close OUTFILE;
print "Done! Press Enter to Exit";
<>;
************************************
Good luck
Jason Weir
Systems Administrator
New Hampshire Retirement System
Concord, NH 03301
-----Original Message-----
From: listbounce@securityfocus.com [mailto:listbounce@securityfocus.com]
On Behalf Of Bud Gordon
Sent: Thursday, September 14, 2006 5:20 PM
To: pen-test@securityfocus.com
Subject: User group tool
I am looking for a tool or script that will let me ferret out users that
are members of the admin group (preferably from a command line). I have
google'd and use pwdump for lists etc; I also use net user and net group
to show me the users and groups, but I need to see who is admin.
Thoughts?
Thank you!!
------------------------------------------------------------------------
This List Sponsored by: Cenzic
Need to secure your web apps?
Cenzic Hailstorm finds vulnerabilities fast.
Click the link to buy it, try it or download Hailstorm for FREE.
http://www.cenzic.com/products_services/download_hailstorm.php
------------------------------------------------------------------------
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | RE: User group tool, ballares |
|---|---|
| Next by Date: | RE: tools to scan source code, Benjamin Livshits |
| Previous by Thread: | RE: User group tool, ballares |
| Next by Thread: | RE: custom xp_cmdshell on SQL Server, Andy Lester |
| Indexes: | [Date] [Thread] [Top] [All Lists] |