.

NT 4

<<

KH3

Newbie
Newbie

Posts: 7

Joined: Mon Sep 17, 2007 4:25 pm

Location: Europe

Post Sun Jun 22, 2008 3:51 am

NT 4

Hi there, I am new to programming but are learning some perl and python.

I need to write a small script (pref. Python) that can detect old windows NT 4 boxes in a mixed large windows network. Result should just be a name or a IP if it is a NT4 box. The script should be able to run without user account.

Any ideas of what to detect verify on in relation to the possibilities in python/perl?

Thanks
<<

shakuni

Jr. Member
Jr. Member

Posts: 80

Joined: Sun Nov 04, 2007 2:24 pm

Post Sun Jun 22, 2008 5:38 am

Re: NT 4

  Code:
 >>> import sys
 >>> sys.getwindowsversion()
(5, 1, 2600, 2, 'Service Pack 2')
 >>> import platform as  pl
 >>> pl.platform()
'Windows-XP-5.1.2600-SP2'
 >>> pl.system()
'Windows'
 >>> pl.release()
'XP'
 >>> pl.version()
'5.1.2600'


You got the concept, now convert it into script.
There is no rule, law or tradition that apply universally... including this one.
<<

KH3

Newbie
Newbie

Posts: 7

Joined: Mon Sep 17, 2007 4:25 pm

Location: Europe

Post Mon Jun 23, 2008 1:21 am

Re: NT 4

Thank that look easy and thumbs up for the quick reply ;O)
<<

KH3

Newbie
Newbie

Posts: 7

Joined: Mon Sep 17, 2007 4:25 pm

Location: Europe

Post Mon Jun 23, 2008 3:17 pm

Re: NT 4

Bonus question!

Will that work from network with a socket or only on the local machine?
<<

shakuni

Jr. Member
Jr. Member

Posts: 80

Joined: Sun Nov 04, 2007 2:24 pm

Post Thu Jun 26, 2008 4:21 am

Re: NT 4

Try yourself and see!
There is no rule, law or tradition that apply universally... including this one.
<<

apollo

Full Member
Full Member

Posts: 146

Joined: Fri Apr 04, 2008 7:44 pm

Post Fri Jun 27, 2008 12:14 pm

Re: NT 4

If you have any host that is on the domain, and you are only looking for hosts that are in your domain that are NT based, you can do this:

dsquery * "<YOUR BASE DN>" -scope subtree -filter "(operatingSystem=Windows NT*)"

if you are not on a machine which is part of the domain, if you have a valid user account inside the domain

ldapsearch -H ldap://<any domain controller> -b "<your base ou>" -D "<fully qualified DN of a user in AD>" -W  -x  "(OperatingSystem=Windows NT*)"

You could run this on say a linux box against your ad structure, just having a user in the domain and this should get you what you want


If you are talking about walking into a network blind and finding out if there are NT boxes on the network, nmap is your friend
CISSP, CSSLP, MCSE+Security, MCTS, CCSP, GPEN, GWAPT, GCWN, NOP, OSCP, Security+

Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest

.
Powered by phpBB® Forum Software © phpBB Group.
Designed by ST Software