This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
SomethingRandom's profile picture

new function parameter os.reboot("side") and autorun

Started by SomethingRandom, 30 August 2012 - 01:00 AM
SomethingRandom #1
Posted 30 August 2012 - 03:00 AM
Hello everyone!

I have a small feature request for the standard bios:
Right now CC computers have a nasty security bug because you can boot them from a malicious disk

my problem is that I want to make a access card system which activates something over rednet
(a client pc in which you insert the disk and a server which handles the authentication so you can hide the server somewhere - e.g. within a autarkic force field so nobody can access it - or just an obsidian cage)
but nothing prevents you from accessing the client, so someone could install a spy software on it

to prevent that a autorun file (just like the startup file) could be executed every time a disk is inserted
this autorun file could call os.reboot("side to boot from") which reboots the system and forces it to use the startup location specified

possible values could be any peripheral side or "internal" or something like that to boot from the internal startup file ("rom" to boot to a completely clean os would be nice too)

additionally you would not need a dedicated client pc at all because the disk could bring all necessary scripts with it and execute it on any computer!

the autorun function could also immediately eject the disk to prevent modification

the autorun functionality could easily be implemented in bios.lua
but I'm not sure about the reboot part because you need to store the parameter somehow :)/>/>

after doing a little better search, this would solve the problem in a even simpler way:
http://www.computercraft.info/forums2/index.php?/topic/765-14-allow-for-custom-shells-in-bioslua/page__p__5040__hl__autorun__fromsearch__1
immibis #2
Posted 31 August 2012 - 01:30 AM
Why does your lock need to reboot?
FuzzyPurp #3
Posted 31 August 2012 - 06:02 AM
CC hacking is a feature of CC - not a bug. If you want to disable the diskdrive loading feature for your server , then look on the forums, theres a few edits posted for bios.lua - also someone recently posted a tweak with configs, i think its exactly what you're looking for.

here: http://www.computerc...tem-by-stiepen/
SomethingRandom #4
Posted 31 August 2012 - 10:35 AM
Why does your lock need to reboot?

If the security card would reboot the system with a special script there is no way of copying the disk because every time you insert it in a computer it just pops out

CC hacking is a feature of CC - not a bug. If you want to disable the diskdrive loading feature for your server , then look on the forums, theres a few edits posted for bios.lua - also someone recently posted a tweak with configs, i think its exactly what you're looking for.

here: http://www.computerc...tem-by-stiepen/

of course you can't make it fail safe but in my opinion inserting a boot disk and restarting the computer is way too easy :)/>/>
(I want to think when I'm hacking someone)

the problem is that this solution only works on my server but it would be nice to install your own OS on any server

but I'll look into the patch, thanks
D3matt #5
Posted 31 August 2012 - 03:56 PM
Autorun would make hacking a system EASIER, not harder.
FuzzyPurp #6
Posted 01 September 2012 - 06:45 AM
of course you can't make it fail safe but in my opinion inserting a boot disk and restarting the computer is way too easy :)/>/>
(I want to think when I'm hacking someone)

the problem is that this solution only works on my server but it would be nice to install your own OS on any server

but I'll look into the patch, thanks

You could make a antivirus in your program that scans for viruses. If you're creative enough, there's always counter-measures.

Autorun would make hacking a system EASIER, not harder.

I was going to say that, but meh.
D3matt #7
Posted 01 September 2012 - 07:48 AM
I believe you misquoted me, Fuzzy. Only the bottom quote is mine, not the top.
SomethingRandom #8
Posted 01 September 2012 - 10:43 AM
Autorun would make hacking a system EASIER, not harder.

I was going to say that, but meh.

not really..
you can listen to the disk event and eject the disk before the autorun script is executed

the possibility to write own oses would open a few pretty complicated and cool systems

I believe you misquoted me, Fuzzy. Only the bottom quote is mine, not the top.

yes the top one is mine
KaoS #9
Posted 01 September 2012 - 12:36 PM
not really..
you can listen to the disk event and eject the disk before the autorun script is executed

the possibility to write own oses would open a few pretty complicated and cool systems

just shutdown the PC before you put the disk in, then it gets no event and cannot eject the disk… hacking=successfull