I have an inexperienced instructor (when it comes to server OS) teaching my active
directory class. He made a claim stating that the windows 2000 server is basically
secure out of the box, to which i challenged him.
He then said "fine, then gain administrative rights on my domain and i will give
you an A on the first exam in the class"
which is just like music to my ears.
I immediately started to footprint possible ways to do this...i would need access
to the management console on his DC as admin.
I looked at a few ways to do this with what i had on hand and started figuring out
how long it would take.
following an exploit that i found a while ago (or the theory behind it) what I then
did was wait until the class went to lunch. I convienently left my keys in the lab
and asked another teacher to unlock the door so i could boot down my server and get
my keys.
I then took the instructors drive out (we use removable drives for movement between
various labs) and moved to a workstation out of the view of the window next to the
door. The instrcutor had already setup active directory and was no longer logging
onto the local machine, i noticed this just watching how he is logging on (lcd
projector). I then used my nt password reset cd to blank the local machines admin
password.
While explaining the attack afterwards, the teacher laughed "ha!" at this point in
time. and then said "the local admin doenst have priveleges to AD so it looks like
youre taking my test!" I then told him to hold his horses.
So i logged onto the machine as local admin.
i then proceded to my old buddy, regedit.
i first made a backup...after all he is my instrcutor.
inside of regedit lies the HKEY_USERS\.Default\Control Panel\Desktop
key in which holds some nifty info....when logging onto a win2000 box you must
press ctrl+alt+del to get to the login screen which is basicallyan application that
you can replace with cmd.exe
i had to look this next part up to complete it but you also have to change the
registry values for screensavetimout (in seconds) and screensaveactive (0 or 1)
i then rebooted his drive and attempted to login
after the ctrl+alt+del the normal login window doesnt come up anymorre
a command prompt does...with administrative priveledges.
Im a windows commandlinist, if i can run something from command line id prefer
to..i then knew that i could either create an mmc or just use the active directory
users and computers console to create a new user with administrative priveledges,
and turn on a built in account (replicator) so it would be less obvious which
account i was using. I just set the registry values back to normal using the backup
I made and then voila.
I move his drive back to his tower, and reboot it.
At this point...I know i have my A.
Class resumes after break, I make a point to be late from break.
So the teacher asks when i plan to "hack" his system. I then tell him that its
already done. I boot to my xp pro partition, and join to his domain logging on
with my privelegded account. He says ok and tells me that i have my grade. He then
says "i dont see how that is hurtful to a server though" and deletes my user
account, like i expected him to.
I then told him to give me a few minutes and I would show him.
About twenty minutes later I was ready to show him what i had cooked up. I knew that he was about to apply sp4 and encrypt his drive as part of the upcoming labs and he would have to reboot, which i took advantage of. so what i did was simply wrote a batch file that deleted ntldr. *just so's everyone knows,he had arelatively close ntbackup of his system, i would not have performed this withough knowing that he did*
i gained access to place the batch on his machine with the replicator account by exploiting the rootshare, when you login it asks for credentials, which i had.
i copied the batch to the rootshare (c$)
the batch has to have a /ARH switch in it to be able to force deletion or Readonly and Hidden files
i put both deletion lines in because i was unsure of which would work and i was trying to work fast. I could have also blasted boot.ini and other files as well..but i was going for speed.
i browsed the network neighborhood to his machine and using the same credentials i scheduled a task to run the batch file in a short amount of time, it would have an effect upon the next reboot. So he added his enryption and applied sp4 and did his reboot.
in the lab environment the school is not worried about viruses and therefore all machines have 0 virus/spyware protection, save mine which is of my own doing.
upon reboot instructor receives a friendly message
no safe mode.
disc is encrypted.
tools available on hand did not allow for an instant fix, he would have to
reinstall and restore from backup because he could not write to the drive the way he encrypted the disk.
I then explained to him the entire process i took to achieve this. From getting access to a locked room and then bypassing his local security to gain a foothold over the domain accounts i succesfully brought down his server. If it were a corporation, that might mean thousands of dollars of downtime, and all ive gotta be is a janitor coming in to clean the floor in the middle of the night to get a key to the server when there may be no users logged in to notice.
It may seem farfetched scenario for a janitor to do so...but you never know how a company will protect their assets.
Converse...
I would like to know better ways of completing this process, specifically without reboots being involved, any insight as to the current method that i used or another possible method would be greatly appreciated.
cheers,
kaos
directory class. He made a claim stating that the windows 2000 server is basically
secure out of the box, to which i challenged him.
He then said "fine, then gain administrative rights on my domain and i will give
you an A on the first exam in the class"
which is just like music to my ears.
I immediately started to footprint possible ways to do this...i would need access
to the management console on his DC as admin.
I looked at a few ways to do this with what i had on hand and started figuring out
how long it would take.
following an exploit that i found a while ago (or the theory behind it) what I then
did was wait until the class went to lunch. I convienently left my keys in the lab
and asked another teacher to unlock the door so i could boot down my server and get
my keys.
I then took the instructors drive out (we use removable drives for movement between
various labs) and moved to a workstation out of the view of the window next to the
door. The instrcutor had already setup active directory and was no longer logging
onto the local machine, i noticed this just watching how he is logging on (lcd
projector). I then used my nt password reset cd to blank the local machines admin
password.
While explaining the attack afterwards, the teacher laughed "ha!" at this point in
time. and then said "the local admin doenst have priveleges to AD so it looks like
youre taking my test!" I then told him to hold his horses.
So i logged onto the machine as local admin.
i then proceded to my old buddy, regedit.
i first made a backup...after all he is my instrcutor.
inside of regedit lies the HKEY_USERS\.Default\Control Panel\Desktop
key in which holds some nifty info....when logging onto a win2000 box you must
press ctrl+alt+del to get to the login screen which is basicallyan application that
you can replace with cmd.exe
i had to look this next part up to complete it but you also have to change the
registry values for screensavetimout (in seconds) and screensaveactive (0 or 1)
i then rebooted his drive and attempted to login
after the ctrl+alt+del the normal login window doesnt come up anymorre
a command prompt does...with administrative priveledges.
Im a windows commandlinist, if i can run something from command line id prefer
to..i then knew that i could either create an mmc or just use the active directory
users and computers console to create a new user with administrative priveledges,
and turn on a built in account (replicator) so it would be less obvious which
account i was using. I just set the registry values back to normal using the backup
I made and then voila.
I move his drive back to his tower, and reboot it.
At this point...I know i have my A.
Class resumes after break, I make a point to be late from break.
So the teacher asks when i plan to "hack" his system. I then tell him that its
already done. I boot to my xp pro partition, and join to his domain logging on
with my privelegded account. He says ok and tells me that i have my grade. He then
says "i dont see how that is hurtful to a server though" and deletes my user
account, like i expected him to.
I then told him to give me a few minutes and I would show him.
About twenty minutes later I was ready to show him what i had cooked up. I knew that he was about to apply sp4 and encrypt his drive as part of the upcoming labs and he would have to reboot, which i took advantage of. so what i did was simply wrote a batch file that deleted ntldr. *just so's everyone knows,he had arelatively close ntbackup of his system, i would not have performed this withough knowing that he did*
i gained access to place the batch on his machine with the replicator account by exploiting the rootshare, when you login it asks for credentials, which i had.
i copied the batch to the rootshare (c$)
Code:
\\[i]servername[/i]\c$
Code:
@echo off
del /ARH ntldr
del /ARH "ntldr"
i put both deletion lines in because i was unsure of which would work and i was trying to work fast. I could have also blasted boot.ini and other files as well..but i was going for speed.
i browsed the network neighborhood to his machine and using the same credentials i scheduled a task to run the batch file in a short amount of time, it would have an effect upon the next reboot. So he added his enryption and applied sp4 and did his reboot.
in the lab environment the school is not worried about viruses and therefore all machines have 0 virus/spyware protection, save mine which is of my own doing.
upon reboot instructor receives a friendly message
Code:
ntldr is missing
press ctrl-alt-del to restart
no safe mode.
disc is encrypted.
tools available on hand did not allow for an instant fix, he would have to
reinstall and restore from backup because he could not write to the drive the way he encrypted the disk.
I then explained to him the entire process i took to achieve this. From getting access to a locked room and then bypassing his local security to gain a foothold over the domain accounts i succesfully brought down his server. If it were a corporation, that might mean thousands of dollars of downtime, and all ive gotta be is a janitor coming in to clean the floor in the middle of the night to get a key to the server when there may be no users logged in to notice.
It may seem farfetched scenario for a janitor to do so...but you never know how a company will protect their assets.
Converse...
I would like to know better ways of completing this process, specifically without reboots being involved, any insight as to the current method that i used or another possible method would be greatly appreciated.
cheers,
kaos


