|
|
#1 |
|
Lively Member
Join Date: Apr 01
Location: Utah, USA
Posts: 121
![]() |
Destructive C code
I've been dared by my proffessors here at college that there windows and Unix machines are so secure that I can do anything I want and not ruin them. They just ghost these machines when they get messed up so I'm not afraid of doing anything so...
On a Win2k or Solaris 8 platform what is some code that I could use to format the drives? or any other type of destructive C, C++ code? does anybody have anything that could drop me into root? I don't know, I jsut want to do something, this isn't against there knowledge too much either.... Zevlag
__________________
Josh -- Name Zevlag13 -- AIM www.WotsIt.org for all your file format spec questions! |
|
|
|
|
|
#2 |
|
Guest
Posts: n/a
|
Try using gets() to read in more than BUFSIZ characters from a disk file. Unix only.
If you can run DOS-based code (get to MS-DOS prompt) - write some ASM in a Turbo C module that does direct I/O to the disk. - use disk /io interrupts to overwrite disk sectors. If these are Win2K systems, you can't do that, however. In that case boot from a win98 emergency disk in the floppy (if there are floppies). You can format C: from there, or even install another OS. And. FWIW - College profs like that may have a hidden agenda - they want you to find their holes. And if they truly believe they've created completely secure systems, then they are egomaniacs. - here's a quick story about being too secure about security. An ISP in New Mexico, rt66.com, issued a challenge to hackers in the Fall of '99 - they said they were hacker proof. This was a ploy to get more customers, too. By December '99, the rt66 server had gone down about 20 times, disks were erased several different times, and rt66 lost about 15% of it's customer base. There were very unreliable in terms of uptime or getting a connection. Let's hope your college profs are not ex-rt66.com employees who failed to learn anything. I worked for folks who actively encouraged us to break security, so we could make a better end product. This is a good thing, even if it gives the sysadmin headaches. We never did anything destructive, however. And you shouldn't either. Just show 'em what you can do. |
|
|
|
#3 |
|
Kitten
Join Date: Aug 01
Location: In a microchip!
Posts: 11,594
![]() ![]() ![]() ![]() ![]() ![]() |
I don't see why
system("echo y | format c:" shouldn't work under dos/windows. Or maybe sytem(doskey del = echo y | del *.*); Next time someone calls del, without warning everythings gone. Works only under dos because: a) I think a new console window deletes the macro. b) Nobody calls del under windows.
__________________
All the buzzt CornedBee"Writing specifications is like writing a novel. Writing code is like writing poetry." - Anonymous, published by Raymond Chen Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question. |
|
|
|
|
|
#4 |
|
Black Cat
Join Date: Nov 00
Location: WNY, USA
Posts: 4,032
![]() |
On Windows 2000 you can't format the Windows drive (usually C:/ where boot.ini and ntldr reside) while in Windows 2000. I like jim's idea of booting into another OS. Can you reboot and get into the BIOS at all? How about bring a screwdriver with you and play with the wiring? Or just find a big magnet or a hammer...
|
|
|
|
|
|
#5 | |
|
Lively Member
Join Date: Apr 01
Location: Utah, USA
Posts: 121
![]() |
CornedBee, your DOS stuff won't work, that's obvious. "format C:" is locked out.
I am certain that these systems aren't perfect, and the Professors don't care what I do, they don't admin the network. I personally know the Admin so all is OK. Quote:
I could reinstall a new OS and all if I wanted(boot from CD, boot from floppy) but I was wondering what could be done with the current C/C++ compilers on these systems. What kind of security holes are there if I didn't have direct access to the hardware. Such as formating from code, whatever...... Zevlag
__________________
Josh -- Name Zevlag13 -- AIM www.WotsIt.org for all your file format spec questions! |
|
|
|
|
|
|
#6 |
|
Guest
Posts: n/a
|
Not much - if it's Win2k. The reason is that you can set an acl on files, queues, devices, resources. This prevents them from being writable.
To look for holes, write code that gives you a list of the files you can write to on the local system. If somebody made a mistake, and it's an important file, you can crash the system by opening the file with fopen(filename,"wb+") and randomly writing garbage inside the file. The other suggestion - if you go to MSDN, updates, you can get the site to tell you what security updates you need to apply to your machine, then search the net for the hacks that are open on your machine. IE 5.5 has a lot of holes, some are exploitable to get past privs. |
|
|
|
#7 |
|
Hyperactive Member
Join Date: Aug 00
Location: Canada
Posts: 306
![]() |
Interrupt 19h is used to reboot the machine... Try using that!
Or find some way to clear the memory or fill it up... Set-up a variable to access 0x00 in memory address: unsigned char *memorylocation = (unsigned char *)0x00000000L; This sets up a variable in 0x00 in memory in 8-bit segments. Now, all you have to do is use that starting address and write 0's or 1's to the whole memory system: int cntr; while(1) { cntr++; memorylocation[x+cntr] = 0; } I don't know it it will work, but if it does, it will loop through until ALL of the memory in the system contains 0, this means system RAM, video RAM, and perhaps I/O ports(Am I right???). The thing is that the CPU either freezes or resets when it has no data to process. 0x00000000L may not not work as the BIOS is in the way. You can't write to the BIOS. Try something else like 1MBits past the address above. If I remember correctly, the CMOS is a memory location too, that'll get erased as well... cheers!
__________________
Designer/Programmer of the Comtech Operating System(CTOS) |
|
|
|
|
|
#8 | |
|
Guest
Posts: n/a
|
Quote:
On Windows you willl get an Access Violation (0x00000005)... not sure about UNIX though |
|
|
|
|
#9 |
|
Hyperactive Member
Join Date: Aug 00
Location: Canada
Posts: 306
![]() |
Rats... Foiled... Ah well...
__________________
Designer/Programmer of the Comtech Operating System(CTOS) |
|
|
|
|
|
#10 |
|
PowerPoster
Join Date: Oct 00
Location: Chicago, IL, USA
Posts: 2,340
![]() |
this reminds me of the thread in the assembly forum about blowing up the monitor
__________________
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA |
|
|
|
|
|
#11 |
|
Hyperactive Member
Join Date: Aug 00
Location: Canada
Posts: 306
![]() |
I remembered that! I don't remember if I posted in it though... Think I did...
OK: I remember reading that the weakest code in Windows NT is the GUI's graphics code. Try to find some way to disrupt that and/or find a weakness in it
__________________
Designer/Programmer of the Comtech Operating System(CTOS) |
|
|
|
|
|
#12 |
|
PowerPoster
Join Date: Oct 00
Location: Chicago, IL, USA
Posts: 2,340
![]() |
could you open up explorer.exe and add literally thousands of lines of random junk to slow it down. i did something like this before.
__________________
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA |
|
|
|
|
|
#13 |
|
Kitten
Join Date: Aug 01
Location: In a microchip!
Posts: 11,594
![]() ![]() ![]() ![]() ![]() ![]() |
what about starting a highesdt-priority therad and execute an endless loop?
Only way to terminate is good old Ctrl+Alt+Entf. Code:
DWORD ThreadFunc(PVOID pvoid)
{
while(1);
}
int WINAPI WinMain(blablabla)
{
DWORD dwThreadID;
SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS);
HANDLE hThread = CreateThread(NULL, 0, ThreadFunc, NULL, CREATE_SUSPENDED, &dwThreadID);
SetThreadPriority(hThread, THREAD_PRIORITY_TIME_CRITICAL);
ResumeThread(hThread);
while(1);
}
__________________
All the buzzt CornedBee"Writing specifications is like writing a novel. Writing code is like writing poetry." - Anonymous, published by Raymond Chen Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question. |
|
|
|
|
|
#14 |
|
Hyperactive Member
Join Date: Aug 00
Location: Canada
Posts: 306
![]() |
Or you could just mess up window's registry... Go into the windows or win NT folder and open Regedit.exe
You could be able to do this code too...
__________________
Designer/Programmer of the Comtech Operating System(CTOS) |
|
|
|
|
|
#15 | |
|
PowerPoster
Join Date: Oct 00
Location: Chicago, IL, USA
Posts: 2,340
![]() |
Quote:
__________________
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA |
|
|
|
|
|
|
#16 | |
|
Monday Morning Lunatic
Join Date: Mar 00
Location: Mashin' on the motorway
Posts: 8,169
![]() |
On NT registry keys have security descriptors attached to them, so unless you've got permissions, all you can mangle is your own userdata key (maybe more or less, but you definitely can't wreck the computer for other users).
__________________
Quote:
|
|
|
|
|
|
|
#17 |
|
Addicted Member
Join Date: Aug 01
Location: I'm mobile
Posts: 166
![]() |
Write a funny little bat-file that double it self every time the computer starts......or, that delete the aoutoexec.bat and some other funny files.....
__________________
[p r a e t o r i a n] |
|
|
|
|
|
#18 |
|
Hyperactive Member
Join Date: Aug 00
Location: Canada
Posts: 306
![]() |
Does Win NT even have an autoexec.bat? I thought It was an entirely new OS(at the time), not based on DOS. On Windows 95/98, that would work...
What about UNIX? It doesn't have an autoexec.bat, but it does have other configuration files... Hey, I don't think that UNIX has all of the protection features that Win NT does... I think you could delete files from the root of the drive... I could be wrong, but that would only be because of the newer UNIX systems. A while ago, I was in a thread about boot sectors... Try trashing the boot sector with a prog called part copy... may not work on Win NT because of a "raw disk write" exception...
__________________
Designer/Programmer of the Comtech Operating System(CTOS) |
|
|
|
|
|
#19 |
|
Addicted Member
Join Date: Aug 01
Location: I'm mobile
Posts: 166
![]() |
Maybe you've right, but it must be other important files that you can delete or double......
__________________
[p r a e t o r i a n] |
|
|
|
|
|
#20 |
|
Black Cat
Join Date: Nov 00
Location: WNY, USA
Posts: 4,032
![]() |
I think you guys are looking at it the wrong way. If an NT based computer is well set up, you won't have the permissions to write or modify in files, folders, or registry keys that would cause damage. You need to look for holes in this security - like a buffer overrun in a NTFS alternate data stream, or something. Weren't there recent buffer overruns in Windows Media Player or Office Clipart? Or look up holes in the non-MS software on the system. Since MS is constantly targeted by crackers/hackers, it's security holes are likely to be well-known (bu your admins). Other companies apps might have holes that weren't that publicized.
|
|
|
|
|
|
#21 |
|
Guest
Posts: n/a
|
why not use QBASIC: CLS KILL (C:/*") END |
|
|
|
#22 |
|
Black Cat
Join Date: Nov 00
Location: WNY, USA
Posts: 4,032
![]() |
If permissions are set correctly on the C drive, you won't be able to delete anything important.
How about exploiting security holes in services running under the Localsystem account? |
|
|
|
![]() |
|
||||||
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|